-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
determine_root_path() isn't quite right for XDG_RUNTIME_DIR and /run/user/{} cases #487
Comments
@dgibson Thanks for your report. The part you pointed out is here, right? |
When using a root state directory from $XDG_RUNTIME_DIR, or from it's default value of /run/user/<uid>, we don't add a tag specific to youki to the path. That means the directories for individual containers will be placed directly in the general use runtime dir. That's against normal conventions, and could mean that "youki list" will see files or directories from other software as if they were youki managed containers. Therefore, add "youki" to the base runtime path from XDG. fixes youki-dev#487 Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Yes, that's it.
I should clarify - I don't have some special knowledge here, I just looked at what's in that directory on my system, and it appears to be subdivided by the program using it:
|
For rootless operation,
determine_root_path()
will select from one of four options for the root state directory:$XDG_RUNTIME_DIR
/run/user/<uid>
$HOME/.youki/run
/tmp/youki/<uid>
Options (1) and (2) will often amount to the same thing, since
/run/user/<uid>
is the default value for$XDG_RUNTIME_DIR
on most systems. But, in both these cases we don't include "youki", or a similar tag in the path at all, so state directories for each container will be placed directly underneath the runtime directory.That doesn't match normal conventions, where each program puts its own subdir under the runtime dir. More importantly, it means that
youki list
which works by iterating through the subdirectories of the root dir will list unrelated things from other tools as though they were containers.The text was updated successfully, but these errors were encountered: