]> git.karo-electronics.de Git - karo-tx-linux.git/commit
selinux: only invoke capabilities and selinux for CAP_MAC_ADMIN checks
authorStephen Smalley <sds@tycho.nsa.gov>
Thu, 20 Apr 2017 15:31:30 +0000 (11:31 -0400)
committerPaul Moore <paul@paul-moore.com>
Tue, 23 May 2017 14:23:22 +0000 (10:23 -0400)
commitdb59000ab760f8d77b07b7f2898ff61110f88607
treedf6808b9f383cc449bff7630f8448319acaa475c
parent46be14d2b6fbc20c9e7008ec8c28b40609ef6f22
selinux: only invoke capabilities and selinux for CAP_MAC_ADMIN checks

SELinux uses CAP_MAC_ADMIN to control the ability to get or set a raw,
uninterpreted security context unknown to the currently loaded security
policy. When performing these checks, we only want to perform a base
capabilities check and a SELinux permission check.  If any other
modules that implement a capable hook are stacked with SELinux, we do
not want to require them to also have to authorize CAP_MAC_ADMIN,
since it may have different implications for their security model.
Rework the CAP_MAC_ADMIN checks within SELinux to only invoke the
capabilities module and the SELinux permission checking.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/hooks.c