mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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]>
This commit is contained in:
1 parent
1d6d75684d
commit
ce6ada35bd
3 files changed
+13
-4
No files matched your search
@@ -246,7 +246,6 @@ struct cpu_vfs_cap_data {
|
||||
/* Allow configuration of the secure attention key */
|
||||
/* Allow administration of the random device */
|
||||
/* Allow examination and configuration of disk quotas */
|
||||
/* Allow configuring the kernel's syslog (printk behaviour) */
|
||||
/* Allow setting the domainname */
|
||||
/* Allow setting the hostname */
|
||||
/* Allow calling bdflush() */
|
||||
@@ -352,7 +351,11 @@ struct cpu_vfs_cap_data {
|
||||
|
||||
#define CAP_MAC_ADMIN 33
|
||||
|
||||
#define CAP_LAST_CAP CAP_MAC_ADMIN
|
||||
/* Allow configuring the kernel's syslog (printk behaviour) */
|
||||
|
||||
#define CAP_SYSLOG 34
|
||||
|
||||
#define CAP_LAST_CAP CAP_SYSLOG
|
||||
|
||||
#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
|
||||
|
||||
|
||||
Reference in new issue
Block a user