aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/system
AgeCommit message (Collapse)Author
2026-06-08all: apply modernisersOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-10hst: remove enablement json adapterOphestra
The go116 behaviour of built-in new function makes this cleaner. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-30all: use filepathOphestra
This makes package check portable, and removes nonportable behaviour from package pkg, pipewire, and system. All other packages remain nonportable due to their nature. No latency increase was observed due to this change on amd64 and arm64 linux. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17all: raise timeout defaultsOphestra
This avoids timing out on systems running very slowly. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17internal/stub: move from containerOphestra
This package solves a very specific stubbing use case, in a less than elegant manner. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17check: move from containerOphestra
This package is not container specific, and widely used across the project. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-19internal/pipewire: inform conn of blocking intentOphestra
The interface does not expose underlying kernel notification mechanisms. This change removes the need to poll in situations were the next call might block. This is made cumbersome by the SyscallConn interface left over from a previous implementation, it will be replaced in a later commit as the current implementation does not make use of any net.Conn methods other than Close. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-14internal/pipewire: handle SecurityContext::Create errorOphestra
This method can result in an error targeting it, so it is handled here. This change also causes a call to Create to also Core::Sync, as it should have done. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-10internal/outcome: populate instance metadata for PipeWireOphestra
These have similar semantics to equivalent Wayland security-context-v1 fields. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-09internal/pipewire: expose connection propsOphestra
Unused in hakurei but could be useful when the package is moved out of internal. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-07internal/system: integrate PipeWire SecurityContextOphestra
Tests for this Op happens to be the best out of everything due to the robust infrastructure offered by internal/pipewire. This is now ready to use in internal/outcome for implementing #26. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-07internal/system: optional op check parallelismOphestra
The PipeWire Op check cannot be made parallel due to the OS interaction. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-07internal/system: pass syscall error messageOphestra
This makes wrapped syscall errors produce a cleaner error message. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-07internal/system: remove ineffectual join reverting waylandOphestra
Removing the pathname socket used to be handled separately, now it is done during the Close call. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-19internal/wayland: clean up pathname socketOphestra
This is cleaner than cleaning up in internal/system as it covers the failure paths. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-16internal/wayland: reimplement connect/bind codeOphestra
The old implementation is relocated to system/wayland/deprecated.go. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-15internal/wayland: relocate connection structOphestra
This interface is getting replaced, so relocating it to the deprecated wrapper package before working on its replacement. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-15internal/wayland: improve error handlingOphestra
Note: wl_registry_add_listener is undocumented everywhere. Its implementation calls wl_proxy_add_listener which returns 0 on success or -1 on failure. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-15internal: relocate packagesOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-14treewide: migrate ldd callersOphestra
This discontinues use of the deprecated ldd.Exec function for #25. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-13internal/system: relocate from systemOphestra
These packages are highly specific to hakurei and are difficult to use safely from other pieces of code. Their exported symbols are made available until v0.4.0 where they will be removed for #24. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-17system: move out of internalOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-17system: wrap console output functionsOphestra
This eliminates all fmsg imports from internal/system. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-17system/wayland: sync file at caller specified addressOphestra
Storing this in sys is incredibly ugly: sys should be stateless and Ops must keep track of their state. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-17system/tmpfiles: fail gracefully in API misuseOphestra
Panicking here leaves garbage behind. Not ideal if this package is going to be exported. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-17system/tmpfiles: implement private tmpfilesOphestra
These are only available within the mount namespace and should significantly reduce attack surface. 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-16system: separate link Op implementationOphestra
This Op would still be useful after replacing the Tmpfiles interface, so isolate it here. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-15app: improve WAYLAND_DISPLAY correctnessOphestra
This now has identical behaviour as wayland C library. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-15system: remove write mode tmpfilesOphestra
This interface is ugly and bug-prone. This change removes its write mode which has been obsoleted by CopyBind. 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-07system/dbus: dump messages on early faultOphestra
In the current app implementation this gets dumped in the wait method after resuming output. Wait is never called in an early fault condition, so any error messages get lost. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-07system/dbus: dump method prints msgbufOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-01-22dbus: enable syscall filterOphestra
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>
2024-12-27system/dbus: fix inverted system bus stateOphestra
Debug message and socket cleanup gets missed due to this value being inverted. Signed-off-by: Ophestra <cat@gensokyo.uk>
2024-12-20system: implement Enablements String methodOphestra
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-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>