X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=security%2Fcommoncap.c;h=841eb4e5c62b6e91b0e799802791289366bfb45d;hb=5fa28ea42f28342ca6efaa2d23789f3fec5adff6;hp=8a6e097f99ea677acf091800f4bd3797975f9f75;hpb=bf785ee0aeea7a3e717cb1e11df4135b6cbde7da;p=powerpc.git diff --git a/security/commoncap.c b/security/commoncap.c index 8a6e097f99..841eb4e5c6 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -60,8 +60,8 @@ int cap_settime(struct timespec *ts, struct timezone *tz) int cap_ptrace (struct task_struct *parent, struct task_struct *child) { /* Derived from arch/i386/kernel/ptrace.c:sys_ptrace. */ - if (!cap_issubset (child->cap_permitted, current->cap_permitted) && - !capable(CAP_SYS_PTRACE)) + if (!cap_issubset(child->cap_permitted, parent->cap_permitted) && + !__capable(parent, CAP_SYS_PTRACE)) return -EPERM; return 0; }