aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/include/avc.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /security/selinux/include/avc.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'security/selinux/include/avc.h')
-rw-r--r--security/selinux/include/avc.h20
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 */
43struct avc_cache_stats { 42struct 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
56void __init avc_init(void); 54void __init avc_init(void);
57 55
58void avc_audit(u32 ssid, u32 tsid, 56int 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. */
65int avc_has_perm_noaudit(u32 ssid, u32 tsid, 63int 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
70int avc_has_perm(u32 ssid, u32 tsid, 68int 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
73static 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
74u32 avc_policy_seqno(void); 80u32 avc_policy_seqno(void);
75 81