apparmor: move resource checks to using labels

Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen
2017-06-09 14:15:20 -07:00
parent c70c86c421
commit 86b92cb782
3 changed files with 79 additions and 41 deletions

View File

@@ -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;