aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2012-04-30 15:36:56 -0700
committerTodd Poynor <toddpoynor@google.com>2012-04-30 15:36:56 -0700
commit5c15664a86e18352ccdc2f501907725caa9ab73d (patch)
treef8289ea774881961a44d904a3f41f4c17b8facf3 /security
parent80b8354d535d2e8d6ced0b0e129257dba1fb2130 (diff)
parentf1c84a5cb52ee2915457b481c756fcc1dfe6a471 (diff)
downloadkernel_samsung_aries-5c15664a86e18352ccdc2f501907725caa9ab73d.zip
kernel_samsung_aries-5c15664a86e18352ccdc2f501907725caa9ab73d.tar.gz
kernel_samsung_aries-5c15664a86e18352ccdc2f501907725caa9ab73d.tar.bz2
Merge commit 'v3.0.30' into android-3.0
Diffstat (limited to 'security')
-rw-r--r--security/commoncap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index 1322b6a..ccfe568 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -28,6 +28,7 @@
#include <linux/prctl.h>
#include <linux/securebits.h>
#include <linux/user_namespace.h>
+#include <linux/personality.h>
#ifdef CONFIG_ANDROID_PARANOID_NETWORK
#include <linux/android_aid.h>
@@ -519,6 +520,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
*/