X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=sidebyside;f=security%2Fcommoncap.c;h=384379ede4fd7c0f0e1a5c78c4ee9c70ce9f5cbb;hb=3c2ad469c317147fc1de19579f8173ddb68a9e91;hp=f50fc298cf801991879bee1de094dd56671562c3;hpb=6ab3d5624e172c553004ecc862bfeac16d9d68b7;p=powerpc.git diff --git a/security/commoncap.c b/security/commoncap.c index f50fc298cf..384379ede4 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -169,7 +168,7 @@ void cap_bprm_apply_creds (struct linux_binprm *bprm, int unsafe) /* For init, we want to retain the capabilities set * in the init_task struct. Thus we skip the usual * capability rules */ - if (current->pid != 1) { + if (!is_init(current)) { current->cap_permitted = new_permitted; current->cap_effective = cap_intersect (new_permitted, bprm->cap_effective);