Documentation ¶
Overview ¶
Package selinux provides generic code for managing SELinux.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init() error
Init initializes SELinux based on the configured mode. It loads the policy and enforces it if necessary.
func IsEnabled ¶
func IsEnabled() bool
IsEnabled checks if SELinux is enabled on the system by reading the kernel command line. It returns true if SELinux is enabled, otherwise it returns false. It also ensures we're not in a container. By default SELinux is disabled.
func IsEnforcing ¶
func IsEnforcing() bool
IsEnforcing checks if SELinux is enabled and the mode should be enforcing. By default if SELinux is enabled we consider it to be permissive.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.