aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app
AgeCommit message (Collapse)Author
2025-10-11internal/app/spaccount: check behaviourOphestra
This begins the effort of fully covering internal/app. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-11internal/app/spaccount: apply default in shimOphestra
The original code clobbers hst.Config, and was not changed when being ported over. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10internal/app: relocate params state initialisationOphestra
This is useful for testing. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10internal/app: relocate state initialisationOphestra
This is useful for testing. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10internal/app: hold path hiding in opOphestra
This makes no sense to be part of the global state. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10hst/config: negative WaitDelay bypasses defaultOphestra
This behaviour might be useful, so do not lock it out. This change also fixes an oversight where the unchecked value is used to determine ForwardCancel. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10internal/app: copy parts of config to stateOphestra
This is less error-prone than passing the address to the entire hst.Config struct, and reduces the likelihood of accidentally clobbering hst.Config. This also improves ease of testing. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10internal/app: filter ops in implementationOphestra
This is cleaner and less error-prone, and should also result in negligibly less memory allocation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-10internal/app: hold config address in stateOphestra
This can be removed eventually as it is barely used. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-09message: relocate from containerOphestra
This package is quite useful. This change allows it to be imported without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-09internal/app: do not encode config earlyOphestra
Finalise no longer clobbers hst.Config. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-08internal/app: build container state in shimOphestra
This significantly decreases ipc overhead. Closes #3. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-08internal/app: check transmitted opsOphestra
This simulates params to shim and this is the last step before params to shim is merged. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-08internal/app: relocate ops conditionOphestra
This allows reuse and finer grained testing of fromConfig. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-08internal/app: relocate dynamic exported stateOphestra
This allows reuse of the populateEarly method in test instrumentation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-08internal/app: relocate late sys/params outcomeOphestra
This will end up merged with another op after reordering. For now relocate it into its dedicated op for test instrumentation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07hst/fs: access ops through interfaceOphestra
This removes the final hakurei.app/container import from hst. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07container/bits: move bind bitsOphestra
This allows referring to the bits without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07container/fhs: move pathname constantsOphestra
This allows referencing FHS pathnames without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07container/check: move absolute pathnameOphestra
This allows use of absolute pathname values without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07hst/dbus: move dbus config structOphestra
This allows holding a xdg-dbus-proxy configuration without importing system/dbus. It also makes more sense in the project structure since the config struct is part of the hst API however the rest of the implementation is not. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07container: move seccomp preset bitsOphestra
This allows holding the bits without cgo. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07hst/config: identity bounds check earlyOphestra
This makes sense to do here instead of in internal/app. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07hst/config: move container fields from toplevelOphestra
This change also moves pd behaviour to cmd/hakurei, as this does not belong in the hst API. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-05internal/app: check nscd socket for path hidingOphestra
This can seriously break things, and exposes extra host attack surface, so include it here. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-05hst: reword and move constantsOphestra
These values are considered part of the stable, exported API, so move them to hst. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-05internal/app: merge static stubOphestra
These tests now serve as integration tests, and finer grained tests for each op will be added slowly. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-05internal/app: do not offset base valueOphestra
This value is applied to the shim, it is incorrect to offset the base value as well. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-05internal/app: apply pd behaviour to outcomeStateOphestra
This avoids needlessly clobbering hst.Config. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-05system/wayland: hang up security-context-v1 internallyOphestra
This should have been an implementation detail and should not be up to the caller to close. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-05internal/app: modularise outcome finaliseOphestra
This is the initial effort of splitting up host and container side of finalisation for params to shim. The new layout also enables much finer grained unit testing of each step, as well as partition access to per-app state for each step. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-04system/dbus: dump buffer internallyOphestra
This should have been an implementation detail and should not be up to the caller to call it. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-03internal/app: declutter and merge small filesOphestra
This should make internal/app easier to work with for the upcoming params to shim. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-03internal/app: check username validationOphestra
This stuff should be hardcoded in libc, but check it anyway. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-03system: enforce absolute pathsOphestra
This is less error-prone, and is quite easy to integrate considering internal/app has already migrated to container.Absolute. Closes #11. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-30internal/app/paths: defer extra formattingOphestra
This reduces payload size for params to shim. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-29internal/app/paths: do not print messagesOphestra
This change was missed while merging the rest of the logging changes. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-29hst/config: remove seccomp bit fieldsOphestra
These serve little purpose and are not friendly for use from other languages. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-29hst/enablement: move bits from systemOphestra
This is part of the hst API, should not be in the implementation package. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-29container: remove global msgOphestra
This frees all container instances of side effects. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-25internal: remove sys packageOphestra
This package is replaced by container/stub. Remove and replace it with unexported implementation for the upcoming test suite rewrite. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-25internal/app: merge finalise test casesOphestra
This cleans everything up a bit for the upcoming test suite rewrite. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-24cmd/hsu: return hsurc idOphestra
The uid format is stable, this value is what caller has to obtain through hsu. Closes #14. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-24internal/app: handle LookupGroup errorOphestra
This could return errnos from the cgo calls. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-24internal/app: unexport outcome, remove app structOphestra
The App struct no longer does anything, and the outcome struct is entirely opaque. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-24internal/app: do not return from shim startOphestra
The whole RunState ugliness and the other horrendous error handling conditions for internal/app come from an old design proposal for maintaining all app containers under the same daemon process for a user. The proposal was ultimately rejected but the implementation remained. It is removed here to alleviate internal/app from much of its ugliness and unreadability. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-16internal/app: compensate shim timeoutOphestra
This catches cases where the shim has somehow locked up, so it should wait out the full shim WaitDelay as well. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-15internal/sys: separate hsu uid cacheOphestra
This begins the effort of the removal of the sys package. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-15hst: replace internal/app errorOphestra
This turns out to still be quite useful across internal/app and its relatives. Perhaps a cleaner replacement for baseError. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-14internal/app: mount /dev/shm earlyOphestra
This avoids covering /dev/shm mounts from hst. Signed-off-by: Ophestra <cat@gensokyo.uk>