apparmor: move task related defines and fns to task.X files

Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen
2017-10-08 00:43:02 -07:00
parent d065f2f565
commit de62de59c2
6 changed files with 105 additions and 98 deletions

View File

@@ -794,7 +794,7 @@ int apparmor_bprm_set_creds(struct linux_binprm *bprm)
if (bprm->called_set_creds)
return 0;
ctx = current_task_ctx();
ctx = task_ctx(current);
AA_BUG(!cred_label(bprm->cred));
AA_BUG(!ctx);
@@ -1067,7 +1067,7 @@ int aa_change_hat(const char *hats[], int count, u64 token, int flags)
/* released below */
cred = get_current_cred();
ctx = current_task_ctx();
ctx = task_ctx(current);
label = aa_get_newest_cred_label(cred);
previous = aa_get_newest_label(ctx->previous);