Documentation ¶
Index ¶
- Variables
- func LogWrapper(cmsg *C.char, level C.int)
- func NewErrCannotInstallModule(mName string) error
- func NewErrCannotRemoveModule(mName string) error
- func NewErrCommit(origErrVal int, msg string) error
- func NewSemanageHandler(autoCommit bool, logger logr.Logger) (semodule.Handler, error)
- type SeHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrHandleCreate is an error when getting a handle to semanage ErrHandleCreate = errors.New("could not create handle") // ErrSELinuxDBConnect is an error to connect to the SELinux database ErrSELinuxDBConnect = errors.New("could not connect to the SELinux DB") // ErrNilHandle would happen if you initialized the Handler without // the using the `NewSemanageHandler` function or without initializing // the underlying semanage handler ErrNilHandle = errors.New("nil semanage handle") // ErrList is an error listing the SELinux modules ErrList = errors.New("cannot list") // ErrCannotRemoveModule is an error removing a SELinux module ErrCannotRemoveModule = errors.New("cannot remove module") // ErrCannotInstallModule is an error installing a SELinux module ErrCannotInstallModule = errors.New("cannot install module") // ErrCommit is an error when commiting the changes to the SELinux policy ErrCommit = errors.New("cannot commit changes to policy") )
errors
Functions ¶
func NewErrCommit ¶
func NewSemanageHandler ¶
NewSemanageHandler creates a new instance of a semodule.Handler that handles SELinux module interactions through the semanage interface
`autoCommit` tells the handler to always issue a commit when installing/removing policies. If this is set to `off` You would need to commit explicitly.
Types ¶
Click to show internal directories.
Click to hide internal directories.