From 807f6f8d8f98422cfcfe7e474e26a985d951af4d Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 31 Aug 2018 09:31:34 +0200 Subject: rootless: check uid with Geteuid() instead of Getuid() change the tests to use chroot to set a numeric UID/GID. Go syscall.Credential doesn't change the effective UID/GID of the process. Signed-off-by: Giuseppe Scrivano Closes: #1372 Approved by: mheon --- cmd/podman/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/podman/run.go') diff --git a/cmd/podman/run.go b/cmd/podman/run.go index d8a8a48d5..3445daef5 100644 --- a/cmd/podman/run.go +++ b/cmd/podman/run.go @@ -74,7 +74,7 @@ func runCmd(c *cli.Context) error { storageOpts.UIDMap = mappings.UIDMap storageOpts.GIDMap = mappings.GIDMap - if os.Getuid() != 0 { + if os.Geteuid() != 0 { rootless.SetSkipStorageSetup(true) } -- cgit v1.2.3-54-g00ecf