summaryrefslogtreecommitdiffstats
path: root/security/apparmor/lsm.c
diff options
context:
space:
mode:
authorJohn Johansen2017-06-09 23:15:20 +0200
committerJohn Johansen2017-06-11 02:11:40 +0200
commit86b92cb782b38d71ee344af20fcbe5106dd19dbe (patch)
tree65b18b0c407dfca9b76470a55429f2a3d46aeaa2 /security/apparmor/lsm.c
parentapparmor: move capability checks to using labels (diff)
downloadkernel-qcow2-linux-86b92cb782b38d71ee344af20fcbe5106dd19dbe.tar.gz
kernel-qcow2-linux-86b92cb782b38d71ee344af20fcbe5106dd19dbe.tar.xz
kernel-qcow2-linux-86b92cb782b38d71ee344af20fcbe5106dd19dbe.zip
apparmor: move resource checks to using labels
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/lsm.c')
-rw-r--r--security/apparmor/lsm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index bcfdcdb3eae2..c3e98f74268f 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -625,8 +625,7 @@ static void apparmor_bprm_committing_creds(struct linux_binprm *bprm)
current->pdeath_signal = 0;
/* reset soft limits and set hard limits for the new label */
- __aa_transition_rlimits(labels_profile(label),
- labels_profile(new_ctx->label));
+ __aa_transition_rlimits(label, new_ctx->label);
}
/**
@@ -646,8 +645,7 @@ static int apparmor_task_setrlimit(struct task_struct *task,
int error = 0;
if (!unconfined(label))
- error = aa_task_setrlimit(labels_profile(label), task,
- resource, new_rlim);
+ error = aa_task_setrlimit(label, task, resource, new_rlim);
__end_current_label_crit_section(label);
return error;