Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184907
b: refs/heads/master
c: 42596ea
h: refs/heads/master
i:
  184905: 5f1ffc4
  184903: dbbddd3
v: v3
  • Loading branch information
Guido Trentalancia authored and James Morris committed Feb 3, 2010
1 parent 01c1d51 commit c80f2a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 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: b6cac5a30b325e14cda425670bb3568d3cad0aa8
refs/heads/master: 42596eafdd75257a640f64701b9b07090bcd84b0
16 changes: 12 additions & 4 deletions trunk/security/selinux/ss/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,10 @@ static int clone_sid(u32 sid,
{
struct sidtab *s = arg;

return sidtab_insert(s, sid, context);
if (sid > SECINITSID_NUM)
return sidtab_insert(s, sid, context);
else
return 0;
}

static inline int convert_context_handle_invalid_context(struct context *context)
Expand Down Expand Up @@ -1552,7 +1555,10 @@ static int convert_context(u32 key,
struct user_datum *usrdatum;
char *s;
u32 len;
int rc;
int rc = 0;

if (key <= SECINITSID_NUM)
goto out;

args = p;

Expand Down Expand Up @@ -1712,9 +1718,11 @@ int security_load_policy(void *data, size_t len)
if (policydb_read(&newpolicydb, fp))
return -EINVAL;

if (sidtab_init(&newsidtab)) {
rc = policydb_load_isids(&newpolicydb, &newsidtab);
if (rc) {
printk(KERN_ERR "SELinux: unable to load the initial SIDs\n");
policydb_destroy(&newpolicydb);
return -ENOMEM;
return rc;
}

if (selinux_set_mapping(&newpolicydb, secclass_map,
Expand Down

0 comments on commit c80f2a7

Please sign in to comment.