Create $XDG_RUNTIME_DIR in /run/user/{uid}#203
Conversation
|
I couldn't find a justification for using |
5199214 to
ce4086e
Compare
|
I think it should be changed, yeah, but some other existing assumptions might need to be fixed, e.g. muvm/crates/muvm/src/guest/mount.rs Line 35 in 5b35e56 The other thing I could think of is, maybe this ( |
|
AIUI the part where I changed is in the user initialization part, which happens after FEX init, so |
|
Hmm... Actually, if we're changing this, why are we not just using the typical Anyway, relevant part from the spec:
|
|
Oh, good idea. I'll change it to |
ce4086e to
183f414
Compare
|
The directory and permissions now looks like this $ namei -l $XDG_RUNTIME_DIR
f: /run/user/1000
drwxr-xr-x root root /
drwxrwxrwt root root run
drwxr-xr-x root root user
drwx------ dram users 1000 |
6c2e2ee to
c7a6520
Compare
IIRC it's in |
|
Please fix the clippy issue. Otherwise LGTM, thanks! |
Using tempfile::Builder::tempdir() defaults to creating this directory
in /tmp, which is shared with the host and often somewhat persistent.
This causes one extra directory to be created in the host /tmp every
time muvm runs.
Since we mount /run as a tmpfs now in the guest now, just create
$XDG_RUNTIME_DIR in /run/user/{uid}, a common default. Specifically:
- Create /run/user as 0o755 (rwxr-xr-x) owned by root:root
- Create /run/user/{uid} as 0o700 (rwx------) owned by uid:gid
Signed-off-by: Vivian Wang <[email protected]>
c7a6520 to
c421925
Compare
|
Clippy should be happy now |
Using tempfile::Builder::tempdir() defaults to creating this directory in /tmp, which is shared with the host and often somewhat persistent. This causes one extra directory to be created in the host /tmp every time muvm runs.
Since we mount /run as a tmpfs now in the guest now, just create $XDG_RUNTIME_DIR in /run/user/{uid}, a common default. Specifically: