summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-06-01 13:16:25 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-06-15 14:53:18 +0000
commitc976d49805aa909ca3ec2de318852b5c5d378656 (patch)
tree7dcbc4cd7b1003bcdf430534cf7361097a361a9b /libpod/container_internal.go
parent3861098fb39b8f83490d6d4ab600364b92a4fb59 (diff)
downloadpodman-c976d49805aa909ca3ec2de318852b5c5d378656.tar.gz
podman-c976d49805aa909ca3ec2de318852b5c5d378656.tar.bz2
podman-c976d49805aa909ca3ec2de318852b5c5d378656.zip
network: do not attempt to create a network in rootless mode
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #871 Approved by: mheon
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 0698222a1..820f2209f 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -512,6 +512,9 @@ func (c *Container) completeNetworkSetup() error {
if !c.config.PostConfigureNetNS {
return nil
}
+ if os.Getuid() != 0 {
+ return nil
+ }
if err := c.syncContainer(); err != nil {
return err
}