diff options
author | John Johansen <john.johansen@canonical.com> | 2013-02-19 04:05:34 +0400 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2013-04-28 11:36:20 +0400 |
commit | 7a2871b566f34d980556072943295efd107eb53c (patch) | |
tree | 7f991bd472872e62780ba9119d8e3a3784008dfc /security/apparmor/include/context.h | |
parent | 0ca554b9fca425eb58325a36290deef698cef34b (diff) | |
download | linux-7a2871b566f34d980556072943295efd107eb53c.tar.xz |
apparmor: use common fn to clear task_context for domain transitions
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
Diffstat (limited to 'security/apparmor/include/context.h')
-rw-r--r-- | security/apparmor/include/context.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/security/apparmor/include/context.h b/security/apparmor/include/context.h index 1e9443a58877..4cecad313227 100644 --- a/security/apparmor/include/context.h +++ b/security/apparmor/include/context.h @@ -160,4 +160,17 @@ static inline struct aa_profile *aa_current_profile(void) return profile; } +/** + * aa_clear_task_cxt_trans - clear transition tracking info from the cxt + * @cxt: task context to clear (NOT NULL) + */ +static inline void aa_clear_task_cxt_trans(struct aa_task_cxt *cxt) +{ + aa_put_profile(cxt->previous); + aa_put_profile(cxt->onexec); + cxt->previous = NULL; + cxt->onexec = NULL; + cxt->token = 0; +} + #endif /* __AA_CONTEXT_H */ |