diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2012-05-02 19:20:03 +0400 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-05-02 19:21:21 +0400 |
| commit | 87c35c56f4beed9e43bd41427643215655a31c3d (patch) | |
| tree | a4a29370bbb16ecf1864751def0a9b7ad0629476 /security/commoncap.c | |
| parent | d1ef5bd711b6b01e6a73cf186245d19939882706 (diff) | |
| parent | ee9581d7adaeb2d04b01e3567e2355ceb5f43ad1 (diff) | |
| download | linux-87c35c56f4beed9e43bd41427643215655a31c3d.tar.xz | |
Merge branch 'ux500-u9540-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/newsoc
From: Linus Walleij <linus.walleij@linaro.org>:
Core support for the U9540 after finalized review
* 'ux500-u9540-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: (2 commits)
ARM: ux500: ioremap differences for DB9540
ARM: ux500: core U9540 support
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
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 0cf4b53480a7..71a166a05975 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -29,6 +29,7 @@ #include <linux/securebits.h> #include <linux/user_namespace.h> #include <linux/binfmts.h> +#include <linux/personality.h> /* * If a non-root user executes a setuid-root binary in @@ -505,6 +506,11 @@ int cap_bprm_set_creds(struct linux_binprm *bprm) } skip: + /* if we have fs caps, clear dangerous personality flags */ + if (!cap_issubset(new->cap_permitted, old->cap_permitted)) + bprm->per_clear |= PER_CLEAR_ON_SETID; + + /* Don't let someone trace a set[ug]id/setpcap binary with the revised * credentials unless they have the appropriate permit */ |
