aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor/domain.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2017-01-27 04:09:40 -0800
committerJohn Johansen <john.johansen@canonical.com>2018-02-09 11:30:01 -0800
commitf175221af35bedf99b201d861a0fe54e19ef36c2 (patch)
treeb5c076029b10b7d3bb1d814ba5c596a7a9e1bed7 /security/apparmor/domain.c
parentapparmor: drop cred_ctx and reference the label directly (diff)
downloadlinux-dev-f175221af35bedf99b201d861a0fe54e19ef36c2.tar.xz
linux-dev-f175221af35bedf99b201d861a0fe54e19ef36c2.zip
apparmor: rename tctx to ctx
now that cred_ctx has been removed we can rename task_ctxs from tctx without causing confusion. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/domain.c')
-rw-r--r--security/apparmor/domain.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 5285938680e0..b180e10f2b86 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -779,7 +779,7 @@ static struct aa_label *handle_onexec(struct aa_label *label,
*/
int apparmor_bprm_set_creds(struct linux_binprm *bprm)
{
- struct aa_task_ctx *tctx;
+ struct aa_task_ctx *ctx;
struct aa_label *label, *new = NULL;
struct aa_profile *profile;
char *buffer = NULL;
@@ -794,17 +794,17 @@ int apparmor_bprm_set_creds(struct linux_binprm *bprm)
if (bprm->called_set_creds)
return 0;
- tctx = current_task_ctx();
+ ctx = current_task_ctx();
AA_BUG(!cred_label(bprm->cred));
- AA_BUG(!tctx);
+ AA_BUG(!ctx);
label = aa_get_newest_label(cred_label(bprm->cred));
/* buffer freed below, name is pointer into buffer */
get_buffers(buffer);
/* Test for onexec first as onexec override other x transitions. */
- if (tctx->onexec)
- new = handle_onexec(label, tctx->onexec, tctx->token,
+ if (ctx->onexec)
+ new = handle_onexec(label, ctx->onexec, ctx->token,
bprm, buffer, &cond, &unsafe);
else
new = fn_label_build(label, profile, GFP_ATOMIC,
@@ -1047,7 +1047,7 @@ build:
int aa_change_hat(const char *hats[], int count, u64 token, int flags)
{
const struct cred *cred;
- struct aa_task_ctx *tctx;
+ struct aa_task_ctx *ctx;
struct aa_label *label, *previous, *new = NULL, *target = NULL;
struct aa_profile *profile;
struct aa_perms perms = {};
@@ -1067,9 +1067,9 @@ int aa_change_hat(const char *hats[], int count, u64 token, int flags)
/* released below */
cred = get_current_cred();
- tctx = current_task_ctx();
+ ctx = current_task_ctx();
label = aa_get_newest_cred_label(cred);
- previous = aa_get_newest_label(tctx->previous);
+ previous = aa_get_newest_label(ctx->previous);
if (unconfined(label)) {
info = "unconfined can not change_hat";