aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-08-10 18:07:59 -0700
committerColin Cross <ccross@android.com>2011-08-10 18:07:59 -0700
commit9abd59b0df155835a970c2b9c8f93367eb793797 (patch)
treebcf0868f831d204e2b582113c53b8de3ff015eca /security
parent4e111751cfcb75f26d2725eab934b6eb91a3d115 (diff)
parent94ed5b4788a7cdbe68bc7cb8516972cbebdc8274 (diff)
downloadkernel_samsung_crespo-9abd59b0df155835a970c2b9c8f93367eb793797.zip
kernel_samsung_crespo-9abd59b0df155835a970c2b9c8f93367eb793797.tar.gz
kernel_samsung_crespo-9abd59b0df155835a970c2b9c8f93367eb793797.tar.bz2
Merge commit 'v3.0.1' into android-3.0
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/domain.c2
-rw-r--r--security/apparmor/lsm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index c825c6e..78adc43 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -73,7 +73,6 @@ static int may_change_ptraced_domain(struct task_struct *task,
cred = get_task_cred(tracer);
tracerp = aa_cred_profile(cred);
}
- rcu_read_unlock();
/* not ptraced */
if (!tracer || unconfined(tracerp))
@@ -82,6 +81,7 @@ static int may_change_ptraced_domain(struct task_struct *task,
error = aa_may_ptrace(tracer, tracerp, to_profile, PTRACE_MODE_ATTACH);
out:
+ rcu_read_unlock();
if (cred)
put_cred(cred);
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 3d2fd14..3783202 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -127,7 +127,7 @@ static int apparmor_capget(struct task_struct *target, kernel_cap_t *effective,
*inheritable = cred->cap_inheritable;
*permitted = cred->cap_permitted;
- if (!unconfined(profile)) {
+ if (!unconfined(profile) && !COMPLAIN_MODE(profile)) {
*effective = cap_intersect(*effective, profile->caps.allow);
*permitted = cap_intersect(*permitted, profile->caps.allow);
}