diff options
author | David S. Miller <davem@davemloft.net> | 2010-12-27 01:37:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-27 01:37:05 -0500 |
commit | 17f7f4d9fcce8f1b75b5f735569309dee7665968 (patch) | |
tree | 14d7e49ca0053a0fcab3c33b5023bf3f90c5c08a /security/commoncap.c | |
parent | 041110a439e21cd40709ead4ffbfa8034619ad77 (diff) | |
parent | d7c1255a3a21e98bdc64df8ccf005a174d7e6289 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/ipv4/fib_frontend.c
Diffstat (limited to 'security/commoncap.c')
-rw-r--r-- | security/commoncap.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index 04b80f9912bf..64c2ed9c9015 100644 --- a/security/commoncap.c +++ b/security/commoncap.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/prctl.h> | 28 | #include <linux/prctl.h> |
29 | #include <linux/securebits.h> | 29 | #include <linux/securebits.h> |
30 | #include <linux/syslog.h> | ||
31 | 30 | ||
32 | /* | 31 | /* |
33 | * If a non-root user executes a setuid-root binary in | 32 | * If a non-root user executes a setuid-root binary in |
@@ -884,26 +883,6 @@ error: | |||
884 | } | 883 | } |
885 | 884 | ||
886 | /** | 885 | /** |
887 | * cap_syslog - Determine whether syslog function is permitted | ||
888 | * @type: Function requested | ||
889 | * @from_file: Whether this request came from an open file (i.e. /proc) | ||
890 | * | ||
891 | * Determine whether the current process is permitted to use a particular | ||
892 | * syslog function, returning 0 if permission is granted, -ve if not. | ||
893 | */ | ||
894 | int cap_syslog(int type, bool from_file) | ||
895 | { | ||
896 | if (type != SYSLOG_ACTION_OPEN && from_file) | ||
897 | return 0; | ||
898 | if (dmesg_restrict && !capable(CAP_SYS_ADMIN)) | ||
899 | return -EPERM; | ||
900 | if ((type != SYSLOG_ACTION_READ_ALL && | ||
901 | type != SYSLOG_ACTION_SIZE_BUFFER) && !capable(CAP_SYS_ADMIN)) | ||
902 | return -EPERM; | ||
903 | return 0; | ||
904 | } | ||
905 | |||
906 | /** | ||
907 | * cap_vm_enough_memory - Determine whether a new virtual mapping is permitted | 886 | * cap_vm_enough_memory - Determine whether a new virtual mapping is permitted |
908 | * @mm: The VM space in which the new mapping is to be made | 887 | * @mm: The VM space in which the new mapping is to be made |
909 | * @pages: The size of the mapping | 888 | * @pages: The size of the mapping |