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

linux: simplify setns with pidfd #1265

Merged
merged 1 commit into from
Aug 8, 2023

Commits on Aug 8, 2023

  1. linux: simplify setns with pidfd

    This caused an issue when the PID 1 didn't execve yet the container
    process, and joining the user namespace first would cause the user to
    look access to the container PID 1 namespaces.
    
    When running with enough permissions, setns() will allow to join all
    the namespaces in one shoot, so let's use it.
    
    On any error, attempt the fallback mechanism to join each namespace
    separately.
    
    Closes: containers#1264
    
    Signed-off-by: Giuseppe Scrivano <[email protected]>
    giuseppe committed Aug 8, 2023
    Configuration menu
    Copy the full SHA
    88441d9 View commit details
    Browse the repository at this point in the history