diff options
author | Todd Poynor <toddpoynor@google.com> | 2012-04-30 15:45:33 -0700 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2012-04-30 15:45:33 -0700 |
commit | 7a0198f07b75c9564212f039e1fa3956926386a2 (patch) | |
tree | c5873f225d91947f0edc5a82ad36936c39773ae2 /security | |
parent | 03fb8f57c5dd5530c5bcfcd3eabc632456accf75 (diff) | |
parent | 5c15664a86e18352ccdc2f501907725caa9ab73d (diff) | |
download | kernel_samsung_tuna-7a0198f07b75c9564212f039e1fa3956926386a2.zip kernel_samsung_tuna-7a0198f07b75c9564212f039e1fa3956926386a2.tar.gz kernel_samsung_tuna-7a0198f07b75c9564212f039e1fa3956926386a2.tar.bz2 |
Merge branch 'android-3.0' into android-omap-3.0
Conflicts:
drivers/usb/musb/omap2430.c
Change-Id: Iebe1aa88ead0d6128a5d5f426bbc0342827e238a
Signed-off-by: Todd Poynor <toddpoynor@google.com>
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 */ |