mirror of
https://github.com/games-on-whales/LXC2Docker.git
synced 2026-10-15 21:02:07 +00:00
[PR #62] [MERGED] fix(mounts): don't host-back XDG_RUNTIME_DIR when a sibling populates it #62
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/LXC2Docker#62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/LXC2Docker/pull/62
Author: @JBailes
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/5/2026
Merged by: @JBailes
Base:
main← Head:fix/runtime-dir-host-back-shadows-siblings📝 Commits (1)
ddefaa9fix(mounts): don't host-back XDG_RUNTIME_DIR when a sibling populates it📊 Changes
4 files changed (+91 additions, -4 deletions)
View changed files
📝
internal/api/containers.go(+9 -0)📝
internal/api/sibling_mount_test.go(+11 -0)📝
internal/lxc/manager.go(+36 -4)📝
internal/lxc/manager_test.go(+35 -0)📄 Description
Follow-up to #59. On runtimes where Wolf cannot introspect its own container (e.g. the SmoothNAS LXC backend, which has no Docker container API for Wolf itself), Wolf passes its host-path
XDG_RUNTIME_DIRto siblings and mounts its wayland/pulse sockets as child paths ($XDG_RUNTIME_DIR/<socket>, seesessions/common.cpp), not as a single whole-dir bind.ensureRuntimeDirMountonly skipped host-backing when an existing mount was at or aboveXDG_RUNTIME_DIR, so it still fired here and appended an empty host-backed dir over those child socket mounts — shadowing them. The app container then dies withCould not connect to remote display/Cant connect to a Wayland display. (Confirmed on the appliance: one emptystate/runtime/<id>/host-back dir per app container, and Wolf-UI/Steam failing to reach the display.)Changes
ensureRuntimeDirMount: also suppress host-backing when an existing mount is a child ofXDG_RUNTIME_DIR— a sibling already provides the shared content, so host-backing would only shadow it. The PulseAudio-sibling case from #59 (no child mounts; owner creates the dir at runtime) is unchanged.prepareRootfs: createXDG_RUNTIME_DIRwith a traversable parent chain (0755 parents, 0700 leaf) instead ofos.MkdirAll(dir, 0o700), which made every intermediate of a deep runtime dir0700 rootand blocked the non-root run-user (gowsretro) from traversing to the socket.Tests added for both: the child-mount suppression case and the traversable-parents/0700-leaf invariant. Existing #59 tests still pass.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.