mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sysctl: Allow non-root to read mmap_min_addr value
@ 2010-05-12  8:39 Adam Lackorzynski
  0 siblings, 0 replies; only message in thread
From: Adam Lackorzynski @ 2010-05-12  8:39 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-12  9:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-12  8:39 [PATCH] sysctl: Allow non-root to read mmap_min_addr value Adam Lackorzynski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®