diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-04 15:57:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-04 17:13:14 -0400 |
commit | cb4fbe5703be51f8a2dff4052b1901941ab99e12 (patch) | |
tree | 9792a22b1988a3b0633520923293177cf81af2ab | |
parent | 19e49834d22c2271ed1f4a03aaa4b74986447fb4 (diff) |
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>
-rw-r--r-- | security/selinux/avc.c | 9 | ||||
-rw-r--r-- | security/selinux/include/avc.h | 14 |
2 files changed, 6 insertions, 17 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index dad36a6ab45f..e720f72fcb87 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c | |||
@@ -746,7 +746,6 @@ inline int avc_has_perm_noaudit(u32 ssid, u32 tsid, | |||
746 | * @tclass: target security class | 746 | * @tclass: target security class |
747 | * @requested: requested permissions, interpreted based on @tclass | 747 | * @requested: requested permissions, interpreted based on @tclass |
748 | * @auditdata: auxiliary audit data | 748 | * @auditdata: auxiliary audit data |
749 | * @flags: VFS walk flags | ||
750 | * | 749 | * |
751 | * Check the AVC to determine whether the @requested permissions are granted | 750 | * Check the AVC to determine whether the @requested permissions are granted |
752 | * for the SID pair (@ssid, @tsid), interpreting the permissions | 751 | * for the SID pair (@ssid, @tsid), interpreting the permissions |
@@ -756,17 +755,15 @@ inline int avc_has_perm_noaudit(u32 ssid, u32 tsid, | |||
756 | * permissions are granted, -%EACCES if any permissions are denied, or | 755 | * permissions are granted, -%EACCES if any permissions are denied, or |
757 | * another -errno upon other errors. | 756 | * another -errno upon other errors. |
758 | */ | 757 | */ |
759 | int avc_has_perm_flags(u32 ssid, u32 tsid, u16 tclass, | 758 | int avc_has_perm(u32 ssid, u32 tsid, u16 tclass, |
760 | u32 requested, struct common_audit_data *auditdata, | 759 | u32 requested, struct common_audit_data *auditdata) |
761 | unsigned flags) | ||
762 | { | 760 | { |
763 | struct av_decision avd; | 761 | struct av_decision avd; |
764 | int rc, rc2; | 762 | int rc, rc2; |
765 | 763 | ||
766 | rc = avc_has_perm_noaudit(ssid, tsid, tclass, requested, 0, &avd); | 764 | rc = avc_has_perm_noaudit(ssid, tsid, tclass, requested, 0, &avd); |
767 | 765 | ||
768 | rc2 = avc_audit(ssid, tsid, tclass, requested, &avd, rc, auditdata, | 766 | rc2 = avc_audit(ssid, tsid, tclass, requested, &avd, rc, auditdata, 0); |
769 | flags); | ||
770 | if (rc2) | 767 | if (rc2) |
771 | return rc2; | 768 | return rc2; |
772 | return rc; | 769 | return rc; |
diff --git a/security/selinux/include/avc.h b/security/selinux/include/avc.h index 92d0ab561db8..e30657b59cb3 100644 --- a/security/selinux/include/avc.h +++ b/security/selinux/include/avc.h | |||
@@ -147,17 +147,9 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid, | |||
147 | unsigned flags, | 147 | unsigned flags, |
148 | struct av_decision *avd); | 148 | struct av_decision *avd); |
149 | 149 | ||
150 | int avc_has_perm_flags(u32 ssid, u32 tsid, | 150 | int avc_has_perm(u32 ssid, u32 tsid, |
151 | u16 tclass, u32 requested, | 151 | u16 tclass, u32 requested, |
152 | struct common_audit_data *auditdata, | 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 | } | ||
161 | 153 | ||
162 | u32 avc_policy_seqno(void); | 154 | u32 avc_policy_seqno(void); |
163 | 155 | ||