aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
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>
2024-10-09ldd: separate Parse from Exec and trim spaceOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-09release: 0.0.1Ophestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-09dbus/run: support running xdg-dbus-proxy in a restrictive bubblewrap sandboxOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-09ldd: implement strict ldd output parserOphestra Umiker
Fortify needs to internally resolve helper program sandbox config. They are considered trusted and runs under the privileged UID so ldd output is used to determine libraries they need inside the sandbox environment. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-09helper/bwrap: pass --unshare-user when unshare everythingOphestra Umiker
Bubblewrap apparently requires --unshare-user even when --unshare-all is set to apply --disable-userns. This behaviour is not clearly documented. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-09helper/bwrap: check args only for internal testsOphestra Umiker
Tests internal to the helper package sets crash-test-dummy as the command whenever a launch is expected to go through, and the hardcoded args are only valid for internal tests, so this characteristic is used here to exclude external tests that pass real program names and custom bwrap configurations. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-08helper: implementation of helper.Helper using bwrapOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-08helper: generalise helper.Helper testOphestra Umiker
For testing the upcoming bwrap implementation of helper.Helper as it must have identical behaviour. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-07helper: move test sample data out of directOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-07dbus: use name resolved by exec.CommandOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-07helper: helper.Helper interfaceOphestra Umiker
For upcoming bwrap implementation of helper.Helper Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-07helper: move bwrap into helperOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-07helper/args: MustNewCheckedArgs for cleaner hardcoded argsOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-07helper: separate pipes from HelperOphestra Umiker
Upcoming bwrap helper implementation requires two sets of pipes to be managed, fd will also no longer be constant. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-06helper: test non-existent helpersOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-30bwrap: implement argument builderOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-29verbose: test verbose behaviourOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-29dbus: test child process handling behaviour via helper stubOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-29dbus: configurable xdg-dbus-proxy outputOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-29dbus: toggleable xdg-dbus-proxy outputOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-29helper: export internal stub functions for cross-package testingOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-29helper: test child process handlingOphestra Umiker
The stub child process simulates reading from the argument fd and copies the entire payload unmodified to stdout. If status pipe is enabled it will simulate sync fd behaviour as well. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-29helper: remove unreachable checkOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-29helper: stub helper for testsOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-28dbus: add more test casesOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-28dbus: replace test suffix * with +Ophestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-28dbus: seal test error check for correct error returnedOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-28release: 0.0.0-beta.5Ophestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-28dbus: add testsOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-27dbus/config: implement file loading functionsOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-27dbus: return exported error for nil configOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-27dbus/config: remove unused methodOphestra Umiker
Null checking is replaced by helper/args while string building is no longer required. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-25helper/args: simplify argument parsing and eliminate excess memory copiesOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-25dbus: use generalised helper.Helper for xdg-dbus-proxyOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-25helper: clean up and separate helper process management from dbusOphestra Umiker
The previous code was poorly documented and made little sense in some parts. This is a generalised and cleaned up implementation in the helper package making use of the Args interface. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>