X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=security%2Fcommoncap.c;h=64c2ed9c90158d1b7df59eff08595566d3dc1927;hb=ebbeb3d6aa22433c218da6f29fd7b3ebc89b87ea;hp=04b80f9912bfc3357f1c4b51dd8877ca345df3cc;hpb=b7e03ec9a6b9d0c0cb1e435026d46dfcd78e48ac;p=~andy%2Flinux diff --git a/security/commoncap.c b/security/commoncap.c index 04b80f9912b..64c2ed9c901 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -27,7 +27,6 @@ #include #include #include -#include /* * If a non-root user executes a setuid-root binary in @@ -883,26 +882,6 @@ error: return error; } -/** - * cap_syslog - Determine whether syslog function is permitted - * @type: Function requested - * @from_file: Whether this request came from an open file (i.e. /proc) - * - * Determine whether the current process is permitted to use a particular - * syslog function, returning 0 if permission is granted, -ve if not. - */ -int cap_syslog(int type, bool from_file) -{ - if (type != SYSLOG_ACTION_OPEN && from_file) - return 0; - if (dmesg_restrict && !capable(CAP_SYS_ADMIN)) - return -EPERM; - if ((type != SYSLOG_ACTION_READ_ALL && - type != SYSLOG_ACTION_SIZE_BUFFER) && !capable(CAP_SYS_ADMIN)) - return -EPERM; - return 0; -} - /** * cap_vm_enough_memory - Determine whether a new virtual mapping is permitted * @mm: The VM space in which the new mapping is to be made