diff options
author | Todd Poynor <toddpoynor@google.com> | 2012-04-30 15:46:45 -0700 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2012-04-30 15:46:45 -0700 |
commit | 8d953a0693af2aa24e3161d6c21b1a71c04e3a94 (patch) | |
tree | ac5c807a67589d3b54bd5fc5dff9b8ed41e6e50b /security | |
parent | 4f46b5bf26ecd00d8089eabf72c14a20a8b4ad90 (diff) | |
parent | 2d076125c8f0662b2e65fae31c458ffed946ead6 (diff) | |
download | kernel_samsung_tuna-8d953a0693af2aa24e3161d6c21b1a71c04e3a94.zip kernel_samsung_tuna-8d953a0693af2aa24e3161d6c21b1a71c04e3a94.tar.gz kernel_samsung_tuna-8d953a0693af2aa24e3161d6c21b1a71c04e3a94.tar.bz2 |
Merge branch 'android-omap-3.0' into android-omap-tuna-3.0
Conflicts:
drivers/usb/core/hub.c
Change-Id: I14aa30a2a4a5d459a610eb6814ace20716f79430
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 */ |