aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/policydb.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/ss/policydb.c')
-rw-r--r--security/selinux/ss/policydb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index a493eae24e0a..82373eb2dc97 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -2275,6 +2275,11 @@ int policydb_read(struct policydb *p, void *fp)
2275 p->symtab[i].nprim = nprim; 2275 p->symtab[i].nprim = nprim;
2276 } 2276 }
2277 2277
2278 rc = -EINVAL;
2279 p->process_class = string_to_security_class(p, "process");
2280 if (!p->process_class)
2281 goto bad;
2282
2278 rc = avtab_read(&p->te_avtab, fp, p); 2283 rc = avtab_read(&p->te_avtab, fp, p);
2279 if (rc) 2284 if (rc)
2280 goto bad; 2285 goto bad;
@@ -2359,11 +2364,6 @@ int policydb_read(struct policydb *p, void *fp)
2359 goto bad; 2364 goto bad;
2360 2365
2361 rc = -EINVAL; 2366 rc = -EINVAL;
2362 p->process_class = string_to_security_class(p, "process");
2363 if (!p->process_class)
2364 goto bad;
2365
2366 rc = -EINVAL;
2367 p->process_trans_perms = string_to_av_perm(p, p->process_class, "transition"); 2367 p->process_trans_perms = string_to_av_perm(p, p->process_class, "transition");
2368 p->process_trans_perms |= string_to_av_perm(p, p->process_class, "dyntransition"); 2368 p->process_trans_perms |= string_to_av_perm(p, p->process_class, "dyntransition");
2369 if (!p->process_trans_perms) 2369 if (!p->process_trans_perms)