Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfi...
[sfrench/cifs-2.6.git] / security / commoncap.c
index f50fc298cf801991879bee1de094dd56671562c3..384379ede4fd7c0f0e1a5c78c4ee9c70ce9f5cbb 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/mman.h>
 #include <linux/pagemap.h>
 #include <linux/swap.h>
-#include <linux/smp_lock.h>
 #include <linux/skbuff.h>
 #include <linux/netlink.h>
 #include <linux/ptrace.h>
@@ -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);