lkml.org 
[lkml]   [2010]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sysctl: Allow non-root to read mmap_min_addr value
Although /proc/sys/vm/mmap_min_addr has 644 permissions a read call returns
-EPERM. Allow any user to read the mmap_min_addr value.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
---
security/min_addr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/security/min_addr.c b/security/min_addr.c
index e86f297..f728728 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);
--
1.7.1


\
 
 \ /
  Last update: 2010-05-12 11:27    [W:0.109 / U:1.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site