Ensure that all netlabel flags are correctly set on the netlabel attribute of a newly imported Smack label. Signed-off-by: Casey Schaufler <casey@xxxxxxxxxxxxxxxx> --- security/smack/smackfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index abaa5325c32f..0abfa4315fb1 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c @@ -931,6 +931,9 @@ static ssize_t smk_set_cipso(struct file *file, const char __user *buf, smack_catset_bit(cat, mapcatset); } + skp->smk_netlabel.flags = NETLBL_SECATTR_DOMAIN | + NETLBL_SECATTR_MLS_LVL | + NETLBL_SECATTR_SECID; rc = smk_netlbl_mls(maplevel, mapcatset, &ncats, SMK_CIPSOLEN); if (rc >= 0) { netlbl_catmap_free(skp->smk_netlabel.attr.mls.cat); -- 2.17.0