proc: smaps: Allow smaps access for CAP_SYS_RESOURCE

Signed-off-by: San Mehat <san@google.com>
This commit is contained in:
San Mehat 2009-09-16 12:39:10 -07:00 committed by Arve Hjønnevåg
parent 1cd2b0c882
commit d590b5b695

View file

@ -696,7 +696,8 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
mm = get_task_mm(task);
if (mm && mm != current->mm &&
!ptrace_may_access(task, mode)) {
!ptrace_may_access(task, mode) &&
!capable(CAP_SYS_RESOURCE)) {
mmput(mm);
mm = ERR_PTR(-EACCES);
}