BACKPORT: Smack: Minor initialisation improvement
authorJosé Bollo <jobol@nonadev.net>
Fri, 2 Oct 2015 13:15:56 +0000 (15:15 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Mon, 21 Nov 2016 16:02:06 +0000 (17:02 +0100)
commit6e407dc42951621fea4dda77262255c30718b8e7
treedc152e678faa671a74185fb941b3ee445a56b861
parent245dbb5a91ddec78a24b58160c0afc31d854980d
BACKPORT: 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>
(cherry-picked from upstream d21b7b049c0c1753a10c1d01606f42bad0e0f733)
security/smack/smack_lsm.c
security/smack/smackfs.c