Skip to content

Conversation

@cgwalters
Copy link
Collaborator

Prep for fixing #1434

Basically in the selinux path we copy our binary to a tempfile, which breaks /proc/self/exe.

Fix this by setting an environment variable when we do that re-exec and ensuring that everything references an internal API (now moved to utils/ so it can be shared) that looks for the env var first.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request centralizes the logic for finding the executable path to handle re-execution scenarios. The new bootc_utils::reexec::executable_path() function is a solid approach. My review focuses on a couple of places where this new utility was missed, one of which could lead to a critical runtime failure. Addressing these will make the implementation more robust and consistent with the goals of this change.

Prep for fixing bootc-dev#1434

Basically in the selinux path we copy our binary to a tempfile,
which breaks `/proc/self/exe`.

Fix this by setting an environment variable when we do that re-exec
and ensuring that *everything* references an internal API (now
moved to utils/ so it can be shared) that looks for the env
var first.
Copy link
Contributor

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@cgwalters cgwalters enabled auto-merge July 30, 2025 20:54
@cgwalters cgwalters merged commit 584a754 into bootc-dev:main Jul 31, 2025
22 of 27 checks passed
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.

2 participants