diff options
author | Todd Poynor <toddpoynor@google.com> | 2012-04-30 15:36:56 -0700 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2012-04-30 15:36:56 -0700 |
commit | 5c15664a86e18352ccdc2f501907725caa9ab73d (patch) | |
tree | f8289ea774881961a44d904a3f41f4c17b8facf3 /security | |
parent | 80b8354d535d2e8d6ced0b0e129257dba1fb2130 (diff) | |
parent | f1c84a5cb52ee2915457b481c756fcc1dfe6a471 (diff) | |
download | kernel_samsung_tuna-5c15664a86e18352ccdc2f501907725caa9ab73d.zip kernel_samsung_tuna-5c15664a86e18352ccdc2f501907725caa9ab73d.tar.gz kernel_samsung_tuna-5c15664a86e18352ccdc2f501907725caa9ab73d.tar.bz2 |
Merge commit 'v3.0.30' into android-3.0
Diffstat (limited to 'security')
-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 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 */ |