diff options
author | James Morris <jmorris@namei.org> | 2011-08-30 00:19:02 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2012-01-05 18:52:52 -0500 |
commit | 2653812e14f4e16688ec8247d7fd290bdbbc4747 (patch) | |
tree | dabb2238a76e000b37374c69901afd6f99479631 /security | |
parent | 02f5daa563456c1ff3c3422aa3ec00e67460f762 (diff) |
selinux: sparse fix: fix several warnings in the security server cod
Fix several sparse warnings in the SELinux security server code.
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/hooks.c | 5 | ||||
-rw-r--r-- | security/selinux/include/avc_ss.h | 6 | ||||
-rw-r--r-- | security/selinux/ss/conditional.c | 2 | ||||
-rw-r--r-- | security/selinux/ss/conditional.h | 1 | ||||
-rw-r--r-- | security/selinux/ss/policydb.c | 2 |
5 files changed, 9 insertions, 7 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 1206cee31c79..e545b9f67072 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -89,6 +89,7 @@ | |||
89 | #include "xfrm.h" | 89 | #include "xfrm.h" |
90 | #include "netlabel.h" | 90 | #include "netlabel.h" |
91 | #include "audit.h" | 91 | #include "audit.h" |
92 | #include "avc_ss.h" | ||
92 | 93 | ||
93 | #define NUM_SEL_MNT_OPTS 5 | 94 | #define NUM_SEL_MNT_OPTS 5 |
94 | 95 | ||
@@ -278,10 +279,6 @@ static void superblock_free_security(struct super_block *sb) | |||
278 | kfree(sbsec); | 279 | kfree(sbsec); |
279 | } | 280 | } |
280 | 281 | ||
281 | /* The security server must be initialized before | ||
282 | any labeling or access decisions can be provided. */ | ||
283 | extern int ss_initialized; | ||
284 | |||
285 | /* The file system's label must be initialized prior to use. */ | 282 | /* The file system's label must be initialized prior to use. */ |
286 | 283 | ||
287 | static const char *labeling_behaviors[6] = { | 284 | static const char *labeling_behaviors[6] = { |
diff --git a/security/selinux/include/avc_ss.h b/security/selinux/include/avc_ss.h index 4677aa519b04..d5c328452df0 100644 --- a/security/selinux/include/avc_ss.h +++ b/security/selinux/include/avc_ss.h | |||
@@ -18,5 +18,11 @@ struct security_class_mapping { | |||
18 | 18 | ||
19 | extern struct security_class_mapping secclass_map[]; | 19 | extern struct security_class_mapping secclass_map[]; |
20 | 20 | ||
21 | /* | ||
22 | * The security server must be initialized before | ||
23 | * any labeling or access decisions can be provided. | ||
24 | */ | ||
25 | extern int ss_initialized; | ||
26 | |||
21 | #endif /* _SELINUX_AVC_SS_H_ */ | 27 | #endif /* _SELINUX_AVC_SS_H_ */ |
22 | 28 | ||
diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index a53373207fb4..2ec904177fe0 100644 --- a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c | |||
@@ -555,7 +555,7 @@ static int cond_write_av_list(struct policydb *p, | |||
555 | return 0; | 555 | return 0; |
556 | } | 556 | } |
557 | 557 | ||
558 | int cond_write_node(struct policydb *p, struct cond_node *node, | 558 | static int cond_write_node(struct policydb *p, struct cond_node *node, |
559 | struct policy_file *fp) | 559 | struct policy_file *fp) |
560 | { | 560 | { |
561 | struct cond_expr *cur_expr; | 561 | struct cond_expr *cur_expr; |
diff --git a/security/selinux/ss/conditional.h b/security/selinux/ss/conditional.h index 3f209c635295..4d1f87466508 100644 --- a/security/selinux/ss/conditional.h +++ b/security/selinux/ss/conditional.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include "avtab.h" | 13 | #include "avtab.h" |
14 | #include "symtab.h" | 14 | #include "symtab.h" |
15 | #include "policydb.h" | 15 | #include "policydb.h" |
16 | #include "../include/conditional.h" | ||
16 | 17 | ||
17 | #define COND_EXPR_MAXDEPTH 10 | 18 | #define COND_EXPR_MAXDEPTH 10 |
18 | 19 | ||
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index 2381d0ded228..a7f61d52f05c 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c | |||
@@ -1743,8 +1743,6 @@ static int policydb_bounds_sanity_check(struct policydb *p) | |||
1743 | return 0; | 1743 | return 0; |
1744 | } | 1744 | } |
1745 | 1745 | ||
1746 | extern int ss_initialized; | ||
1747 | |||
1748 | u16 string_to_security_class(struct policydb *p, const char *name) | 1746 | u16 string_to_security_class(struct policydb *p, const char *name) |
1749 | { | 1747 | { |
1750 | struct class_datum *cladatum; | 1748 | struct class_datum *cladatum; |