security: Define CAP_SYSLOG
authorSerge E. Hallyn <[email protected]>
Thu, 25 Nov 2010 17:11:32 +0000 (17:11 +0000)
committerJames Morris <[email protected]>
Sun, 28 Nov 2010 21:35:12 +0000 (08:35 +1100)
commitce6ada35bdf710d16582cc4869c26722547e6f11
treec2b5fd46c883f4b7285b191bac55940022662b43
parent1d6d75684d869406e5bb2ac5d3ed9454f52d0cab
security: Define CAP_SYSLOG

Privileged syslog operations currently require CAP_SYS_ADMIN.  Split
this off into a new CAP_SYSLOG privilege which we can sanely take away
from a container through the capability bounding set.

With this patch, an lxc container can be prevented from messing with
the host's syslog (i.e. dmesg -c).

Changelog: mar 12 2010: add selinux capability2:cap_syslog perm
Changelog: nov 22 2010:
. port to new kernel
. add a WARN_ONCE if userspace isn't using CAP_SYSLOG

Signed-off-by: Serge Hallyn <[email protected]>
Acked-by: Andrew G. Morgan <[email protected]>
Acked-By: Kees Cook <[email protected]>
Cc: James Morris <[email protected]>
Cc: Michael Kerrisk <[email protected]>
Cc: Stephen Smalley <[email protected]>
Cc: "Christopher J. PeBenito" <[email protected]>
Cc: Eric Paris <[email protected]>
Signed-off-by: James Morris <[email protected]>
include/linux/capability.h
kernel/printk.c
security/selinux/include/classmap.h