From 6b6bc6205d98796361962ee282a063f18ba8dc57 Mon Sep 17 00:00:00 2001 From: Stephen Smalley Date: Mon, 5 Mar 2018 11:47:56 -0500 Subject: selinux: wrap AVC state Wrap the AVC state within the selinux_state structure and pass it explicitly to all AVC functions. The AVC private state is encapsulated in a selinux_avc structure that is referenced from the selinux_state. This change should have no effect on SELinux behavior or APIs (userspace or LSM). Signed-off-by: Stephen Smalley Reviewed-by: James Morris Signed-off-by: Paul Moore --- security/selinux/include/security.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'security/selinux/include/security.h') diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h index f1db09a5f521..23e762d529fa 100644 --- a/security/selinux/include/security.h +++ b/security/selinux/include/security.h @@ -93,6 +93,7 @@ extern char *selinux_policycap_names[__POLICYDB_CAPABILITY_MAX]; /* limitation of boundary depth */ #define POLICYDB_BOUNDS_MAXDEPTH 4 +struct selinux_avc; struct selinux_ss; struct selinux_state { @@ -103,10 +104,12 @@ struct selinux_state { bool checkreqprot; bool initialized; bool policycap[__POLICYDB_CAPABILITY_MAX]; + struct selinux_avc *avc; struct selinux_ss *ss; }; void selinux_ss_init(struct selinux_ss **ss); +void selinux_avc_init(struct selinux_avc **avc); extern struct selinux_state selinux_state; -- cgit v1.2.3