Skip to content

Commit

Permalink
netlabel: Changes to the NetLabel security attributes to allow LSMs t…
Browse files Browse the repository at this point in the history
…o pass full contexts

This patch provides support for including the LSM's secid in addition to
the LSM's MLS information in the NetLabel security attributes structure.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: James Morris <jmorris@namei.org>
  • Loading branch information
Paul Moore committed Oct 10, 2008
1 parent 6c5b3fc commit 8d75899
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/net/netlabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ struct netlbl_lsm_secattr {
u32 type;
char *domain;
struct netlbl_lsm_cache *cache;
union {
struct {
struct {
struct netlbl_lsm_secattr_catmap *cat;
u32 lvl;
Expand Down
3 changes: 2 additions & 1 deletion security/selinux/ss/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -2803,7 +2803,8 @@ int security_netlbl_sid_to_secattr(u32 sid, struct netlbl_lsm_secattr *secattr)
rc = -ENOMEM;
goto netlbl_sid_to_secattr_failure;
}
secattr->flags |= NETLBL_SECATTR_DOMAIN_CPY;
secattr->attr.secid = sid;
secattr->flags |= NETLBL_SECATTR_DOMAIN_CPY | NETLBL_SECATTR_SECID;
mls_export_netlbl_lvl(ctx, secattr);
rc = mls_export_netlbl_cat(ctx, secattr);
if (rc != 0)
Expand Down

0 comments on commit 8d75899

Please sign in to comment.