aboutsummaryrefslogtreecommitdiffhomepage
tag namev0.3.0 (d82e9fe0cd427d8a2841560129e7510cd703f5a5)
tag date2025-11-06 01:37:15 +0900
tagged byOphestra <cat@gensokyo.uk>
tagged objectcommit 34ccda84b2...
hakurei 0.3.0
Migration: The `cmd/hsu` uid format has changed and is now stabilised in package `hst`. Existing installations need to migrate by manually running `chown` recursively over existing application data directories. The uid format can be found in [hst/grp_pwd.go](https://git.gensokyo.uk/security/hakurei/src/tag/v0.3.0/hst/grp_pwd.go). Additionally, `TMPDIR` and `XDG_RUNTIME_DIR` sharing between containers under the same identity is now optional and defaults to *off*. This is *not* an implementation detail. Some applications use `TMPDIR` for communication and state tracking. Chromium is a good example of this. Test your apps, if they malfunction, set `share_runtime` or `share_tmpdir` to true depending on the cause. API Changes: - Remove raw seccomp flags from package `hst`. - All boolean fields in `ContainerConfig` are packed into a single integer. Does not break json. - Package `system` now operates exclusively on absolute pathnames. - `ProxyDBus` no longer returns function to dump buffer. - `Wayland` no longer returns the security context close file. - Container related fields are moved from the top level `Config` struct to `ContainerConfig`. - Pathnames, bits, seccomp types are relocated from package `container`. - Cross-platform `json` adaptor provided for `seccomp` types. - Message and check types are relocated from package `container`. - The `wait_delay` field now takes a negative value. Such a value is equivalent to zero and bypasses default. - Rename `hst.AbsTmp` to `hst.AbsPrivateTmp`. - Remove `PlaceP` method from package `container`. - Remove `system/tmpfiles` as it is no longer used. - Hold `hst.ExtraPermConfig` by value instead of address. - Instance state now embeds `hst.Config`. - State store entries are prefixed with a versioned header encoding the enablements byte. - `container/params` now exposes the write end of setup pipe. - `hakurei --json ps` serialises to an array instead of a map. - Rename `NewMsg` to `New` in package `message`. Fixes: - Do not incorrectly offset shim timeout base value. - Apply configured filesystems late, enabling system mount points to be covered. - Check `nscd` socket for path hiding instead of only for pd. - Use correct well-known address for `dbus` fallback. - Fix synchronisation order in `container` and `helper` tests. - Do not leak state (outside of dispatcher) in `system` builder methods. - Ignore nondeterministic mount point in vm test. - Fix occasional incorrect reporting of `wstatus` in `container/init`. - Use `EOF` as failsafe in `internal/outcome/shim`. - Fallback runtime dir is no longer rooted in the fallback rundir. - State is now tracked in `TMPDIR`, aligning better with use case detailed in [the XDG basedir spec](https://specifications.freedesktop.org/basedir/0.8/#variables). - Make application identifier string `omitempty`. - Handle nil `hst.Config` address in `cmd/hakurei/print`. Enhancements: - Package `hst` now builds without cgo. - Significantly improve `hst` doc comments. - Stable enablements bits, instance state, exit codes, uid format in `hst`. - Validate `hst.Config` early and export validation function. - Optionally share `TMPDIR` and `XDG_RUNTIME_DIR` between containers under the same identity. - Dump `system/dbus` buffer internally. - Hang up `system/wayland` security context internally. - Only minimal pathnames required for `hst.Paths` are sent. - Outcome finalisation is fully modularised and tested. - Container is now finalised on the shim side, significantly reducing transfer size. - Outcome finalisation no longer clobbers supplied `hst.Config`. - Use more plausible `overlay` mount configuration in `hst.Template`. - Remove confusing or redundant/noisy entries in `hst.Template`. - Eliminate the self pipe and copy `seccomp` program into managed memory. - Emulate `pam_systemd` `XDG_SESSION_TYPE` behaviour according to enablement bits. - Hakurei version is now exposed via `hst`. - Print cleaner `json` error messages from `cmd/hakurei`. - Improve `cmd/hakurei` container flags string representation. - Export `prctl` wrapper. - Improve signal handling in `container/init`. - Do not suspend output in `container/init` and `internal/outcome/shim`. - Store priv-side pid in state store entries. - Measure duration of finalise and each process state. Internal: - Almost all tests are parallelised. - Remove `internal/hlog`. - Remove global `Msg` implementation from `container`. - Package `internal/app` is renamed to `internal/outcome` and cleaned up, with some of its code relocated to independent packages. - Permissive defaults behaviour is eliminated and relocated to `cmd/hakurei` run command. - Clean up legacy `internal/outcome` integration tests. - Check against setgid bit in `cmd/hsu`. - Use much less ambiguous names which are set by the linker. - The `internal/store` interface is significantly improved, with much better efficiency and lower lock contention. - The `lockedfile` package is relocated from the tool chain, and can be used by project internals going forward. -----BEGIN SSH SIGNATURE----- U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAg/+8EpV0uLIR+MAtm7kYw4ssYDi TAEe6cY2wdrwBLU38AAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5 AAAAQOQyXB1zg0PIQVIO815lJKsgRoruEWhiosWX2KVwZOdsEl5f8mavSb84q4QPyBpcJ9 UbB0CHTG7Z1jf8/FKm+wU= -----END SSH SIGNATURE-----