BACKPORT: Smack: allow multiple labels in onlycap
authorRafal Krypa <r.krypa@samsung.com>
Tue, 2 Jun 2015 09:23:48 +0000 (11:23 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Mon, 21 Nov 2016 16:02:02 +0000 (17:02 +0100)
commit084c066c84c947aebea8e25572f4c50e783555ec
tree12f47060caa79e0e8fb31097918ffd6e9e415806
parent7d040ea10548adc1647e3f8c8644190e567f936f
BACKPORT: Smack: allow multiple labels in onlycap

Smack onlycap allows limiting of CAP_MAC_ADMIN and CAP_MAC_OVERRIDE to
processes running with the configured label. But having single privileged
label is not enough in some real use cases. On a complex system like Tizen,
there maybe few programs that need to configure Smack policy in run-time
and running them all with a single label is not always practical.
This patch extends onlycap feature for multiple labels. They are configured
in the same smackfs "onlycap" interface, separated by spaces.

Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
(cherry-picked from upstream c0d77c884461fc0dec0411e49797dc3f3651c31b)
Documentation/security/Smack.txt
security/smack/smack.h
security/smack/smack_access.c
security/smack/smackfs.c