mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
selinux: sparse fix: fix several warnings in the security server code
Fix several sparse warnings in the SELinux security server code. Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
parent
0ff53f5ddb
commit
7b98a5857c
5 changed files with 9 additions and 7 deletions
|
@ -89,6 +89,7 @@
|
||||||
#include "xfrm.h"
|
#include "xfrm.h"
|
||||||
#include "netlabel.h"
|
#include "netlabel.h"
|
||||||
#include "audit.h"
|
#include "audit.h"
|
||||||
|
#include "avc_ss.h"
|
||||||
|
|
||||||
#define NUM_SEL_MNT_OPTS 5
|
#define NUM_SEL_MNT_OPTS 5
|
||||||
|
|
||||||
|
@ -278,10 +279,6 @@ static void superblock_free_security(struct super_block *sb)
|
||||||
kfree(sbsec);
|
kfree(sbsec);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The security server must be initialized before
|
|
||||||
any labeling or access decisions can be provided. */
|
|
||||||
extern int ss_initialized;
|
|
||||||
|
|
||||||
/* The file system's label must be initialized prior to use. */
|
/* The file system's label must be initialized prior to use. */
|
||||||
|
|
||||||
static const char *labeling_behaviors[6] = {
|
static const char *labeling_behaviors[6] = {
|
||||||
|
|
|
@ -18,5 +18,11 @@ struct security_class_mapping {
|
||||||
|
|
||||||
extern struct security_class_mapping secclass_map[];
|
extern struct security_class_mapping secclass_map[];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The security server must be initialized before
|
||||||
|
* any labeling or access decisions can be provided.
|
||||||
|
*/
|
||||||
|
extern int ss_initialized;
|
||||||
|
|
||||||
#endif /* _SELINUX_AVC_SS_H_ */
|
#endif /* _SELINUX_AVC_SS_H_ */
|
||||||
|
|
||||||
|
|
|
@ -555,7 +555,7 @@ static int cond_write_av_list(struct policydb *p,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cond_write_node(struct policydb *p, struct cond_node *node,
|
static int cond_write_node(struct policydb *p, struct cond_node *node,
|
||||||
struct policy_file *fp)
|
struct policy_file *fp)
|
||||||
{
|
{
|
||||||
struct cond_expr *cur_expr;
|
struct cond_expr *cur_expr;
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "avtab.h"
|
#include "avtab.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "policydb.h"
|
#include "policydb.h"
|
||||||
|
#include "../include/conditional.h"
|
||||||
|
|
||||||
#define COND_EXPR_MAXDEPTH 10
|
#define COND_EXPR_MAXDEPTH 10
|
||||||
|
|
||||||
|
|
|
@ -1743,8 +1743,6 @@ static int policydb_bounds_sanity_check(struct policydb *p)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int ss_initialized;
|
|
||||||
|
|
||||||
u16 string_to_security_class(struct policydb *p, const char *name)
|
u16 string_to_security_class(struct policydb *p, const char *name)
|
||||||
{
|
{
|
||||||
struct class_datum *cladatum;
|
struct class_datum *cladatum;
|
||||||
|
|
Loading…
Reference in a new issue