Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selinux: avc_has_perm_flags has no more users

.. so get rid of it. The only indirect users were all the
avc_has_perm() callers which just expanded to have a zero flags
argument.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+6 -17
+3 -6
security/selinux/avc.c
··· 746 746 * @tclass: target security class 747 747 * @requested: requested permissions, interpreted based on @tclass 748 748 * @auditdata: auxiliary audit data 749 - * @flags: VFS walk flags 750 749 * 751 750 * Check the AVC to determine whether the @requested permissions are granted 752 751 * for the SID pair (@ssid, @tsid), interpreting the permissions ··· 755 756 * permissions are granted, -%EACCES if any permissions are denied, or 756 757 * another -errno upon other errors. 757 758 */ 758 - int avc_has_perm_flags(u32 ssid, u32 tsid, u16 tclass, 759 - u32 requested, struct common_audit_data *auditdata, 760 - unsigned flags) 759 + int avc_has_perm(u32 ssid, u32 tsid, u16 tclass, 760 + u32 requested, struct common_audit_data *auditdata) 761 761 { 762 762 struct av_decision avd; 763 763 int rc, rc2; 764 764 765 765 rc = avc_has_perm_noaudit(ssid, tsid, tclass, requested, 0, &avd); 766 766 767 - rc2 = avc_audit(ssid, tsid, tclass, requested, &avd, rc, auditdata, 768 - flags); 767 + rc2 = avc_audit(ssid, tsid, tclass, requested, &avd, rc, auditdata, 0); 769 768 if (rc2) 770 769 return rc2; 771 770 return rc;
+3 -11
security/selinux/include/avc.h
··· 147 147 unsigned flags, 148 148 struct av_decision *avd); 149 149 150 - int avc_has_perm_flags(u32 ssid, u32 tsid, 151 - u16 tclass, u32 requested, 152 - struct common_audit_data *auditdata, 153 - unsigned); 154 - 155 - static inline int avc_has_perm(u32 ssid, u32 tsid, 156 - u16 tclass, u32 requested, 157 - struct common_audit_data *auditdata) 158 - { 159 - return avc_has_perm_flags(ssid, tsid, tclass, requested, auditdata, 0); 160 - } 150 + int avc_has_perm(u32 ssid, u32 tsid, 151 + u16 tclass, u32 requested, 152 + struct common_audit_data *auditdata); 161 153 162 154 u32 avc_policy_seqno(void); 163 155