aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
AgeCommit message (Collapse)Author
2025-07-02cmd/hakurei: move to cmdOphestra
Having it at the project root never made sense since the "ego" name was deprecated. This change finally addresses it. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-25treewide: rename to hakureiOphestra
Fortify makes little sense for a container tool. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-05-07fortify: update help stringsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-13fst: improve configOphestra
The config struct more or less "grew" to what it is today. This change moves things around to make more sense and fixes nonsensical comments describing obsolete behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-12app/instance: wrap internal implementationOphestra
This reduces the scope of the fst package, which was growing questionably large. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-04-12app: rename app implementation packageOphestra
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-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-17sandbox: move out of internalOphestra
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-14seccomp: move out of helperOphestra
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-07internal/prctl: rename prctl wrappersOphestra
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-26fortify: move internal commands upOphestra
This improves readability. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-26app: handle RunState errorsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-26fortify: configure seccomp logger earlyOphestra
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-23fortify: handle errors via MustParseOphestra
The errSuccess behaviour is kept for beforeExit. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-23fortify: test help messageOphestra
This helps catch regressions in "command". Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-23fortify: integrate command handlerOphestra
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-18app: separate interface from implementationOphestra
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-18fmsg: export logBaseError functionOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-17system: move out of internalOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-16fmsg: implement suspend in writerOphestra
This removes the requirement to call fmsg.Exit on every exit path, and enables direct use of the "log" package. However, fmsg.BeforeExit is still encouraged when possible to catch exit on suspended output. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-16internal: move shim and init into appOphestra
This structure makes more sense, as both processes are part of an app's lifecycle. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-15fortify: prevent exit status 0 on app failureOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-14fortify: check print behaviourOphestra
These output are supposed to be deterministic, so checking them is a good way to catch regressions. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-13helper: use generic extra files interfaceOphestra
This replaces the pipes object and integrates context into helper process lifecycle. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-08helper/proc: move package out of internalOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-25helper/seccomp: separate seccomp packageOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-22fortify: set up seccomp verbose logging earlyOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-22helper/bwrap: integrate seccomp into helper interfaceOphestra
This makes API usage much cleaner, and encapsulates all bwrap arguments in argsWt. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-20proc/priv/shim: resolve and load seccomp rulesOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-18proc/priv/init: early init checkOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-18proc/priv/init: merge init into main programOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-17proc/priv/shim: merge shim into main programOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-15app: expose single run methodOphestra
App is no longer just a simple [exec.Cmd] wrapper, so exposing these steps separately no longer makes sense and actually hinders proper error handling, cleanup and cancellation. This change removes the five-second wait when the shim dies before receiving the payload, and provides caller the ability to gracefully stop execution of the confined process. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-01linux/std: handle fsu exit status 1Ophestra
Printing "exit status 1" is confusing. This handles the ExitError and returns EACCES instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-01fortify: show system info when instance is not specifiedOphestra
This contains useful information not obtainable by external tools. Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-23fortify: clean up config loadingOphestra
Move duplicate code to function. Also handle - as config from stdin. Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-22fortify: show short mode omit filesystemsOphestra
Filesystem information can be quite noisy in permissive defaults. Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-21fortify: clean up ps formatting codeOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>