summaryrefslogtreecommitdiff
path: root/pkg/rootless/rootless_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-11-12 00:17:34 -0800
committerGitHub <noreply@github.com>2018-11-12 00:17:34 -0800
commitd5375b59aafbf50c862bfb5ff895d4575375f1e7 (patch)
treefda08bb58dadba3915e3c92d47419e9daa29358c /pkg/rootless/rootless_linux.go
parent78e6d8e7d70d431ccf096dee0f8eadb1c9b2967b (diff)
parent542d8fe95f66c0a3aabb9d964c260a0b3b9aaae8 (diff)
downloadpodman-d5375b59aafbf50c862bfb5ff895d4575375f1e7.tar.gz
podman-d5375b59aafbf50c862bfb5ff895d4575375f1e7.tar.bz2
podman-d5375b59aafbf50c862bfb5ff895d4575375f1e7.zip
Merge pull request #1795 from rhatdan/user
Better document rootless containers
Diffstat (limited to 'pkg/rootless/rootless_linux.go')
-rw-r--r--pkg/rootless/rootless_linux.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go
index 5c45f2694..ff8c8fe34 100644
--- a/pkg/rootless/rootless_linux.go
+++ b/pkg/rootless/rootless_linux.go
@@ -187,6 +187,9 @@ func BecomeRootInUserNS() (bool, int, error) {
if username == "" {
user, err := user.LookupId(fmt.Sprintf("%d", os.Getuid()))
if err != nil && os.Getenv("PODMAN_ALLOW_SINGLE_ID_MAPPING_IN_USERNS") == "" {
+ if os.IsNotExist(err) {
+ return false, 0, errors.Wrapf(err, "/etc/subuid or /etc/subgid does not exist, see subuid/subgid man pages for information on these files")
+ }
return false, 0, errors.Wrapf(err, "could not find user by UID nor USER env was set")
}
if err == nil {