diff options
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 9a2264fc42ca..0712380737b3 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -283,8 +283,14 @@ int do_syslog(int type, char __user *buf, int len, bool from_file) | |||
283 | return -EPERM; | 283 | return -EPERM; |
284 | if ((type != SYSLOG_ACTION_READ_ALL && | 284 | if ((type != SYSLOG_ACTION_READ_ALL && |
285 | type != SYSLOG_ACTION_SIZE_BUFFER) && | 285 | type != SYSLOG_ACTION_SIZE_BUFFER) && |
286 | !capable(CAP_SYS_ADMIN)) | 286 | !capable(CAP_SYSLOG)) { |
287 | /* remove after 2.6.38 */ | ||
288 | if (capable(CAP_SYS_ADMIN)) | ||
289 | WARN_ONCE(1, "Attempt to access syslog with " | ||
290 | "CAP_SYS_ADMIN but no CAP_SYSLOG " | ||
291 | "(deprecated and denied).\n"); | ||
287 | return -EPERM; | 292 | return -EPERM; |
293 | } | ||
288 | } | 294 | } |
289 | 295 | ||
290 | error = security_syslog(type); | 296 | error = security_syslog(type); |