aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app
AgeCommit message (Collapse)Author
2025-04-11sandbox: relative autoetc linksOphestra
This allows nested containers to use autoetc, and increases compatibility with other implementations. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-10sandbox: implement autoetc as setup opOphestra
This significantly reduces setup op count and the readdir call now happens in the context of the init process. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-08sandbox/seccomp: rename flag type and constantsOphestra
The names are ambiguous. Rename them to make more sense. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-07app: install seccomp filter to shimOphestra
This does not necessarily reduce attack surface but does not affect functionality or introduce any side effects, so is nice to have. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-07app: improve shim process managementOphestra
This ensures a signal gets delivered to the process instead of relying on parent death behaviour. SIGCONT was chosen as it is the only signal an unprivileged process is allowed to send to processes with different credentials. A custom signal handler is installed because the Go runtime does not expose signal information other than which signal was received, and shim must check pid to ensure reasonable behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-01app: wayland socket in process shareOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-01app: share path setup on demandOphestra
This removes the unnecessary creation and destruction of share paths when none of the enablements making use of them are set. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-31fst: optional configured shell pathOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-27app/seal: check for '=' in envvOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-27app: pass through $SHELLOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-26app: create XDG_RUNTIME_DIR with perm 0700Ophestra
Many programs complain about this. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-25fst/sandbox: do not create /etc in advanceOphestra
This is now handled by the setup op. This also gets rid of the hardcoded /etc path. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-25sandbox/wl: move into sandboxOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-25app: merge shim into app packageOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-25system: optimise string formattingOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-25app: run in native sandboxOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-17internal/sys: wrap getuid/getgidOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-17sandbox: move out of internalOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-17sandbox: move params setup functionsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-17sandbox: wrap fmsg interfaceOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-17seccomp: install output atomicallyOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-15helper: expose extra files to directOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-15helper: rearrange initialisation argsOphestra
This improves consistency across two different helper implementations. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-15helper: clean up interfaceOphestra
The helper interface was messy due to odd context acquisition order. That has changed, so this cleans it up. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-14seccomp: move out of helperOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-14helper: embed context on creationOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-13internal/app: rename init to init0Ophestra
This makes way for the new container init. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-09helper/proc: expose setup fileOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-07internal/prctl: rename prctl wrappersOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-26app: print comp values earlyOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-26cmd/fpkg: call app in-processOphestra
Wrapping fortify is slow, painful and error-prone. Start apps in-process instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-26app: handle RunState errorsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-26app: define errors in a separate fileOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-25dbus: set process group idOphestra
This stops signals sent by the TTY driver from propagating to the xdg-dbus-proxy process. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-25fortify: improve handling of RevertErrOphestra
All this error wrapping is getting a bit ridiculous and I might want to do something about that somewhere down the line. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-21app: separate instance from process stateOphestra
This works better for the implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-19app: defer system.I revertOphestra
Just returning an error after a successful call of commit will leave garbage behind with no way for the caller to clean them. This change ensures revert is always called after successful commit with at least per-process state enabled. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-19app: remove share methodOphestra
This is yet another implementation detail from before system.I, getting rid of this vastly cuts down on redundant seal state. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-19app: separate appSeal finalise methodOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-19app: merge seal with sysOphestra
The existence of the appSealSys struct was an implementation detail obsolete since system.I was integrated in 084cd84f36a1d608541b4aa4e1e95334395d8953. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-19app: embed appSeal in app structOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-19app/seal: improve documentationOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-19app/seal: embed enablementsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-19app: store values with string representationOphestra
Improves code readability without changing memory layout. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-18app: separate interface from implementationOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-18sys: wrap log methodsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-18sys: rename from linuxOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-18linux: wrap fsu lookup errorOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-17system: move out of internalOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-17system: wrap console output functionsOphestra
This eliminates all fmsg imports from internal/system. Signed-off-by: Ophestra <cat@gensokyo.uk>