Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110744
b: refs/heads/master
c: df4ea86
h: refs/heads/master
v: v3
  • Loading branch information
Vesa-Matti J Kari authored and James Morris committed Aug 5, 2008
1 parent f21e5cf commit d555532
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3583a71183a02c51ca71cd180e9189cfb0411cc1
refs/heads/master: df4ea865f09580b1cad621c0426612f598847815
2 changes: 1 addition & 1 deletion trunk/security/selinux/ss/conditional.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ int cond_read_bool(struct policydb *p, struct hashtab *h, void *fp)
rc = next_entry(key, fp, len);
if (rc < 0)
goto err;
key[len] = 0;
key[len] = '\0';
if (hashtab_insert(h, key, booldatum))
goto err;

Expand Down
14 changes: 7 additions & 7 deletions trunk/security/selinux/ss/mls.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ int mls_context_to_sid(struct policydb *pol,
p++;

delim = *p;
if (delim != 0)
*p++ = 0;
if (delim != '\0')
*p++ = '\0';

for (l = 0; l < 2; l++) {
levdatum = hashtab_search(pol->p_levels.table, scontextp);
Expand All @@ -302,14 +302,14 @@ int mls_context_to_sid(struct policydb *pol,
while (*p && *p != ',' && *p != '-')
p++;
delim = *p;
if (delim != 0)
*p++ = 0;
if (delim != '\0')
*p++ = '\0';

/* Separate into range if exists */
rngptr = strchr(scontextp, '.');
if (rngptr != NULL) {
/* Remove '.' */
*rngptr++ = 0;
*rngptr++ = '\0';
}

catdatum = hashtab_search(pol->p_cats.table,
Expand Down Expand Up @@ -357,8 +357,8 @@ int mls_context_to_sid(struct policydb *pol,
p++;

delim = *p;
if (delim != 0)
*p++ = 0;
if (delim != '\0')
*p++ = '\0';
} else
break;
}
Expand Down
20 changes: 10 additions & 10 deletions trunk/security/selinux/ss/policydb.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ static int perm_read(struct policydb *p, struct hashtab *h, void *fp)
rc = next_entry(key, fp, len);
if (rc < 0)
goto bad;
key[len] = 0;
key[len] = '\0';

rc = hashtab_insert(h, key, perdatum);
if (rc)
Expand Down Expand Up @@ -979,7 +979,7 @@ static int common_read(struct policydb *p, struct hashtab *h, void *fp)
rc = next_entry(key, fp, len);
if (rc < 0)
goto bad;
key[len] = 0;
key[len] = '\0';

for (i = 0; i < nel; i++) {
rc = perm_read(p, comdatum->permissions.table, fp);
Expand Down Expand Up @@ -1117,7 +1117,7 @@ static int class_read(struct policydb *p, struct hashtab *h, void *fp)
rc = next_entry(key, fp, len);
if (rc < 0)
goto bad;
key[len] = 0;
key[len] = '\0';

if (len2) {
cladatum->comkey = kmalloc(len2 + 1, GFP_KERNEL);
Expand All @@ -1128,7 +1128,7 @@ static int class_read(struct policydb *p, struct hashtab *h, void *fp)
rc = next_entry(cladatum->comkey, fp, len2);
if (rc < 0)
goto bad;
cladatum->comkey[len2] = 0;
cladatum->comkey[len2] = '\0';

cladatum->comdatum = hashtab_search(p->p_commons.table,
cladatum->comkey);
Expand Down Expand Up @@ -1201,7 +1201,7 @@ static int role_read(struct policydb *p, struct hashtab *h, void *fp)
rc = next_entry(key, fp, len);
if (rc < 0)
goto bad;
key[len] = 0;
key[len] = '\0';

rc = ebitmap_read(&role->dominates, fp);
if (rc)
Expand Down Expand Up @@ -1262,7 +1262,7 @@ static int type_read(struct policydb *p, struct hashtab *h, void *fp)
rc = next_entry(key, fp, len);
if (rc < 0)
goto bad;
key[len] = 0;
key[len] = '\0';

rc = hashtab_insert(h, key, typdatum);
if (rc)
Expand Down Expand Up @@ -1334,7 +1334,7 @@ static int user_read(struct policydb *p, struct hashtab *h, void *fp)
rc = next_entry(key, fp, len);
if (rc < 0)
goto bad;
key[len] = 0;
key[len] = '\0';

rc = ebitmap_read(&usrdatum->roles, fp);
if (rc)
Expand Down Expand Up @@ -1388,7 +1388,7 @@ static int sens_read(struct policydb *p, struct hashtab *h, void *fp)
rc = next_entry(key, fp, len);
if (rc < 0)
goto bad;
key[len] = 0;
key[len] = '\0';

levdatum->level = kmalloc(sizeof(struct mls_level), GFP_ATOMIC);
if (!levdatum->level) {
Expand Down Expand Up @@ -1440,7 +1440,7 @@ static int cat_read(struct policydb *p, struct hashtab *h, void *fp)
rc = next_entry(key, fp, len);
if (rc < 0)
goto bad;
key[len] = 0;
key[len] = '\0';

rc = hashtab_insert(h, key, catdatum);
if (rc)
Expand Down Expand Up @@ -1523,7 +1523,7 @@ int policydb_read(struct policydb *p, void *fp)
kfree(policydb_str);
goto bad;
}
policydb_str[len] = 0;
policydb_str[len] = '\0';
if (strcmp(policydb_str, POLICYDB_STRING)) {
printk(KERN_ERR "SELinux: policydb string %s does not match "
"my string %s\n", policydb_str, POLICYDB_STRING);
Expand Down

0 comments on commit d555532

Please sign in to comment.