diff options
author | José Bollo <jobol@nonadev.net> | 2015-10-02 15:15:56 +0200 |
---|---|---|
committer | Casey Schaufler <casey@schaufler-ca.com> | 2015-10-09 15:13:24 -0700 |
commit | d21b7b049c0c1753a10c1d01606f42bad0e0f733 (patch) | |
tree | 5e16c920a3229464a37b0cea3ed122f36650eac6 /security/smack/smackfs.c | |
parent | 8b549ef42a26f4ef604a9ede84f0260103942727 (diff) | |
download | linux-d21b7b049c0c1753a10c1d01606f42bad0e0f733.tar.gz linux-d21b7b049c0c1753a10c1d01606f42bad0e0f733.tar.bz2 linux-d21b7b049c0c1753a10c1d01606f42bad0e0f733.zip |
Smack: Minor initialisation improvement
This change has two goals:
- delay the setting of 'smack_enabled' until
it will be really effective
- ensure that smackfs is valid only if 'smack_enabled'
is set (it is already the case in smack_netfilter.c)
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security/smack/smackfs.c')
-rw-r--r-- | security/smack/smackfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 103a619b1360..ce8d503a18a0 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c @@ -2892,7 +2892,7 @@ static int __init init_smk_fs(void) int err; int rc; - if (!security_module_enable("smack")) + if (smack_enabled == 0) return 0; err = smk_init_sysfs(); |