summaryrefslogtreecommitdiffstats
path: root/security/apparmor/lsm.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2017-06-09 14:15:20 -0700
committerJohn Johansen <john.johansen@canonical.com>2017-06-10 17:11:40 -0700
commit86b92cb782b38d71ee344af20fcbe5106dd19dbe (patch)
tree65b18b0c407dfca9b76470a55429f2a3d46aeaa2 /security/apparmor/lsm.c
parentc70c86c421427fd8487867de66c4104b15abd772 (diff)
downloadlinux-86b92cb782b38d71ee344af20fcbe5106dd19dbe.tar.bz2
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;