diff options
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r-- | kernel/ptrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index a70d2a5d8c7b..210bbf045ee9 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -196,7 +196,7 @@ ok: | |||
196 | smp_rmb(); | 196 | smp_rmb(); |
197 | if (task->mm) | 197 | if (task->mm) |
198 | dumpable = get_dumpable(task->mm); | 198 | dumpable = get_dumpable(task->mm); |
199 | if (!dumpable && !task_ns_capable(task, CAP_SYS_PTRACE)) | 199 | if (!dumpable && !ns_capable(task_user_ns(task), CAP_SYS_PTRACE)) |
200 | return -EPERM; | 200 | return -EPERM; |
201 | 201 | ||
202 | return security_ptrace_access_check(task, mode); | 202 | return security_ptrace_access_check(task, mode); |
@@ -266,7 +266,7 @@ static int ptrace_attach(struct task_struct *task, long request, | |||
266 | task->ptrace = PT_PTRACED; | 266 | task->ptrace = PT_PTRACED; |
267 | if (seize) | 267 | if (seize) |
268 | task->ptrace |= PT_SEIZED; | 268 | task->ptrace |= PT_SEIZED; |
269 | if (task_ns_capable(task, CAP_SYS_PTRACE)) | 269 | if (ns_capable(task_user_ns(task), CAP_SYS_PTRACE)) |
270 | task->ptrace |= PT_PTRACE_CAP; | 270 | task->ptrace |= PT_PTRACE_CAP; |
271 | 271 | ||
272 | __ptrace_link(task, current); | 272 | __ptrace_link(task, current); |