aboutsummaryrefslogtreecommitdiffstats
path: root/security/smack/smack.h
diff options
context:
space:
mode:
Diffstat (limited to 'security/smack/smack.h')
-rw-r--r--security/smack/smack.h28
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 */
61struct smack_rule { 63struct 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 */
70struct 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 */
87struct smk_netlbladdr { 82struct 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 */
115struct smack_known { 110struct 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;
206extern char *smack_net_ambient; 201extern char *smack_net_ambient;
207extern char *smack_onlycap; 202extern char *smack_onlycap;
208 203
209extern struct smack_known *smack_known;
210extern struct smack_known smack_known_floor; 204extern struct smack_known smack_known_floor;
211extern struct smack_known smack_known_hat; 205extern struct smack_known smack_known_hat;
212extern struct smack_known smack_known_huh; 206extern struct smack_known smack_known_huh;
@@ -214,8 +208,10 @@ extern struct smack_known smack_known_invalid;
214extern struct smack_known smack_known_star; 208extern struct smack_known smack_known_star;
215extern struct smack_known smack_known_web; 209extern struct smack_known smack_known_web;
216 210
217extern struct smk_list_entry *smack_list; 211extern struct list_head smack_known_list;
218extern struct smk_netlbladdr *smack_netlbladdrs; 212extern struct list_head smack_rule_list;
213extern struct list_head smk_netlbladdr_list;
214
219extern struct security_operations smack_ops; 215extern struct security_operations smack_ops;
220 216
221/* 217/*