Skip to content

Commit cb4fbe5

Browse files
committed
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>
1 parent 19e4983 commit cb4fbe5

2 files changed

Lines changed: 6 additions & 17 deletions

File tree

‎security/selinux/avc.c‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,6 @@ inline int avc_has_perm_noaudit(u32 ssid, u32 tsid,
746746
* @tclass: target security class
747747
* @requested: requested permissions, interpreted based on @tclass
748748
* @auditdata: auxiliary audit data
749-
* @flags: VFS walk flags
750749
*
751750
* Check the AVC to determine whether the @requested permissions are granted
752751
* for the SID pair (@ssid, @tsid), interpreting the permissions
@@ -756,17 +755,15 @@ inline int avc_has_perm_noaudit(u32 ssid, u32 tsid,
756755
* permissions are granted, -%EACCES if any permissions are denied, or
757756
* another -errno upon other errors.
758757
*/
759-
int avc_has_perm_flags(u32 ssid, u32 tsid, u16 tclass,
760-
u32 requested, struct common_audit_data *auditdata,
761-
unsigned flags)
758+
int avc_has_perm(u32 ssid, u32 tsid, u16 tclass,
759+
u32 requested, struct common_audit_data *auditdata)
762760
{
763761
struct av_decision avd;
764762
int rc, rc2;
765763

766764
rc = avc_has_perm_noaudit(ssid, tsid, tclass, requested, 0, &avd);
767765

768-
rc2 = avc_audit(ssid, tsid, tclass, requested, &avd, rc, auditdata,
769-
flags);
766+
rc2 = avc_audit(ssid, tsid, tclass, requested, &avd, rc, auditdata, 0);
770767
if (rc2)
771768
return rc2;
772769
return rc;

‎security/selinux/include/avc.h‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,9 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid,
147147
unsigned flags,
148148
struct av_decision *avd);
149149

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);
161153

162154
u32 avc_policy_seqno(void);
163155

0 commit comments

Comments
 (0)