| Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
These have similar semantics to equivalent Wayland security-context-v1 fields.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Unused in hakurei but could be useful when the package is moved out of internal.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
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>
|
|
The PipeWire Op check cannot be made parallel due to the OS interaction.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This makes wrapped syscall errors produce a cleaner error message.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Removing the pathname socket used to be handled separately, now it is done during the Close call.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is cleaner than cleaning up in internal/system as it covers the failure paths.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The old implementation is relocated to system/wayland/deprecated.go.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
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>
|
|
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>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This discontinues use of the deprecated ldd.Exec function for #25.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
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>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This eliminates all fmsg imports from internal/system.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
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>
|
|
Panicking here leaves garbage behind. Not ideal if this package is going to be exported.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These are only available within the mount namespace and should significantly reduce attack surface.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
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>
|
|
This Op would still be useful after replacing the Tmpfiles interface, so isolate it here.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This now has identical behaviour as wayland C library.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
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>
|
|
This replaces the pipes object and integrates context into helper process lifecycle.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
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>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This makes API usage much cleaner, and encapsulates all bwrap arguments in argsWt.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Debug message and socket cleanup gets missed due to this value being inverted.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
|
|
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>
|
|
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>
|
|
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>
|
|
Stringer method of dbus.Proxy returns a string representation of its args stream when sealed.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
|
|
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
|
|
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
|
|
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
|
|
This enables building an instance in a single statement.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
|
|
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>
|
|
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
|
|
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
|
|
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
|
|
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>
|
|
This removes the unnecessary import of the state package.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
|
|
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>
|
|
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>
|
|
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
|
|
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>
|