aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
AgeCommit message (Collapse)Author
2025-01-23nix: configure target users via nixosOphestra
This makes patching home-manager no longer necessary. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-22cmd/fpkg: expose syscall policy optionsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-18proc: remove duplicate compile-time fortify referenceOphestra
This is no longer needed since shim and init are now part of the main program. 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>
2024-12-30cmd/fpkg/install: deduplicate nix storeOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-30cmd/fpkg: expose nixGL wrappersOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-29cmd/fpkg: remove workDir acl from activationOphestra
Activation does not require access to workDir, and by this point all information is available in dataHome. Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-29cmd/fpkg: include nixGL source in inner storeOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-29cmd/fpkg: optional network access when invoking with nix daemonOphestra
This is useful for building nixGL. Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-29cmd/fpkg: bind and document more gpu devicesOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-29cmd/fpkg: improve readability of fortify invocationsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-29cmd/fpkg: compare all three store pathsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-29cmd/fpkg: clean up broken links before activationOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-29cmd/fpkg/start: correct drop to shell wordingOphestra
Activation no longer happens during application startup. Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-26cmd/fpkg: app bundle helperOphestra
This helper program creates fortify configuration for running an application bundle. The activate action wraps a home-manager activation package and ensures each generation gets activated once. Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-28cmd/fshim: ensure data directoryOphestra
Ensuring home directory in shim causes the directory to be owned by the target user. Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-27cmd/fshim: bind finit inside sandboxOphestra
The outer finit executable is normally inaccessible inside the sandbox. This was obscured by the current Nix-based setup exposing /nix/store to the sandbox. Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-20migrate to git.gensokyo.uk/security/fortifyOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-12-18cmd/fshim: switch to setup pipeOphestra Umiker
The socket-based approach is no longer necessary as fsu allows extra files and sudo compatibility is no longer relevant. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-12-18cmd/fshim: switch to generic setup funcOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-12-18cmd/finit: switch to generic receive funcOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-12-17cmd/fsu: check uid range before syscallOphestra Umiker
This limits potential exploits to the fortify uid range. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-12-07cmd/fuserdb: rename home directoriesOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-12-06proc: cleaner extra filesOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-12-06app: integrate security-context-v1Ophestra Umiker
Should be able to get rid of XDG_RUNTIME_DIR share after this. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-11-18cmd/fshim/ipc: install signal handler on shim startOphestra Umiker
Getting killed at this point will result in inconsistent state. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-11-17cmd/fuserdb: generate group entriesOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-11-17cmd/fuserdb: systemd userdb drop-in entries generatorOphestra Umiker
This provides user records via nss-systemd. Static drop-in entries are generated to reduce complexity and attack surface. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-11-16app: integrate fsuOphestra Umiker
This removes the dependency on external user switchers like sudo/machinectl and decouples fortify user ids from the passwd database. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-11-09cmd/fshim: set no_new_privs flagOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-11-04cmd/fsu: remove import of internal packageOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-11-03cmd/fshim/ipc: friendly setup timeout messageOphestra Umiker
This message eventually gets returned by the app's Start method, so they should be wrapped to provide a friendly message. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-11-02cmd: shim and init into separate binariesOphestra Umiker
This change also fixes a deadlock when shim fails to connect and complete the setup. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-28fsu: check parent executable pathOphestra Umiker
Only allow main program to launch fsu. This change and further checks in the main program reduces attack surface. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-28fsu: implement simple setuid user switcherOphestra Umiker
Contains path to fortify, set at compile time, authenticates based on a simple uid range assignment file which also acts as the allow list. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>