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.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 2391761ae422..26646305dc0e 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -932,7 +932,7 @@ static int perm_read(struct policydb *p, struct hashtab *h, void *fp)
932 rc = next_entry(key, fp, len); 932 rc = next_entry(key, fp, len);
933 if (rc < 0) 933 if (rc < 0)
934 goto bad; 934 goto bad;
935 key[len] = 0; 935 key[len] = '\0';
936 936
937 rc = hashtab_insert(h, key, perdatum); 937 rc = hashtab_insert(h, key, perdatum);
938 if (rc) 938 if (rc)
@@ -979,7 +979,7 @@ static int common_read(struct policydb *p, struct hashtab *h, void *fp)
979 rc = next_entry(key, fp, len); 979 rc = next_entry(key, fp, len);
980 if (rc < 0) 980 if (rc < 0)
981 goto bad; 981 goto bad;
982 key[len] = 0; 982 key[len] = '\0';
983 983
984 for (i = 0; i < nel; i++) { 984 for (i = 0; i < nel; i++) {
985 rc = perm_read(p, comdatum->permissions.table, fp); 985 rc = perm_read(p, comdatum->permissions.table, fp);
@@ -1117,7 +1117,7 @@ static int class_read(struct policydb *p, struct hashtab *h, void *fp)
1117 rc = next_entry(key, fp, len); 1117 rc = next_entry(key, fp, len);
1118 if (rc < 0) 1118 if (rc < 0)
1119 goto bad; 1119 goto bad;
1120 key[len] = 0; 1120 key[len] = '\0';
1121 1121
1122 if (len2) { 1122 if (len2) {
1123 cladatum->comkey = kmalloc(len2 + 1, GFP_KERNEL); 1123 cladatum->comkey = kmalloc(len2 + 1, GFP_KERNEL);
@@ -1128,7 +1128,7 @@ static int class_read(struct policydb *p, struct hashtab *h, void *fp)
1128 rc = next_entry(cladatum->comkey, fp, len2); 1128 rc = next_entry(cladatum->comkey, fp, len2);
1129 if (rc < 0) 1129 if (rc < 0)
1130 goto bad; 1130 goto bad;
1131 cladatum->comkey[len2] = 0; 1131 cladatum->comkey[len2] = '\0';
1132 1132
1133 cladatum->comdatum = hashtab_search(p->p_commons.table, 1133 cladatum->comdatum = hashtab_search(p->p_commons.table,
1134 cladatum->comkey); 1134 cladatum->comkey);
@@ -1201,7 +1201,7 @@ static int role_read(struct policydb *p, struct hashtab *h, void *fp)
1201 rc = next_entry(key, fp, len); 1201 rc = next_entry(key, fp, len);
1202 if (rc < 0) 1202 if (rc < 0)
1203 goto bad; 1203 goto bad;
1204 key[len] = 0; 1204 key[len] = '\0';
1205 1205
1206 rc = ebitmap_read(&role->dominates, fp); 1206 rc = ebitmap_read(&role->dominates, fp);
1207 if (rc) 1207 if (rc)
@@ -1262,7 +1262,7 @@ static int type_read(struct policydb *p, struct hashtab *h, void *fp)
1262 rc = next_entry(key, fp, len); 1262 rc = next_entry(key, fp, len);
1263 if (rc < 0) 1263 if (rc < 0)
1264 goto bad; 1264 goto bad;
1265 key[len] = 0; 1265 key[len] = '\0';
1266 1266
1267 rc = hashtab_insert(h, key, typdatum); 1267 rc = hashtab_insert(h, key, typdatum);
1268 if (rc) 1268 if (rc)
@@ -1334,7 +1334,7 @@ static int user_read(struct policydb *p, struct hashtab *h, void *fp)
1334 rc = next_entry(key, fp, len); 1334 rc = next_entry(key, fp, len);
1335 if (rc < 0) 1335 if (rc < 0)
1336 goto bad; 1336 goto bad;
1337 key[len] = 0; 1337 key[len] = '\0';
1338 1338
1339 rc = ebitmap_read(&usrdatum->roles, fp); 1339 rc = ebitmap_read(&usrdatum->roles, fp);
1340 if (rc) 1340 if (rc)
@@ -1388,7 +1388,7 @@ static int sens_read(struct policydb *p, struct hashtab *h, void *fp)
1388 rc = next_entry(key, fp, len); 1388 rc = next_entry(key, fp, len);
1389 if (rc < 0) 1389 if (rc < 0)
1390 goto bad; 1390 goto bad;
1391 key[len] = 0; 1391 key[len] = '\0';
1392 1392
1393 levdatum->level = kmalloc(sizeof(struct mls_level), GFP_ATOMIC); 1393 levdatum->level = kmalloc(sizeof(struct mls_level), GFP_ATOMIC);
1394 if (!levdatum->level) { 1394 if (!levdatum->level) {
@@ -1440,7 +1440,7 @@ static int cat_read(struct policydb *p, struct hashtab *h, void *fp)
1440 rc = next_entry(key, fp, len); 1440 rc = next_entry(key, fp, len);
1441 if (rc < 0) 1441 if (rc < 0)
1442 goto bad; 1442 goto bad;
1443 key[len] = 0; 1443 key[len] = '\0';
1444 1444
1445 rc = hashtab_insert(h, key, catdatum); 1445 rc = hashtab_insert(h, key, catdatum);
1446 if (rc) 1446 if (rc)
@@ -1523,7 +1523,7 @@ int policydb_read(struct policydb *p, void *fp)
1523 kfree(policydb_str); 1523 kfree(policydb_str);
1524 goto bad; 1524 goto bad;
1525 } 1525 }
1526 policydb_str[len] = 0; 1526 policydb_str[len] = '\0';
1527 if (strcmp(policydb_str, POLICYDB_STRING)) { 1527 if (strcmp(policydb_str, POLICYDB_STRING)) {
1528 printk(KERN_ERR "SELinux: policydb string %s does not match " 1528 printk(KERN_ERR "SELinux: policydb string %s does not match "
1529 "my string %s\n", policydb_str, POLICYDB_STRING); 1529 "my string %s\n", policydb_str, POLICYDB_STRING);