]> git.baikalelectronics.ru Git - kernel.git/commit
selinux: wrap selinuxfs state
authorStephen Smalley <sds@tycho.nsa.gov>
Tue, 20 Mar 2018 15:59:11 +0000 (11:59 -0400)
committerPaul Moore <paul@paul-moore.com>
Tue, 20 Mar 2018 20:54:36 +0000 (16:54 -0400)
commit804ed9bd016bc07d6a1313a7d28b4b9e5ef09f0e
tree076490596953fdeefdbe2b39e264eb2df08f97fe
parent2dcbec9c61a11d8ace67d248ba5f86ea326a344b
selinux: wrap selinuxfs state

Move global selinuxfs state to a per-instance structure (selinux_fs_info),
and include a pointer to the selinux_state in this structure.
Pass this selinux_state to all security server operations, thereby
ensuring that each selinuxfs instance presents a view of and acts
as an interface to a particular selinux_state instance.

This change should have no effect on SELinux behavior or APIs
(userspace or LSM).  It merely wraps the selinuxfs global state,
links it to a particular selinux_state (currently always the single
global selinux_state) and uses that state for all operations.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/selinuxfs.c