pkg

package
v0.0.0-...-56ecff6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Mode is the SELinux mode (enforced / permissive)
	Mode string `json:"mode"`

	// LoadedPolicyName is the loaded policy  (mcs, targeted, etc.)
	LoadedPolicyName string `json:"loaded_policy_name"`
}

Config is read from configFile

type Status

type Status struct {
	Status                   string `json:"status"`
	Mount                    string `json:"mount"`
	RootDirectory            string `json:"root_directory"`
	CurrentMode              string `json:"current_mode"`
	PolicyDenyUnknownStatus  string `json:"policy_deny_unknown_status"`
	MemoryProtectionChecking string `json:"memory_protection_checking"`
	MaxKernelPolicyVersion   string `json:"max_kernel_policy_version"`
	*Config
}

Status is the current SELinux status

func GetStatus

func GetStatus(fs afero.Fs, configFile string) (*Status, error)

GetStatus reads the status from the config file and from the mounted SELinux fs if this one exist

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL