Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110760
b: refs/heads/master
c: 81990fb
h: refs/heads/master
v: v3
  • Loading branch information
Paul Moore authored and James Morris committed Oct 3, 2008
1 parent 35709b7 commit 797d29c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 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: ea6b184f7d521a503ecab71feca6e4057562252b
refs/heads/master: 81990fbdd18b9cfdc93dc221ff3250f81468aed8
11 changes: 4 additions & 7 deletions trunk/security/selinux/ss/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -2907,6 +2907,7 @@ int security_netlbl_secattr_to_sid(struct netlbl_lsm_secattr *secattr,
if (ctx == NULL)
goto netlbl_secattr_to_sid_return;

context_init(&ctx_new);
ctx_new.user = ctx->user;
ctx_new.role = ctx->role;
ctx_new.type = ctx->type;
Expand All @@ -2915,13 +2916,9 @@ int security_netlbl_secattr_to_sid(struct netlbl_lsm_secattr *secattr,
if (ebitmap_netlbl_import(&ctx_new.range.level[0].cat,
secattr->attr.mls.cat) != 0)
goto netlbl_secattr_to_sid_return;
ctx_new.range.level[1].cat.highbit =
ctx_new.range.level[0].cat.highbit;
ctx_new.range.level[1].cat.node =
ctx_new.range.level[0].cat.node;
} else {
ebitmap_init(&ctx_new.range.level[0].cat);
ebitmap_init(&ctx_new.range.level[1].cat);
memcpy(&ctx_new.range.level[1].cat,
&ctx_new.range.level[0].cat,
sizeof(ctx_new.range.level[0].cat));
}
if (mls_context_isvalid(&policydb, &ctx_new) != 1)
goto netlbl_secattr_to_sid_return_cleanup;
Expand Down

0 comments on commit 797d29c

Please sign in to comment.