Commit da3f1c7b authored by James Morris's avatar James Morris

Merge branch 'for-security' of...

Merge branch 'for-security' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/apparmor-dev into next
parents 5b944a71 25e75dff
...@@ -73,7 +73,6 @@ static int may_change_ptraced_domain(struct task_struct *task, ...@@ -73,7 +73,6 @@ static int may_change_ptraced_domain(struct task_struct *task,
cred = get_task_cred(tracer); cred = get_task_cred(tracer);
tracerp = aa_cred_profile(cred); tracerp = aa_cred_profile(cred);
} }
rcu_read_unlock();
/* not ptraced */ /* not ptraced */
if (!tracer || unconfined(tracerp)) if (!tracer || unconfined(tracerp))
...@@ -82,6 +81,7 @@ static int may_change_ptraced_domain(struct task_struct *task, ...@@ -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); error = aa_may_ptrace(tracer, tracerp, to_profile, PTRACE_MODE_ATTACH);
out: out:
rcu_read_unlock();
if (cred) if (cred)
put_cred(cred); put_cred(cred);
......
...@@ -127,7 +127,7 @@ static int apparmor_capget(struct task_struct *target, kernel_cap_t *effective, ...@@ -127,7 +127,7 @@ static int apparmor_capget(struct task_struct *target, kernel_cap_t *effective,
*inheritable = cred->cap_inheritable; *inheritable = cred->cap_inheritable;
*permitted = cred->cap_permitted; *permitted = cred->cap_permitted;
if (!unconfined(profile)) { if (!unconfined(profile) && !COMPLAIN_MODE(profile)) {
*effective = cap_intersect(*effective, profile->caps.allow); *effective = cap_intersect(*effective, profile->caps.allow);
*permitted = cap_intersect(*permitted, profile->caps.allow); *permitted = cap_intersect(*permitted, profile->caps.allow);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment