summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-10-18 16:20:26 -0400
committerMatthew Heon <matthew.heon@gmail.com>2018-10-23 10:33:38 -0400
commitfba494de8e3ac9c5b5d316d1cd3041f461e89ef2 (patch)
tree1a66cf731f698b8edc1427040015e1aacbfb1676 /libpod/runtime.go
parentab2b3d64ceaf496107c734575581460185c97369 (diff)
downloadpodman-fba494de8e3ac9c5b5d316d1cd3041f461e89ef2.tar.gz
podman-fba494de8e3ac9c5b5d316d1cd3041f461e89ef2.tar.bz2
podman-fba494de8e3ac9c5b5d316d1cd3041f461e89ef2.zip
Use more reliable check for rootless for firewall init
We probably won't be able to initialize a firewall plugin when we are not running as root, so we shouldn't even try. Replace the less-effect EUID check with the rootless package's better check to make sure we don't accidentally set up the firewall in these cases. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index f012d66c2..1b26f851f 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -508,7 +508,7 @@ func makeRuntime(runtime *Runtime) (err error) {
// Set up a firewall backend
backendType := ""
- if os.Geteuid() != 0 {
+ if rootless.IsRootless() {
backendType = "none"
}
fwBackend, err := firewall.GetBackend(backendType)