mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
rootless: exec handle processes that create an user namespace
Manage the case where the main process of the container creates and joins a new user namespace. In this case we want to join only the first child in the new hierarchy, which is the user namespace that was used to create the container. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1331 Approved by: rhatdan
This commit is contained in:

committed by
Atomic Bot

parent
720eb85ba5
commit
c5753f57c1
@ -3,6 +3,8 @@
|
||||
package rootless
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
@ -30,3 +32,8 @@ func SetSkipStorageSetup(bool) {
|
||||
func SkipStorageSetup() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// GetUserNSForPid returns an open FD for the first direct child user namespace that created the process
|
||||
func GetUserNSForPid(pid uint) (*os.File, error) {
|
||||
return nil, errors.New("this function is not supported on this os")
|
||||
}
|
||||
|
Reference in New Issue
Block a user