summaryrefslogtreecommitdiff
path: root/security/commoncap.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2011-05-24 22:55:24 +1000
committerJames Morris <jmorris@namei.org>2011-05-24 22:55:24 +1000
commit434d42cfd05a7cc452457a81d2029540cba12150 (patch)
tree3a6b9b7f9ff2e1b7409dd66c15242b2a75aa4422 /security/commoncap.c
parentd762f4383100c2a87b1a3f2d678cd3b5425655b4 (diff)
parent12a5a2621b1ee14d32beca35304d7c6076a58815 (diff)
Merge branch 'next' into for-linus
Diffstat (limited to 'security/commoncap.c')
-rw-r--r--security/commoncap.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index f20e984ccfb4..a93b3b733079 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -529,15 +529,10 @@ skip:
new->suid = new->fsuid = new->euid;
new->sgid = new->fsgid = new->egid;
- /* For init, we want to retain the capabilities set in the initial
- * task. Thus we skip the usual capability rules
- */
- if (!is_global_init(current)) {
- if (effective)
- new->cap_effective = new->cap_permitted;
- else
- cap_clear(new->cap_effective);
- }
+ if (effective)
+ new->cap_effective = new->cap_permitted;
+ else
+ cap_clear(new->cap_effective);
bprm->cap_effective = effective;
/*