summaryrefslogtreecommitdiff
path: root/pkg/rootless/rootless_linux.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-05-24 09:41:06 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-05-25 13:48:00 +0200
commit153503e3916accf3da27c4893a37ea94731ac2c7 (patch)
tree87d8f98c05e6d1ecd281b430f8637d230a5b504a /pkg/rootless/rootless_linux.go
parentc4dedd302182fa44492baf7b0f9da3f148a08ae4 (diff)
downloadpodman-153503e3916accf3da27c4893a37ea94731ac2c7.tar.gz
podman-153503e3916accf3da27c4893a37ea94731ac2c7.tar.bz2
podman-153503e3916accf3da27c4893a37ea94731ac2c7.zip
rootless: make JoinUserAndMountNS private
as it is used only by the rootless package now. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/rootless/rootless_linux.go')
-rw-r--r--pkg/rootless/rootless_linux.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go
index 3743911b8..d302b1777 100644
--- a/pkg/rootless/rootless_linux.go
+++ b/pkg/rootless/rootless_linux.go
@@ -206,10 +206,10 @@ func enableLinger(pausePid string) {
}
}
-// JoinUserAndMountNS re-exec podman in a new userNS and join the user and mount
+// 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.
-func JoinUserAndMountNS(pid uint, pausePid string) (bool, int, error) {
+func joinUserAndMountNS(pid uint, pausePid string) (bool, int, error) {
enableLinger(pausePid)
if os.Geteuid() == 0 || os.Getenv("_CONTAINERS_USERNS_CONFIGURED") != "" {
@@ -357,7 +357,7 @@ func becomeRootInUserNS(pausePid, fileToRead string, fileOutput *os.File) (bool,
if err == nil {
pid, err := strconv.ParseUint(string(data), 10, 0)
if err == nil {
- return JoinUserAndMountNS(uint(pid), "")
+ return joinUserAndMountNS(uint(pid), "")
}
}
return false, -1, errors.Wrapf(err, "error setting up the process")
@@ -480,5 +480,5 @@ func TryJoinFromFilePaths(pausePidPath string, needNewNamespace bool, paths []st
return false, 0, lastErr
}
- return JoinUserAndMountNS(uint(pausePid), pausePidPath)
+ return joinUserAndMountNS(uint(pausePid), pausePidPath)
}