internal

package
v0.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SdBootedV = func() bool {
	if v, err := util.SdBooted(); err != nil {
		fmt.Println("warn: read systemd marker:", err)
		return false
	} else {
		return v
	}
}()

Functions

func BeforeExit

func BeforeExit()

func Fatal

func Fatal(msg ...any)

func SealExit

func SealExit(s *ExitState)

Types

type Enablement

type Enablement uint8
const (
	EnableWayland Enablement = iota
	EnableX
	EnableDBus
	EnablePulse

	EnableLength
)

func (Enablement) Mask

func (e Enablement) Mask() Enablements

func (Enablement) String

func (e Enablement) String() string

type Enablements

type Enablements uint64

func (Enablements) Has

func (es Enablements) Has(e Enablement) bool

type ExitState

type ExitState struct {
	// contains filtered or unexported fields
}

ExitState keeps track of various changes fortify made to the system as well as other resources that need to be manually released. NOT thread safe.

func NewExit

func NewExit(u *user.User, uid int, f func() (int, error)) *ExitState

NewExit initialises a new ExitState containing basic, unchanging information about the fortify process required during cleanup

func (*ExitState) RegisterRevertPath

func (s *ExitState) RegisterRevertPath(p string)

RegisterRevertPath registers a path with ACLs added by fortify

func (*ExitState) SealDBus

func (s *ExitState) SealDBus(p *dbus.Proxy, done *chan struct{})

SealDBus submits the child's D-Bus proxy instance

func (*ExitState) SealEnablements

func (s *ExitState) SealEnablements(e Enablements)

SealEnablements submits the child process enablements

func (*ExitState) SealStatePath

func (s *ExitState) SealStatePath(v string)

SealStatePath submits filesystem path to the fortify process's state file

func (*ExitState) XcbActionComplete

func (s *ExitState) XcbActionComplete()

XcbActionComplete submits xcb.ChangeHosts action completion

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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