Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201887
b: refs/heads/master
c: 9d623b1
h: refs/heads/master
i:
  201885: 89157ca
  201883: 439ba7e
  201879: 894ceb5
  201871: 7d2dbd6
  201855: f0c69eb
v: v3
  • Loading branch information
Dan Carpenter authored and James Morris committed Aug 2, 2010
1 parent 80bd63d commit 8fdab4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: 5241c1074f6e2f2276d45d857eb5d19fbdc2e4b2
refs/heads/master: 9d623b17a740d5a85c12108cdc71c64fb15484fc
14 changes: 8 additions & 6 deletions trunk/security/selinux/ss/conditional.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum
struct cond_av_list *other = data->other, *list, *cur;
struct avtab_node *node_ptr;
u8 found;

int rc = -EINVAL;

/*
* For type rules we have to make certain there aren't any
Expand Down Expand Up @@ -313,12 +313,15 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum
node_ptr = avtab_insert_nonunique(&p->te_cond_avtab, k, d);
if (!node_ptr) {
printk(KERN_ERR "SELinux: could not insert rule.\n");
rc = -ENOMEM;
goto err;
}

list = kzalloc(sizeof(struct cond_av_list), GFP_KERNEL);
if (!list)
if (!list) {
rc = -ENOMEM;
goto err;
}

list->node = node_ptr;
if (!data->head)
Expand All @@ -331,7 +334,7 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum
err:
cond_av_list_destroy(data->head);
data->head = NULL;
return -1;
return rc;
}

static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list **ret_list, struct cond_av_list *other)
Expand All @@ -345,8 +348,8 @@ static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list *

len = 0;
rc = next_entry(buf, fp, sizeof(u32));
if (rc < 0)
return -1;
if (rc)
return rc;

len = le32_to_cpu(buf[0]);
if (len == 0)
Expand All @@ -361,7 +364,6 @@ static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list *
&data);
if (rc)
return rc;

}

*ret_list = data.head;
Expand Down

0 comments on commit 8fdab4d

Please sign in to comment.