diff options
author | Michal Marek <mmarek@suse.cz> | 2010-12-01 07:13:56 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-12-01 07:13:56 -0500 |
commit | 307991055b0ce65d53dc1eb501c456c10eb36360 (patch) | |
tree | 71bb9263dc71344e5d7b97ca6d5cf223f1f1a856 /security/commoncap.c | |
parent | 1198c6d45a1ef5f4f7fdfbf33ef7d270493ec575 (diff) | |
parent | 9b4320b77bab4031649c484da1c595f39c2e43cd (diff) |
Merge branch 'kconfig_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-next into kbuild/rc-fixes
Diffstat (limited to 'security/commoncap.c')
-rw-r--r-- | security/commoncap.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index 5e632b4857e4..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,24 +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 ((type != SYSLOG_ACTION_READ_ALL && | ||
899 | type != SYSLOG_ACTION_SIZE_BUFFER) && !capable(CAP_SYS_ADMIN)) | ||
900 | return -EPERM; | ||
901 | return 0; | ||
902 | } | ||
903 | |||
904 | /** | ||
905 | * 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 |
906 | * @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 |
907 | * @pages: The size of the mapping | 888 | * @pages: The size of the mapping |