]> asedeno.scripts.mit.edu Git - linux.git/commit
SMACK: Do not apply star label in smack_setprocattr hook
authorHimanshu Shukla <himanshu.sh@samsung.com>
Thu, 10 Nov 2016 10:47:49 +0000 (16:17 +0530)
committerCasey Schaufler <casey@schaufler-ca.com>
Thu, 10 Nov 2016 19:21:52 +0000 (11:21 -0800)
commit7128ea159d60a91b3f0a7d10a1ea7d62b53cda93
tree619eac3e523d6f16292dea2704cc9aa217a5b4d9
parent2097f59920ea81516d7783396683cad22c26d140
SMACK: Do not apply star label in smack_setprocattr hook

Smack prohibits processes from using the star ("*") and web ("@") labels.
Checks have been added in other functions. In smack_setprocattr()
hook, only check for web ("@") label has been added and restricted
from applying web ("@") label.
Check for star ("*") label should also be added in smack_setprocattr()
hook. Return error should be "-EINVAL" not "-EPERM" as permission
is there for setting label but not the label value as star ("*") or
web ("@").

Signed-off-by: Himanshu Shukla <himanshu.sh@samsung.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
security/smack/smack_lsm.c