Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions pkg/rootlessutil/parent_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ func ParentMain(hostGatewayIP string) error {
if err != nil {
return err
}
// args are compatible with both util-linux nsenter and busybox nsenter
args := []string{
"-r/", // root dir (busybox nsenter wants this to be explicitly specified),
}
args := []string{arg0}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The removed comment mentioned busybox nsenter compatibility with -r/. Now that the flag is intentionally absent, a short note here explaining why it is omitted would help future readers avoid re-adding it. For example:

// Note: -r/ (root dir) is intentionally omitted. In rootless mode, chrooting to
// the host root before setns would anchor the process to host paths that are
// inaccessible inside the user namespace, breaking overlay mounts.
args := []string{arg0}


// Only append wd if we do have a working dir
// - https://github.com/rootless-containers/usernetes/pull/327
Expand Down
Loading