summaryrefslogtreecommitdiffstats
path: root/security/smack/smackfs.c
diff options
context:
space:
mode:
authorCasey Schaufler <casey@schaufler-ca.com>2016-11-14 18:38:15 +0100
committerCasey Schaufler <casey@schaufler-ca.com>2016-11-15 18:34:39 +0100
commit152f91d4d11a30106b9cc0b27b47e0e80b633ee8 (patch)
tree33fdd28f8075586b8c11ea4175400b51cd8eb38c /security/smack/smackfs.c
parentSmack: Use GFP_KERNEL for smack_parse_opts_str(). (diff)
downloadlinux-152f91d4d11a30106b9cc0b27b47e0e80b633ee8.tar.xz
linux-152f91d4d11a30106b9cc0b27b47e0e80b633ee8.zip
Smack: Remove unnecessary smack_known_invalid
The invalid Smack label ("") and the Huh ("?") Smack label serve the same purpose and having both is unnecessary. While pulling out the invalid label it became clear that the use of smack_from_secid() was inconsistent, so that is repaired. The setting of inode labels to the invalid label could never happen in a functional system, has never been observed in the wild and is not what you'd really want for a failure behavior in any case. That is removed. Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security/smack/smackfs.c')
-rw-r--r--security/smack/smackfs.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index 6492fe96cae4..13743a01b35b 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -2998,9 +2998,6 @@ static int __init init_smk_fs(void)
rc = smk_preset_netlabel(&smack_known_huh);
if (err == 0 && rc < 0)
err = rc;
- rc = smk_preset_netlabel(&smack_known_invalid);
- if (err == 0 && rc < 0)
- err = rc;
rc = smk_preset_netlabel(&smack_known_star);
if (err == 0 && rc < 0)
err = rc;