diff options
Diffstat (limited to 'security/selinux/ss/services.c')
-rw-r--r-- | security/selinux/ss/services.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 4bf715d4cf29..0f97ef578370 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -2550,6 +2550,9 @@ int security_netlbl_secattr_to_sid(struct netlbl_lsm_secattr *secattr, | |||
2550 | default: | 2550 | default: |
2551 | goto netlbl_secattr_to_sid_return; | 2551 | goto netlbl_secattr_to_sid_return; |
2552 | } | 2552 | } |
2553 | } else if (secattr->flags & NETLBL_SECATTR_SECID) { | ||
2554 | *sid = secattr->attr.secid; | ||
2555 | rc = 0; | ||
2553 | } else if (secattr->flags & NETLBL_SECATTR_MLS_LVL) { | 2556 | } else if (secattr->flags & NETLBL_SECATTR_MLS_LVL) { |
2554 | ctx = sidtab_search(&sidtab, base_sid); | 2557 | ctx = sidtab_search(&sidtab, base_sid); |
2555 | if (ctx == NULL) | 2558 | if (ctx == NULL) |
@@ -2561,7 +2564,7 @@ int security_netlbl_secattr_to_sid(struct netlbl_lsm_secattr *secattr, | |||
2561 | mls_import_netlbl_lvl(&ctx_new, secattr); | 2564 | mls_import_netlbl_lvl(&ctx_new, secattr); |
2562 | if (secattr->flags & NETLBL_SECATTR_MLS_CAT) { | 2565 | if (secattr->flags & NETLBL_SECATTR_MLS_CAT) { |
2563 | if (ebitmap_netlbl_import(&ctx_new.range.level[0].cat, | 2566 | if (ebitmap_netlbl_import(&ctx_new.range.level[0].cat, |
2564 | secattr->mls_cat) != 0) | 2567 | secattr->attr.mls.cat) != 0) |
2565 | goto netlbl_secattr_to_sid_return; | 2568 | goto netlbl_secattr_to_sid_return; |
2566 | ctx_new.range.level[1].cat.highbit = | 2569 | ctx_new.range.level[1].cat.highbit = |
2567 | ctx_new.range.level[0].cat.highbit; | 2570 | ctx_new.range.level[0].cat.highbit; |