aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-14 07:55:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-14 07:55:42 -0700
commit3ac4e829bd8575e9adea2ba1b9329da363881ffb (patch)
tree1c11ad83f9153db87e1c4d4fb4076e410fb0ae63
parent7ac992ef615c66a05ebb831915935e83c0ec8e05 (diff)
parent4ae69e6b718589abe97c9625ccbb1e0bc95a8c0e (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: mmap_min_addr check CAP_SYS_RAWIO only for write
-rw-r--r--security/min_addr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/min_addr.c b/security/min_addr.c
index e86f297522b..f728728f193 100644
--- a/security/min_addr.c
+++ b/security/min_addr.c
@@ -33,7 +33,7 @@ int mmap_min_addr_handler(struct ctl_table *table, int write,
{
int ret;
- if (!capable(CAP_SYS_RAWIO))
+ if (write && !capable(CAP_SYS_RAWIO))
return -EPERM;
ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);