git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[pandora-kernel.git]
/
kernel
/
printk.c
diff --git
a/kernel/printk.c
b/kernel/printk.c
index
4642a5c
..
f64b899
100644
(file)
--- a/
kernel/printk.c
+++ b/
kernel/printk.c
@@
-273,12
+273,12
@@
int do_syslog(int type, char __user *buf, int len, bool from_file)
* at open time.
*/
if (type == SYSLOG_ACTION_OPEN || !from_file) {
* at open time.
*/
if (type == SYSLOG_ACTION_OPEN || !from_file) {
- if (dmesg_restrict && !capable(CAP_SYS
_ADMIN
))
- return -EPERM;
+ if (dmesg_restrict && !capable(CAP_SYS
LOG
))
+ goto warn; /* switch to return -EPERM after 2.6.39 */
if ((type != SYSLOG_ACTION_READ_ALL &&
type != SYSLOG_ACTION_SIZE_BUFFER) &&
if ((type != SYSLOG_ACTION_READ_ALL &&
type != SYSLOG_ACTION_SIZE_BUFFER) &&
- !capable(CAP_SYS
_ADMIN
))
- return -EPERM;
+ !capable(CAP_SYS
LOG
))
+ goto warn; /* switch to return -EPERM after 2.6.39 */
}
error = security_syslog(type);
}
error = security_syslog(type);
@@
-422,6
+422,12
@@
int do_syslog(int type, char __user *buf, int len, bool from_file)
}
out:
return error;
}
out:
return error;
+warn:
+ /* remove after 2.6.39 */
+ if (capable(CAP_SYS_ADMIN))
+ WARN_ONCE(1, "Attempt to access syslog with CAP_SYS_ADMIN "
+ "but no CAP_SYSLOG (deprecated and denied).\n");
+ return -EPERM;
}
SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len)
}
SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len)