diff options
-rw-r--r-- | include/net/netlabel.h | 2 | ||||
-rw-r--r-- | security/selinux/ss/services.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/net/netlabel.h b/include/net/netlabel.h index 074cad40ac66..d56517ac3bae 100644 --- a/include/net/netlabel.h +++ b/include/net/netlabel.h | |||
@@ -203,7 +203,7 @@ struct netlbl_lsm_secattr { | |||
203 | u32 type; | 203 | u32 type; |
204 | char *domain; | 204 | char *domain; |
205 | struct netlbl_lsm_cache *cache; | 205 | struct netlbl_lsm_cache *cache; |
206 | union { | 206 | struct { |
207 | struct { | 207 | struct { |
208 | struct netlbl_lsm_secattr_catmap *cat; | 208 | struct netlbl_lsm_secattr_catmap *cat; |
209 | u32 lvl; | 209 | u32 lvl; |
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index c8f688a10041..ed0ca649d7db 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -2803,7 +2803,8 @@ int security_netlbl_sid_to_secattr(u32 sid, struct netlbl_lsm_secattr *secattr) | |||
2803 | rc = -ENOMEM; | 2803 | rc = -ENOMEM; |
2804 | goto netlbl_sid_to_secattr_failure; | 2804 | goto netlbl_sid_to_secattr_failure; |
2805 | } | 2805 | } |
2806 | secattr->flags |= NETLBL_SECATTR_DOMAIN_CPY; | 2806 | secattr->attr.secid = sid; |
2807 | secattr->flags |= NETLBL_SECATTR_DOMAIN_CPY | NETLBL_SECATTR_SECID; | ||
2807 | mls_export_netlbl_lvl(ctx, secattr); | 2808 | mls_export_netlbl_lvl(ctx, secattr); |
2808 | rc = mls_export_netlbl_cat(ctx, secattr); | 2809 | rc = mls_export_netlbl_cat(ctx, secattr); |
2809 | if (rc != 0) | 2810 | if (rc != 0) |