diff options
author | Andrew Morton <akpm@osdl.org> | 2004-05-10 00:07:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-10 00:07:45 -0700 |
commit | 19e12876bc6e9be123def8132559a497101fd5e1 (patch) | |
tree | 1b7945bb2aa7dd3701c476c716c63edeca74ef78 /security | |
parent | 110eecfb33d49f8265cfdcf228926d7791154ba1 (diff) | |
download | history-19e12876bc6e9be123def8132559a497101fd5e1.tar.gz |
[PATCH] SElinux interface for reporting size of printk buffer
From: Olaf Dabrunz <od@suse.de>
Add the necessary hooks so that a SELinux-enabled kernel will allow the new
"report the size of the printk buffer" query to work.
Diffstat (limited to 'security')
-rw-r--r-- | security/commoncap.c | 2 | ||||
-rw-r--r-- | security/dummy.c | 2 | ||||
-rw-r--r-- | security/selinux/hooks.c | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index f40fc73705d09b..28956930460a51 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -289,7 +289,7 @@ void cap_task_reparent_to_init (struct task_struct *p) int cap_syslog (int type) { - if ((type != 3) && !capable(CAP_SYS_ADMIN)) + if ((type != 3 && type != 10) && !capable(CAP_SYS_ADMIN)) return -EPERM; return 0; } diff --git a/security/dummy.c b/security/dummy.c index 2a3ca3c7677a14..27fa13b5eeaf01 100644 --- a/security/dummy.c +++ b/security/dummy.c @@ -99,7 +99,7 @@ static int dummy_quota_on (struct file *f) static int dummy_syslog (int type) { - if ((type != 3) && current->euid) + if ((type != 3 && type != 10) && current->euid) return -EPERM; return 0; } diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index e895d0b32c5215..8bbfb89d714349 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -1476,6 +1476,7 @@ static int selinux_syslog(int type) switch (type) { case 3: /* Read last kernel messages */ + case 10: /* Return size of the log buffer */ rc = task_has_system(current, SYSTEM__SYSLOG_READ); break; case 6: /* Disable logging to console */ |