aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/system
AgeCommit message (Collapse)Author
2024-12-07system: prevent duplicate Wayland opOphestra Umiker
Wayland is implemented as an Op to enforce dependency and cleanup, its implementation does not allow multiple instances on a single sys object, nor would doing that make any sense. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-12-06system/wayland: integrate security-context-v1Ophestra Umiker
Had to pass the sync fd through sys. The rest are just part of a standard Op. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-11-03system/dbus: buffer xdg-dbus-proxy messagesOphestra Umiker
Pointing xdg-dbus-proxy to stdout/stderr makes a huge mess. This change enables app to neatly print out prefixed xdg-dbus-proxy messages after output is resumed. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-27system/dbus: compare sealed value by stringOphestra Umiker
Stringer method of dbus.Proxy returns a string representation of its args stream when sealed. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-25system: print number of ops completed at point of failureOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-25system: include more info in ACL StringerOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-23system: sys comparison methodOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-23system: return sys in queueing methodsOphestra Umiker
This enables building an instance in a single statement. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-21fmsg: produce all output through fmsgOphestra Umiker
The behaviour of print functions from package fmt is not thread safe. Functions provided by fmsg wrap around Logger methods. This makes prefix much cleaner and makes it easy to deal with future changes to logging. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-20migrate to git.ophivana.moe/security/fortifyOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-17system: tests for all Op implementations except DBusOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-17system/mkdir: type label in String methodOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-17system: handle invalid enablement in String methodOphestra Umiker
Invalid enablement is only caused by bad API usage, however panicking on the spot leaves behind messy state that has to be manually cleaned up. 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-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-09-16final: refactor for removal of system package and reduction of interactions ↵Ophestra Umiker
to state package State query command has been moved to main where it belongs, "system" information are now fetched in app.New and stored in *App with accessors for relevant values. Exit (cleanup-related) functions are separated into its dedicated "final" package. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-12verbose: remove system package interactionOphestra Umiker
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-08clean up setup/launcher code and enable better control over sharesOphestra Umiker
In the past Wayland, X and PulseAudio are shared unconditionally. This can unnecessarily increase attack surface as some of these resources might not be needed at all. This commit moves all environment preparation code to the internal app package and selectively call them based on flags. An "enablements" bitfield is introduced tracking all enabled shares. This value is registered after successful child process launch and stored in launcher states. Code responsible for running the child process is isolated to its own app/run file and cleaned up. Launch method selection is also extensively cleaned up. The internal state/track readLaunchers function now takes uid as an argument. Launcher state is now printed using text/tabwriter and argv is only emitted when verbose. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-09-04rename to fortify and restructureOphestra Umiker
More sandbox features will be added and this will no longer track ego's features and behaviour. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>