diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-05-29 17:12:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-29 17:12:40 +0200 |
commit | aed91ce3bf9f603375bb675dbd4978147371ff9e (patch) | |
tree | 2a32fa28b91d9d89d66005fc35de5eb7ba4bd859 /pkg/rootless/rootless_unsupported.go | |
parent | 8649dbdc11bc14feb59794d76ba197771d8a6d51 (diff) | |
parent | 153503e3916accf3da27c4893a37ea94731ac2c7 (diff) | |
download | podman-aed91ce3bf9f603375bb675dbd4978147371ff9e.tar.gz podman-aed91ce3bf9f603375bb675dbd4978147371ff9e.tar.bz2 podman-aed91ce3bf9f603375bb675dbd4978147371ff9e.zip |
Merge pull request #3188 from giuseppe/fix-join-existing-containers
rootless: new function to join existing conmon processes
Diffstat (limited to 'pkg/rootless/rootless_unsupported.go')
-rw-r--r-- | pkg/rootless/rootless_unsupported.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/pkg/rootless/rootless_unsupported.go b/pkg/rootless/rootless_unsupported.go index 221baff97..c063adee5 100644 --- a/pkg/rootless/rootless_unsupported.go +++ b/pkg/rootless/rootless_unsupported.go @@ -29,10 +29,14 @@ func GetRootlessGID() int { return -1 } -// JoinUserAndMountNS re-exec podman in a new userNS and join the user and mount -// namespace of the specified PID without looking up its parent. Useful to join directly -// the conmon process. It is a convenience function for JoinUserAndMountNSWithOpts -// with a default configuration. -func JoinUserAndMountNS(pid uint, pausePid string) (bool, int, error) { +// TryJoinFromFilePaths attempts to join the namespaces of the pid files in paths. +// This is useful when there are already running containers and we +// don't have a pause process yet. We can use the paths to the conmon +// processes to attempt joining their namespaces. +// If needNewNamespace is set, the file is read from a temporary user +// namespace, this is useful for containers that are running with a +// different uidmap and the unprivileged user has no way to read the +// file owned by the root in the container. +func TryJoinFromFilePaths(pausePidPath string, needNewNamespace bool, paths []string) (bool, int, error) { return false, -1, errors.New("this function is not supported on this os") } |