BACKPORT: Kernel threads excluded from smack checks
authorRoman Kubiak <r.kubiak@samsung.com>
Mon, 10 Aug 2015 14:54:25 +0000 (16:54 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Mon, 21 Nov 2016 16:02:04 +0000 (17:02 +0100)
commit783ce03474b2b0663c1e39595a48ea29fa74d9aa
treeae6b4f54ca3f2078d139724169657b0a03917fee
parent16da4bc5411bef02f7cda1b92adcf842464d7e06
BACKPORT: Kernel threads excluded from smack checks

Adds an ignore case for kernel tasks,
so that they can access all resources.

Since kernel worker threads are spawned with
floor label, they are severely restricted by
Smack policy. It is not an issue without onlycap,
as these processes also run with root,
so CAP_MAC_OVERRIDE kicks in. But with onlycap
turned on, there is no way to change the label
for these processes.

Signed-off-by: Roman Kubiak <r.kubiak@samsung.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
(cherry-picked from upstream 41a2d5751616e38d1e293e3cb35a6e2bc7a03473)
security/smack/smack_access.c