syslog: distinguish between /proc/kmsg and syscalls
authorKees Cook <kees.cook@canonical.com>
Tue, 2 Feb 2010 05:21:17 +0000 (21:21 -0800)
committerMatt Sealey <matt@genesi-usa.com>
Thu, 4 Nov 2010 17:25:01 +0000 (12:25 -0500)
commit4e256541b8cdd8bf8f5eeff701529ca55b3c459a
treea138fcfe9ba4ca4d2d30f4fb706b9056b5f8ebae
parent9492eac13b42a11367864aa7142677148f20bfe2
syslog: distinguish between /proc/kmsg and syscalls

This allows the LSM to distinguish between syslog functions originating
from /proc/kmsg access and direct syscalls.  By default, the commoncaps
will now no longer require CAP_SYS_ADMIN to read an opened /proc/kmsg
file descriptor.  For example the kernel syslog reader can now drop
privileges after opening /proc/kmsg, instead of staying privileged with
CAP_SYS_ADMIN.  MAC systems that implement security_syslog have unchanged
behavior.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
fs/proc/kmsg.c
include/linux/security.h
include/linux/syslog.h [new file with mode: 0644]
kernel/printk.c
security/commoncap.c
security/security.c
security/selinux/hooks.c
security/smack/smack_lsm.c