summaryrefslogtreecommitdiffstats
path: root/security/apparmor/include
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2013-02-18 16:05:34 -0800
committerJohn Johansen <john.johansen@canonical.com>2013-04-28 00:36:20 -0700
commit7a2871b566f34d980556072943295efd107eb53c (patch)
tree7f991bd472872e62780ba9119d8e3a3784008dfc /security/apparmor/include
parent0ca554b9fca425eb58325a36290deef698cef34b (diff)
downloadblackbird-op-linux-7a2871b566f34d980556072943295efd107eb53c.tar.gz
blackbird-op-linux-7a2871b566f34d980556072943295efd107eb53c.zip
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')
-rw-r--r--security/apparmor/include/context.h13
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 */
OpenPOWER on IntegriCloud