seiface

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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 committing the changes to the SELinux policy
	ErrCommit = errors.New("cannot commit changes to policy")
)

errors

Functions

func NewErrCannotInstallModule

func NewErrCannotInstallModule(mName string) error

func NewErrCannotRemoveModule

func NewErrCannotRemoveModule(mName string) error

func NewErrCommit

func NewErrCommit(origErrVal int, msg string) error

Types

type Handler

type Handler interface {
	SetAutoCommit(bool)
	Install(string) error
	List() ([]string, error)
	Remove(string) error
	Commit() error
	Close() error
}

Handler implements an interface to interact with SELinux modules.

Jump to

Keyboard shortcuts

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