| Age | Commit message (Collapse) | Author |
|
This is the initial step of implementing #19.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is a pretty solid implementation backed by robust tests, with a much cleaner interface.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This references the underlying multiBackend due to a typo, making the whole dance with c a noop.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is useful in some tests.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This header improves the robustness of the format and significantly reduces cleanup overhead.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The upper half is now a nanosecond timestamp. Lower half is still random bytes, so use lower half for short identifier.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This makes the resulting json easier to parse since it can now be deserialised into the config struct.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This can receive signals, so is more useful to the caller.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is now part of the hst API. This change also improves identifier generation and serialisation.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Init is not very talkative after process start even when verbose. Suspending output here is pointless and does more harm than good.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The SIGTERM signal is delivered in many other cases and can lead to strange behaviour. The unconditional resume of the logger also causes strange behaviour in the cancellation forwarding path. This change also passes through additional signals.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This does not yet have full coverage. Test cases covering failsafe paths and error injection will be added eventually.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This helps with other areas of the test suite as they're all based on hst.Template. This also helps contributors understand the behaviour of internal/app as hst.Template covers almost every aspect of it.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is quite a simple piece of code, this many test cases is excessive and wastes time in the integration vm.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This improves readability on narrower displays.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This enables instrumented testing of the shim.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is useful as package "syscall" does not provide such a wrapper. This change also improves error handling to fully conform to the manpage.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Goroutine scheduling is not helpful in the setuid wrapper, it is not particularly harmful but lock here anyway.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This covers invalid call to Init.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This package will also hold syscall lookup tables for seccomp.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is useful for a user-facing representation other than JSON. This also gets rid of the ugly, outdated flags string builder in cmd/hakurei.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The hst package only deals with data serialisation, however since many parts of hakurei make use of C libraries in some way it can be easy to inadvertently depend on cgo.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is cleaner than relying on the finalizer.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Updated according to evaluation warning.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This change handles errors returned by encoding/json and prints significantly cleaner messages.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These bits are arch-specific.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This avoids having arch-specific constants for arm64.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The hst API is tied to this version string.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These names are less ambiguous and should be understandable without reading the source code.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Sharing and persisting these directories do not always make sense. Make it optional here.
Closes #16.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This discontinues the dependency on shared tmpdir and xdg_runtime_dir implementation detail, for #16.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This no longer needs to be an independent outcomeOp since spFilesystemOp is moved late.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This should happen in hst since it requires no system state.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This enables configured filesystems to cover system mount points.
Closes #8.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This outcomeOp will likely never change.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This op is quite clean. Might get slightly more complex at some point passing socket fd.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This was mistakenly reporting sharePath on inequivalence causing very confusing output.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Another simple one. This will change when shared tmpdir and xdg runtime dir becomes optional.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The stub exec.ExitError is hairy as usual, but internal/app is not cross-platform, so this is okay.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This mostly helps with tests.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This was added to reduce the size of diffs.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This sets XDG_SESSION_TYPE to the corresponding values specified in pam_systemd(8) according to enablements.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This one is quite simple and has no state. Needs to emulate pam_systemd behaviour so that will change.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
There's quite a bit of code duplication here, but since this is already quite simple it is best to leave it as is for now.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The loadFile behaviour does not guarantee the buffer to be zeroed or not clobbered if an error is returned, but for the current implementation it is good to check.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The trailing zero bytes need to be sliced off, so send cookie size alongside buffer content.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Still needs to check the relocated functions separately.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This also improves readability of test cases.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These are better tested separately instead of creating many op test cases.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This will be merged with spFilesystemOp eventually.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|