shim: new shim implementation
This implementation of shim accepts configuration as a gob stream over a unix socket, with support for mediating access to wayland via WAYLAND_SOCKET fd. All configuration is now included in the payload, and child is started inside bwrap configured with supplied bwrap.Config. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
23
internal/shim/payload.go
Normal file
23
internal/shim/payload.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package shim
|
||||
|
||||
import (
|
||||
"git.ophivana.moe/cat/fortify/helper/bwrap"
|
||||
)
|
||||
|
||||
const EnvShim = "FORTIFY_SHIM"
|
||||
|
||||
type Payload struct {
|
||||
// child full argv
|
||||
Argv []string
|
||||
// env variables passed through to bwrap
|
||||
Env []string
|
||||
// bwrap, target full exec path
|
||||
Exec [2]string
|
||||
// bwrap config, nil for permissive
|
||||
Bwrap *bwrap.Config
|
||||
// whether to pas wayland fd
|
||||
WL bool
|
||||
|
||||
// verbosity pass through
|
||||
Verbose bool
|
||||
}
|
||||
Reference in New Issue
Block a user