]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - security/commoncap.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / security / commoncap.c
index 04b80f9912bfc3357f1c4b51dd8877ca345df3cc..64c2ed9c90158d1b7df59eff08595566d3dc1927 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/sched.h>
 #include <linux/prctl.h>
 #include <linux/securebits.h>
-#include <linux/syslog.h>
 
 /*
  * 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