aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2024-10-17init: post initial process death exit timeoutOphestra Umiker
Wait for 5 seconds before printing a message and exiting after picking up the initial process's wait status. This also kills any lingering processes.This behaviour is helpful for applications launched without a terminal attached. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-17workflows: test workflow to run tests every commitOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-17workflows: add lines between stepsOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-16system: move enablements from state packageOphestra Umiker
This removes the unnecessary import of the state package. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-16app: port app to use the system packageOphestra Umiker
This commit does away with almost all baggage left over from the Ego port. Error wrapping also got simplified. All API changes happens to be internal which means no changes to main except renaming of the BaseError type. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-16system: isolate app/system into generic implementationOphestra Umiker
This improves maintainability and extensibility of system operations, makes writing tests for them possible, and operations now apply and revert in order, instead of being bunched up into their own categories. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-16fmsg/errors: isolate app/error into a separate packageOphestra Umiker
These functions are not in any way specific to the app package. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-16dbus: various accessors for dbus.Proxy internal fieldsOphestra Umiker
These values are useful during sandbox setup and exporting them makes more sense than storing them twice. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-15release: 0.0.4Ophestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-15helper/bwrap: add fortify permissive default test caseOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-15helper/bwrap: sort SetEnv argumentsOphestra Umiker
This guarantees consistency of resulting args. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-15app: filter /tmp from permissive defaultOphestra Umiker
Tmpdir is bind mounted over further along in execution so there is no point sharing it here. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-15helper/bwrap: ordered filesystem argsOphestra Umiker
The argument builder was written based on the incorrect assumption that bwrap arguments are unordered. The argument builder is replaced in this commit to correct that mistake. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-14helper/bwrap: format mode in octalOphestra Umiker
Bubblewrap expects an octal representation of mode. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-14fortify: move PR_SET_DUMPABLE to the beginning of mainOphestra Umiker
This call does need flag values. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-14release: 0.0.3Ophestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-14init: custom init process inside sandboxOphestra Umiker
Bubblewrap as init is a bit awkward and don't support a few setup actions fortify will need, such as starting/supervising nscd. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-13fortify: refuse to run as rootOphestra Umiker
There is no good reason to run fortify as root and desktop environments typically do not like that either. This check prevents confusion for new users who might mistakenly run it as root or set the setuid bit. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-13shim: update payload commentOphestra Umiker
Generating permissive default no longer happens in shim. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-13shim: re-exec self on startupOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-13shim: get rid of insane launch conditionOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-13app: generate and replace passwd and group filesOphestra Umiker
This ensures libc functions get correct user information. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-13app/config: map bwrap tmpfs in app configOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-13helper/bwrap: allow pushing generic arguments to the end of argument streamOphestra Umiker
Bwrap argument order determines the order their corresponding actions are performed. This allows generic arguments like tmpfs to the end of the stream to override bind mounts. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-13app/config: always use nobody UID within sandboxOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-13fortify: set SUID_DUMP_DISABLE after flag parseOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-13app/seal: skip /mnt in permissive defaultOphestra Umiker
This directory usually contains temporarily mounted stuff and shouldn't get into the sandbox. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-13update README documentOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-12nix: pass $SHELL for shell interpreterOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-12app/seal: allow GPU access in permissive default when either X11/Wayland is ↵Ophestra Umiker
enabled Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-12app: filesystem struct that maps to all bwrap bind optionsOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-12fortify/config: flag to print template config serialised as JSONOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-12app: supply template configOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-12fortify: move error handling to separate fileOphestra Umiker
Error handling here is way too monstrous due to terrible design of the internal/app package. Since rewriting internal/app will take a while, error handling is moved out of main to improve readability. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-12fortify: clean up config loadingOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-12fortify: move flag handling to separate filesOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-12helper: remove unused bwrap config fieldOphestra Umiker
This configuration is not saved anywhere, and does not need to be saved. Bwrap configuration information is already saved into p. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-12dbus: improve unsealed behaviour coverageOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-11app: integrate bwrap into environment setupOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-11shim: use bwrap config as it isOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-11helper/bwrap: move interfaceArgs before stringArgsOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-11app: migrate to new shim implementationOphestra Umiker
Both machinectl and sudo launch methods launch shim as shim is now responsible for setting up the sandbox. Various app structures are adapted to accommodate bwrap configuration and mediated wayland access. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-11shim: new shim implementationOphestra Umiker
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>
2024-10-11verbose: overridable prefixOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-11helper/bwrap: proc, dev and mqueue as string argumentsOphestra Umiker
These flags do not support --chmod. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-10app: tag ACL operations for revertOphestra Umiker
ACL operations are now tagged with the enablement causing them. At the end of child process's life, enablements of all remaining launchers are resolved and inverted. This allows Wait to only revert operations targeting resources no longer required by other launchers. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-10app: hardlink sockets to process-specific share local to XDG_RUNTIME_DIROphestra Umiker
This avoids adding ACLs to the PulseAudio directory. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-10state/simple: prefix store pathOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-10release: 0.0.2Ophestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-10app: remove bubblewrap launch methodOphestra Umiker
Launch methods serve the primary purpose of setting UID in the init namespace, which bubblewrap does not do. Furthermore, all applications will start within a bubblewrap sandbox once it has been implemented. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>