diff options
author | James Morris <james.l.morris@oracle.com> | 2012-05-03 22:46:40 -0400 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2012-05-03 22:46:40 -0400 |
commit | 898bfc1d46bd76f8ea2a0fbd239dd2073efe2aa3 (patch) | |
tree | e6e666085abe674dbf6292555961fe0a0f2e2d2f /security/commoncap.c | |
parent | 08162e6a23d476544adfe1164afe9ea8b34ab859 (diff) | |
parent | 69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff) |
Merge tag 'v3.4-rc5' into next
Linux 3.4-rc5
Merge to pull in prerequisite change for Smack:
86812bb0de1a3758dc6c7aa01a763158a7c0638a
Requested by Casey.
Diffstat (limited to 'security/commoncap.c')
-rw-r--r-- | security/commoncap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index edd3918fac02..f80d11609391 100644 --- a/security/commoncap.c +++ b/security/commoncap.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/securebits.h> | 29 | #include <linux/securebits.h> |
30 | #include <linux/user_namespace.h> | 30 | #include <linux/user_namespace.h> |
31 | #include <linux/binfmts.h> | 31 | #include <linux/binfmts.h> |
32 | #include <linux/personality.h> | ||
32 | 33 | ||
33 | /* | 34 | /* |
34 | * If a non-root user executes a setuid-root binary in | 35 | * If a non-root user executes a setuid-root binary in |
@@ -505,6 +506,11 @@ int cap_bprm_set_creds(struct linux_binprm *bprm) | |||
505 | } | 506 | } |
506 | skip: | 507 | skip: |
507 | 508 | ||
509 | /* if we have fs caps, clear dangerous personality flags */ | ||
510 | if (!cap_issubset(new->cap_permitted, old->cap_permitted)) | ||
511 | bprm->per_clear |= PER_CLEAR_ON_SETID; | ||
512 | |||
513 | |||
508 | /* Don't let someone trace a set[ug]id/setpcap binary with the revised | 514 | /* Don't let someone trace a set[ug]id/setpcap binary with the revised |
509 | * credentials unless they have the appropriate permit. | 515 | * credentials unless they have the appropriate permit. |
510 | * | 516 | * |