diff options
author | Vesa-Matti J Kari <vmkari@cc.helsinki.fi> | 2008-07-20 16:57:01 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-08-04 20:55:30 -0400 |
commit | df4ea865f09580b1cad621c0426612f598847815 (patch) | |
tree | 57c7e7cc2cb1e4144f1a101a8bc93f74d4b64db9 | |
parent | 3583a71183a02c51ca71cd180e9189cfb0411cc1 (diff) |
SELinux: Trivial minor fixes that change C null character style
Trivial minor fixes that change C null character style.
Signed-off-by: Vesa-Matti Kari <vmkari@cc.helsinki.fi>
Signed-off-by: James Morris <jmorris@namei.org>
-rw-r--r-- | security/selinux/ss/conditional.c | 2 | ||||
-rw-r--r-- | security/selinux/ss/mls.c | 14 | ||||
-rw-r--r-- | security/selinux/ss/policydb.c | 20 |
3 files changed, 18 insertions, 18 deletions
diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index fb4efe4f4bc8..f8c850a56ed1 100644 --- a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c | |||
@@ -239,7 +239,7 @@ int cond_read_bool(struct policydb *p, struct hashtab *h, void *fp) | |||
239 | rc = next_entry(key, fp, len); | 239 | rc = next_entry(key, fp, len); |
240 | if (rc < 0) | 240 | if (rc < 0) |
241 | goto err; | 241 | goto err; |
242 | key[len] = 0; | 242 | key[len] = '\0'; |
243 | if (hashtab_insert(h, key, booldatum)) | 243 | if (hashtab_insert(h, key, booldatum)) |
244 | goto err; | 244 | goto err; |
245 | 245 | ||
diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c index 77d745da48bb..b5407f16c2a4 100644 --- a/security/selinux/ss/mls.c +++ b/security/selinux/ss/mls.c | |||
@@ -283,8 +283,8 @@ int mls_context_to_sid(struct policydb *pol, | |||
283 | p++; | 283 | p++; |
284 | 284 | ||
285 | delim = *p; | 285 | delim = *p; |
286 | if (delim != 0) | 286 | if (delim != '\0') |
287 | *p++ = 0; | 287 | *p++ = '\0'; |
288 | 288 | ||
289 | for (l = 0; l < 2; l++) { | 289 | for (l = 0; l < 2; l++) { |
290 | levdatum = hashtab_search(pol->p_levels.table, scontextp); | 290 | levdatum = hashtab_search(pol->p_levels.table, scontextp); |
@@ -302,14 +302,14 @@ int mls_context_to_sid(struct policydb *pol, | |||
302 | while (*p && *p != ',' && *p != '-') | 302 | while (*p && *p != ',' && *p != '-') |
303 | p++; | 303 | p++; |
304 | delim = *p; | 304 | delim = *p; |
305 | if (delim != 0) | 305 | if (delim != '\0') |
306 | *p++ = 0; | 306 | *p++ = '\0'; |
307 | 307 | ||
308 | /* Separate into range if exists */ | 308 | /* Separate into range if exists */ |
309 | rngptr = strchr(scontextp, '.'); | 309 | rngptr = strchr(scontextp, '.'); |
310 | if (rngptr != NULL) { | 310 | if (rngptr != NULL) { |
311 | /* Remove '.' */ | 311 | /* Remove '.' */ |
312 | *rngptr++ = 0; | 312 | *rngptr++ = '\0'; |
313 | } | 313 | } |
314 | 314 | ||
315 | catdatum = hashtab_search(pol->p_cats.table, | 315 | catdatum = hashtab_search(pol->p_cats.table, |
@@ -357,8 +357,8 @@ int mls_context_to_sid(struct policydb *pol, | |||
357 | p++; | 357 | p++; |
358 | 358 | ||
359 | delim = *p; | 359 | delim = *p; |
360 | if (delim != 0) | 360 | if (delim != '\0') |
361 | *p++ = 0; | 361 | *p++ = '\0'; |
362 | } else | 362 | } else |
363 | break; | 363 | break; |
364 | } | 364 | } |
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); |