Skip to content
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

Cleanup XDGRuntime #3850

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

apostasie
Copy link
Contributor

@apostasie apostasie commented Jan 25, 2025

From reading code, it seems to me like:

  1. XDGRuntimeDir() should check the value of ROOTLESSKIT_PARENT_EUID (like ParentEUID does)
  2. getXDGRuntimeDir() in bypass4netns is essentially duplicating XDGRuntimeDir()
  3. getRuntimeVariableDataDir and CNIRuntimeDir should not ignore errors, and they seem to have faulty logic (relying on Geteuid regardless of conditions), or calling rootlessutil.ParentEUID which will redo stuff done already in XDGRuntimeDir()

PR addresses these.

@apostasie apostasie force-pushed the cleanup-xdg branch 2 times, most recently from b1c9415 to 890d40e Compare January 25, 2025 08:22
@apostasie
Copy link
Contributor Author

Was wondering if we should even incorporate into XDGRuntimeDir the extra logic

			if rootlessutil.IsRootlessChild() {
				return "", err
			}
			run = fmt.Sprintf("/run/user/%d", os.Geteuid())

but (for now) elected for pure refactoring with no change of behavior.

@apostasie
Copy link
Contributor Author

apostasie commented Jan 25, 2025

Not clear why the failures (some of it is definitely the usual stargz / layer not found), but the rest is weird (eg: platform timeout).

If we can poke it in case it is a fluke...

@apostasie apostasie marked this pull request as draft January 25, 2025 09:28
Signed-off-by: apostasie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant