Documentation ¶
Index ¶
- func IsEnabled() (bool, error)
- func IsEnforcing() (bool, error)
- func MockIsEnabled(isEnabled func() (bool, error)) (restore func())
- func MockIsEnforcing(isEnforcing func() (bool, error)) (restore func())
- func RestoreContext(aPath string, mode RestoreMode) error
- func SnapMountContext() string
- func Summary() string
- func VerifyPathContext(aPath string) (bool, error)
- type LevelType
- type RestoreMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEnforcing ¶
IsEnabled checks whether SELinux is in enforcing mode
func MockIsEnabled ¶
MockIsEnabled makes the system believe a certain SELinux state is currently true
func MockIsEnforcing ¶
MockIsEnforcing makes the system believe the current SELinux is currently enforcing
func RestoreContext ¶
func RestoreContext(aPath string, mode RestoreMode) error
RestoreContext restores the default SELinux context of given path
func SnapMountContext ¶
func SnapMountContext() string
SnapMountContext finds out the right context for mounting snaps
func VerifyPathContext ¶
VerifyPathContext checks whether a given path is labeled according to its default SELinux context
Types ¶
type LevelType ¶
type LevelType int
LevelType encodes the state of SELinux support found on this system.
func ProbedLevel ¶
func ProbedLevel() LevelType
ProbedLevel tells what level of SELinux enforcement is currently used
type RestoreMode ¶
type RestoreMode struct { // Recursive indicates whether the default context shall be restored // recursively Recursive bool }
RestoreMode configures how default path context is restored
Click to show internal directories.
Click to hide internal directories.