projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
755d3f1
)
proc: smaps: Allow smaps access for CAP_SYS_RESOURCE
author
San Mehat
<san@google.com>
Wed, 16 Sep 2009 19:39:10 +0000
(12:39 -0700)
committer
Colin Cross
<ccross@android.com>
Thu, 30 Sep 2010 00:49:24 +0000
(17:49 -0700)
Signed-off-by: San Mehat <san@google.com>
fs/proc/base.c
patch
|
blob
|
history
diff --git
a/fs/proc/base.c
b/fs/proc/base.c
index 98b902d424da8732dd7ee17a76f32744e7bd5c31..a495be632cf712b63877cfc093a4818249bf4070 100644
(file)
--- a/
fs/proc/base.c
+++ b/
fs/proc/base.c
@@
-237,7
+237,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;
}