diff options
Diffstat (limited to 'security/selinux/include/avc.h')
-rw-r--r-- | security/selinux/include/avc.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/security/selinux/include/avc.h b/security/selinux/include/avc.h index e94e82f73818..47fda963495d 100644 --- a/security/selinux/include/avc.h +++ b/security/selinux/include/avc.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/audit.h> | 15 | #include <linux/audit.h> |
16 | #include <linux/lsm_audit.h> | 16 | #include <linux/lsm_audit.h> |
17 | #include <linux/in6.h> | 17 | #include <linux/in6.h> |
18 | #include <linux/path.h> | ||
19 | #include <asm/system.h> | 18 | #include <asm/system.h> |
20 | #include "flask.h" | 19 | #include "flask.h" |
21 | #include "av_permissions.h" | 20 | #include "av_permissions.h" |
@@ -42,7 +41,6 @@ struct sk_buff; | |||
42 | */ | 41 | */ |
43 | struct avc_cache_stats { | 42 | struct avc_cache_stats { |
44 | unsigned int lookups; | 43 | unsigned int lookups; |
45 | unsigned int hits; | ||
46 | unsigned int misses; | 44 | unsigned int misses; |
47 | unsigned int allocations; | 45 | unsigned int allocations; |
48 | unsigned int reclaims; | 46 | unsigned int reclaims; |
@@ -55,11 +53,11 @@ struct avc_cache_stats { | |||
55 | 53 | ||
56 | void __init avc_init(void); | 54 | void __init avc_init(void); |
57 | 55 | ||
58 | void avc_audit(u32 ssid, u32 tsid, | 56 | int avc_audit(u32 ssid, u32 tsid, |
59 | u16 tclass, u32 requested, | 57 | u16 tclass, u32 requested, |
60 | struct av_decision *avd, | 58 | struct av_decision *avd, |
61 | int result, | 59 | int result, |
62 | struct common_audit_data *a); | 60 | struct common_audit_data *a, unsigned flags); |
63 | 61 | ||
64 | #define AVC_STRICT 1 /* Ignore permissive mode. */ | 62 | #define AVC_STRICT 1 /* Ignore permissive mode. */ |
65 | int avc_has_perm_noaudit(u32 ssid, u32 tsid, | 63 | int avc_has_perm_noaudit(u32 ssid, u32 tsid, |
@@ -67,9 +65,17 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid, | |||
67 | unsigned flags, | 65 | unsigned flags, |
68 | struct av_decision *avd); | 66 | struct av_decision *avd); |
69 | 67 | ||
70 | int avc_has_perm(u32 ssid, u32 tsid, | 68 | int avc_has_perm_flags(u32 ssid, u32 tsid, |
71 | u16 tclass, u32 requested, | 69 | u16 tclass, u32 requested, |
72 | struct common_audit_data *auditdata); | 70 | struct common_audit_data *auditdata, |
71 | unsigned); | ||
72 | |||
73 | static inline int avc_has_perm(u32 ssid, u32 tsid, | ||
74 | u16 tclass, u32 requested, | ||
75 | struct common_audit_data *auditdata) | ||
76 | { | ||
77 | return avc_has_perm_flags(ssid, tsid, tclass, requested, auditdata, 0); | ||
78 | } | ||
73 | 79 | ||
74 | u32 avc_policy_seqno(void); | 80 | u32 avc_policy_seqno(void); |
75 | 81 | ||