shim

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const EnvShim = "FORTIFY_SHIM"

Variables

This section is empty.

Functions

func Try

func Try()

Try runs shim and stops execution if FORTIFY_SHIM is set.

Types

type CommandBuilder added in v0.0.8

type CommandBuilder func(shimEnv string) (args []string)

type Payload

type Payload struct {
	// child full argv
	Argv []string
	// fortify, bwrap, target full exec path
	Exec [3]string
	// bwrap config
	Bwrap *bwrap.Config
	// whether to pass wayland fd
	WL bool

	// verbosity pass through
	Verbose bool
}

type Shim added in v0.0.8

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

func New added in v0.0.8

func New(executable string, uid uint32, socket string, wl *Wayland, payload *Payload, checkPid bool) *Shim

func (*Shim) Abort added in v0.0.8

func (s *Shim) Abort(err error)

func (*Shim) AbortWait added in v0.0.8

func (s *Shim) AbortWait(err error)

func (*Shim) Start added in v0.0.8

func (s *Shim) Start(f CommandBuilder) (*time.Time, error)

func (*Shim) String added in v0.0.8

func (s *Shim) String() string

func (*Shim) Unwrap added in v0.0.8

func (s *Shim) Unwrap() *exec.Cmd

type Wayland added in v0.0.8

type Wayland struct {
	// wayland socket path
	Path string

	sync.Once
	// contains filtered or unexported fields
}

Wayland implements wayland mediation.

func NewWayland added in v0.0.8

func NewWayland() *Wayland

func (*Wayland) Close added in v0.0.8

func (wl *Wayland) Close() error

func (*Wayland) WriteUnix added in v0.0.8

func (wl *Wayland) WriteUnix(conn *net.UnixConn) error

Jump to

Keyboard shortcuts

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