]> git.baikalelectronics.ru Git - kernel.git/commit
capabilities/syslog: open code cap_syslog logic to fix build failure
authorEric Paris <eparis@redhat.com>
Mon, 15 Nov 2010 23:36:29 +0000 (18:36 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 15 Nov 2010 23:40:01 +0000 (15:40 -0800)
commit9d008d7d5f9fa5d163f195fe30f11586b4808eee
treeb97d0f209f363cfad94ce9d075312274e349da89
parente3d836929ee27a7d4f50d1582e5cff670e18a13f
capabilities/syslog: open code cap_syslog logic to fix build failure

The addition of CONFIG_SECURITY_DMESG_RESTRICT resulted in a build
failure when CONFIG_PRINTK=n.  This is because the capabilities code
which used the new option was built even though the variable in question
didn't exist.

The patch here fixes this by moving the capabilities checks out of the
LSM and into the caller.  All (known) LSMs should have been calling the
capabilities hook already so it actually makes the code organization
better to eliminate the hook altogether.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/security.h
kernel/printk.c
security/capability.c
security/commoncap.c
security/security.c
security/selinux/hooks.c
security/smack/smack_lsm.c