aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/shim/payload.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-10-11 01:55:33 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-10-11 01:55:33 +0900
commitb86fa6b4c91a2bf331ae4a50a5aa14b668efc4e6 (patch)
tree2865bdf5b60f20199adb5a74bca0fa13b68ea315 /internal/shim/payload.go
parent6eb712aec73b6679fe7e2f60e7d1a6607af0ad4a (diff)
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>
Diffstat (limited to 'internal/shim/payload.go')
-rw-r--r--internal/shim/payload.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/internal/shim/payload.go b/internal/shim/payload.go
new file mode 100644
index 00000000..6202bfe7
--- /dev/null
+++ b/internal/shim/payload.go
@@ -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
+}