| Age | Commit message (Collapse) | Author |
|
The struct turned out not necessary during initial implementation but was not unwrapped into its single string field. This change replaces it with the underlying string and removes the indirection.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This no longer exposes the pipewire socket to the container, and instead mediates access via pipewire-pulse. This makes insecure parts of the protocol inaccessible as explained in the doc comment in hst.
Closes #29.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is for setting up the pipewire-pulse container in shim, for #29.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is a private work directory owned by the specific shim. Useful for sockets owned by this instance of the shim and requires no direct assistance from the priv-side process.
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>
|
|
This fully replaces PulseAudio with PipeWire and enforces the PulseAudio check and error message. The pipewire-pulse daemon is handled in the NixOS module.
Closes #26.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is slightly counterintuitive, but it turned out well under this framework since the daemon backs its target file.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is very simple and takes almost no inputs. This is not yet hooked up to anything to prevent breaking any existing behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These are for #26. None of them are implemented yet. This fixes up test cases for the change to happen. Existing source code and JSON configuration continue to have the same effect. Existing flags get its EPulse bit replaced by EPipeWire.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This might be useful troubleshooting information.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This significantly increases readability. This patch is pretty big so it is being done after mostly everything has settled.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Clang is better than gcc in various ways. This also pulls in clang-format which is very helpful.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The "main.go" name is quite confusing as this is often only present in main packages.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is mounted for the default read-only /dev/ when programs want to use shm_open(3). Defining it here is less error-prone and saves the extra append at runtime.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is cleaner and makes more sense. The longer LDFLAGS was never a valid concern since it is always inserted by a script.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These provide justification for each use of linkname. Poorly thought out uses of linkname are removed.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
For #24.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
For #24.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These are all trusted user input, however this check reduces the likelihood of hard to debug errors.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This writes the 16-byte instance identifier to file descriptor specified by --identifier-fd if set, and closes the file.
This enables safely obtaining the new instance's identifier.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This results in slightly less messy error reporting.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This enables hakurei test suite to run on 32-bit targets.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This enables its use in hst for #15.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Seccomp lookup tables are going to be relocated here, and PNR constants.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This leaves slots available for additional uid ranges in Rosa OS.
This breaks all existing installations! Users are required to fix ownership manually.
Closes #18.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Should have done this when relocating this from container. Now is a good time to rename it before v0.3.x.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The SharePath is a more stable path than RunDirPath, since it is available all the time and should remain consistent. This also fits better into the intended use case of XDG_RUNTIME_DIR.
Closes #17.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This now places rundir inside the fallback runtime dir, so special case in internal/outcome is avoided.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These test cases were missed when making the changes.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This also prints a debug message which might be useful.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This also increases precision of state time output.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
In some cases the signal might be delivered before the signal handler is installed, and synchronising against such a case is too expensive. Instead, use the pipe being closed as a fallback to the regular exit request. This change also moves installation of the signal handler early.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This change also spawns shim before committing system state, leaving it blocking on the setup pipe. The internal/outcome/process structure is also entirely reworked to be much more readable and less error-prone, while enabling basic performance measurements. A long-standing bug where segment lock is not held during Commit is also resolved.
Closes #19.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is useful for reordering these operations for further cleanup.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is no longer exported. Such a check is pointless.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This increases flexibility of how caller wants to handle the I/O. Also makes it no longer rely on finalizer.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The new store implementation will be exported as Store.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This reduces collision with local variable names, and generally makes sense for the new store package, since it no longer specifies the state struct.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This took significant effort to stub out, and achieves full coverage after c5aefe5e9d.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This makes it possible to instrument output behaviour through stub.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The magic numbers hurt readability.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The shim does not suspend output to begin with. These are leftovers from when container startup code suspends output.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is unreachable, but keeping it here as a failsafe until more test cases are added.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is less ambiguous, and more accurately describes the purpose of the package.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|