summaryrefslogtreecommitdiff
path: root/fs/proc
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2009-09-16 12:39:10 -0700
committerArve Hjønnevåg <arve@android.com>2010-02-08 15:36:04 -0800
commit5c438f06fd4a07cad15cd6b59da4036f62efd990 (patch)
treeb26ba2ac9e61b0a62bcfc1061c603dfca283f69d /fs/proc
parent90bb75ece868932904865ea46e61b78e5a987224 (diff)
proc: smaps: Allow smaps access for CAP_SYS_RESOURCE
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/base.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index c16bde58ffdb..d7367affea2a 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -247,7 +247,8 @@ struct mm_struct *mm_for_maps(struct task_struct *task)
mm = get_task_mm(task);
if (mm && mm != current->mm &&
- !ptrace_may_access(task, PTRACE_MODE_READ)) {
+ !ptrace_may_access(task, PTRACE_MODE_READ) &&
+ !capable(CAP_SYS_RESOURCE)) {
mmput(mm);
mm = NULL;
}