diff options
author | James Morris <jmorris@namei.org> | 2009-07-12 20:39:36 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-07-12 20:39:36 -0400 |
commit | be940d6279c30a2d7c4e8d1d5435f957f594d66d (patch) | |
tree | 965805d563cb756879fd3595230c3ca205da76d1 /security/selinux/include/avc.h | |
parent | b3a633c8527ef155b1a4e22e8f5abc58f7af54c9 (diff) |
Revert "SELinux: Convert avc_audit to use lsm_audit.h"
This reverts commit 8113a8d80f4c6a3dc3724b39b470f3fee9c426b6.
The patch causes a stack overflow on my system during boot.
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/include/avc.h')
-rw-r--r-- | security/selinux/include/avc.h | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/security/selinux/include/avc.h b/security/selinux/include/avc.h index e94e82f73818..ae4c3a0e2c1a 100644 --- a/security/selinux/include/avc.h +++ b/security/selinux/include/avc.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/audit.h> | 15 | #include <linux/audit.h> |
16 | #include <linux/lsm_audit.h> | ||
17 | #include <linux/in6.h> | 16 | #include <linux/in6.h> |
18 | #include <linux/path.h> | 17 | #include <linux/path.h> |
19 | #include <asm/system.h> | 18 | #include <asm/system.h> |
@@ -37,6 +36,48 @@ struct inode; | |||
37 | struct sock; | 36 | struct sock; |
38 | struct sk_buff; | 37 | struct sk_buff; |
39 | 38 | ||
39 | /* Auxiliary data to use in generating the audit record. */ | ||
40 | struct avc_audit_data { | ||
41 | char type; | ||
42 | #define AVC_AUDIT_DATA_FS 1 | ||
43 | #define AVC_AUDIT_DATA_NET 2 | ||
44 | #define AVC_AUDIT_DATA_CAP 3 | ||
45 | #define AVC_AUDIT_DATA_IPC 4 | ||
46 | struct task_struct *tsk; | ||
47 | union { | ||
48 | struct { | ||
49 | struct path path; | ||
50 | struct inode *inode; | ||
51 | } fs; | ||
52 | struct { | ||
53 | int netif; | ||
54 | struct sock *sk; | ||
55 | u16 family; | ||
56 | __be16 dport; | ||
57 | __be16 sport; | ||
58 | union { | ||
59 | struct { | ||
60 | __be32 daddr; | ||
61 | __be32 saddr; | ||
62 | } v4; | ||
63 | struct { | ||
64 | struct in6_addr daddr; | ||
65 | struct in6_addr saddr; | ||
66 | } v6; | ||
67 | } fam; | ||
68 | } net; | ||
69 | int cap; | ||
70 | int ipc_id; | ||
71 | } u; | ||
72 | }; | ||
73 | |||
74 | #define v4info fam.v4 | ||
75 | #define v6info fam.v6 | ||
76 | |||
77 | /* Initialize an AVC audit data structure. */ | ||
78 | #define AVC_AUDIT_DATA_INIT(_d,_t) \ | ||
79 | { memset((_d), 0, sizeof(struct avc_audit_data)); (_d)->type = AVC_AUDIT_DATA_##_t; } | ||
80 | |||
40 | /* | 81 | /* |
41 | * AVC statistics | 82 | * AVC statistics |
42 | */ | 83 | */ |
@@ -57,9 +98,7 @@ void __init avc_init(void); | |||
57 | 98 | ||
58 | void avc_audit(u32 ssid, u32 tsid, | 99 | void avc_audit(u32 ssid, u32 tsid, |
59 | u16 tclass, u32 requested, | 100 | u16 tclass, u32 requested, |
60 | struct av_decision *avd, | 101 | struct av_decision *avd, int result, struct avc_audit_data *auditdata); |
61 | int result, | ||
62 | struct common_audit_data *a); | ||
63 | 102 | ||
64 | #define AVC_STRICT 1 /* Ignore permissive mode. */ | 103 | #define AVC_STRICT 1 /* Ignore permissive mode. */ |
65 | int avc_has_perm_noaudit(u32 ssid, u32 tsid, | 104 | int avc_has_perm_noaudit(u32 ssid, u32 tsid, |
@@ -69,7 +108,7 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid, | |||
69 | 108 | ||
70 | int avc_has_perm(u32 ssid, u32 tsid, | 109 | int avc_has_perm(u32 ssid, u32 tsid, |
71 | u16 tclass, u32 requested, | 110 | u16 tclass, u32 requested, |
72 | struct common_audit_data *auditdata); | 111 | struct avc_audit_data *auditdata); |
73 | 112 | ||
74 | u32 avc_policy_seqno(void); | 113 | u32 avc_policy_seqno(void); |
75 | 114 | ||