diff options
author | James Morris <jmorris@namei.org> | 2011-06-30 10:44:55 +0200 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-06-30 10:44:55 +0200 |
commit | da3f1c7b7d34e66cf571a613525ca0d23f92d42f (patch) | |
tree | 0233826259cbe4cd44755ccc893b77a3e8ac5213 /security | |
parent | Merge branch 'linus' into next (diff) | |
parent | AppArmor: Fix masking of capabilities in complain mode (diff) | |
download | linux-da3f1c7b7d34e66cf571a613525ca0d23f92d42f.tar.xz linux-da3f1c7b7d34e66cf571a613525ca0d23f92d42f.zip |
Merge branch 'for-security' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/apparmor-dev into next
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/domain.c | 2 | ||||
-rw-r--r-- | security/apparmor/lsm.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c index c825c6e0b636..78adc4303efa 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 3d2fd141dff7..37832026e58a 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); } |