diff options
Diffstat (limited to 'security/smack/smack.h')
-rw-r--r-- | security/smack/smack.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/security/smack/smack.h b/security/smack/smack.h index b79582e4fbfd..64164f8fde70 100644 --- a/security/smack/smack.h +++ b/security/smack/smack.h | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/security.h> | 18 | #include <linux/security.h> |
19 | #include <linux/in.h> | 19 | #include <linux/in.h> |
20 | #include <net/netlabel.h> | 20 | #include <net/netlabel.h> |
21 | #include <linux/list.h> | ||
22 | #include <linux/rculist.h> | ||
21 | 23 | ||
22 | /* | 24 | /* |
23 | * Why 23? CIPSO is constrained to 30, so a 32 byte buffer is | 25 | * Why 23? CIPSO is constrained to 30, so a 32 byte buffer is |
@@ -59,17 +61,10 @@ struct inode_smack { | |||
59 | * A label access rule. | 61 | * A label access rule. |
60 | */ | 62 | */ |
61 | struct smack_rule { | 63 | struct smack_rule { |
62 | char *smk_subject; | 64 | struct list_head list; |
63 | char *smk_object; | 65 | char *smk_subject; |
64 | int smk_access; | 66 | char *smk_object; |
65 | }; | 67 | int smk_access; |
66 | |||
67 | /* | ||
68 | * An entry in the table of permitted label accesses. | ||
69 | */ | ||
70 | struct smk_list_entry { | ||
71 | struct smk_list_entry *smk_next; | ||
72 | struct smack_rule smk_rule; | ||
73 | }; | 68 | }; |
74 | 69 | ||
75 | /* | 70 | /* |
@@ -85,7 +80,7 @@ struct smack_cipso { | |||
85 | * An entry in the table identifying hosts. | 80 | * An entry in the table identifying hosts. |
86 | */ | 81 | */ |
87 | struct smk_netlbladdr { | 82 | struct smk_netlbladdr { |
88 | struct smk_netlbladdr *smk_next; | 83 | struct list_head list; |
89 | struct sockaddr_in smk_host; /* network address */ | 84 | struct sockaddr_in smk_host; /* network address */ |
90 | struct in_addr smk_mask; /* network mask */ | 85 | struct in_addr smk_mask; /* network mask */ |
91 | char *smk_label; /* label */ | 86 | char *smk_label; /* label */ |
@@ -113,7 +108,7 @@ struct smk_netlbladdr { | |||
113 | * the cipso direct mapping in used internally. | 108 | * the cipso direct mapping in used internally. |
114 | */ | 109 | */ |
115 | struct smack_known { | 110 | struct smack_known { |
116 | struct smack_known *smk_next; | 111 | struct list_head list; |
117 | char smk_known[SMK_LABELLEN]; | 112 | char smk_known[SMK_LABELLEN]; |
118 | u32 smk_secid; | 113 | u32 smk_secid; |
119 | struct smack_cipso *smk_cipso; | 114 | struct smack_cipso *smk_cipso; |
@@ -206,7 +201,6 @@ extern int smack_cipso_direct; | |||
206 | extern char *smack_net_ambient; | 201 | extern char *smack_net_ambient; |
207 | extern char *smack_onlycap; | 202 | extern char *smack_onlycap; |
208 | 203 | ||
209 | extern struct smack_known *smack_known; | ||
210 | extern struct smack_known smack_known_floor; | 204 | extern struct smack_known smack_known_floor; |
211 | extern struct smack_known smack_known_hat; | 205 | extern struct smack_known smack_known_hat; |
212 | extern struct smack_known smack_known_huh; | 206 | extern struct smack_known smack_known_huh; |
@@ -214,8 +208,10 @@ extern struct smack_known smack_known_invalid; | |||
214 | extern struct smack_known smack_known_star; | 208 | extern struct smack_known smack_known_star; |
215 | extern struct smack_known smack_known_web; | 209 | extern struct smack_known smack_known_web; |
216 | 210 | ||
217 | extern struct smk_list_entry *smack_list; | 211 | extern struct list_head smack_known_list; |
218 | extern struct smk_netlbladdr *smack_netlbladdrs; | 212 | extern struct list_head smack_rule_list; |
213 | extern struct list_head smk_netlbladdr_list; | ||
214 | |||
219 | extern struct security_operations smack_ops; | 215 | extern struct security_operations smack_ops; |
220 | 216 | ||
221 | /* | 217 | /* |