summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2021-08-16 12:51:14 +0000
committerGitHub <noreply@github.com>2021-08-16 12:51:14 +0000
commit41fb06a251f5639a1347b15f2e3ecdca54efa664 (patch)
tree7ad0c4a77e9e10ef7ffd1a3e2f46907e38797a3b /cmd
parent9ee9d4a0722b2a31d95066a4e3ce756a8b4d15ac (diff)
parent91e21bed48a2ab11049ef20e9150b5be531bc50a (diff)
downloadpodman-41fb06a251f5639a1347b15f2e3ecdca54efa664.tar.gz
podman-41fb06a251f5639a1347b15f2e3ecdca54efa664.tar.bz2
podman-41fb06a251f5639a1347b15f2e3ecdca54efa664.zip
Merge pull request #11195 from Luap99/xdg-root
rootful: unset XDG_RUNTIME_DIR
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/registry/config.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/podman/registry/config.go b/cmd/podman/registry/config.go
index b512ba341..50e488b02 100644
--- a/cmd/podman/registry/config.go
+++ b/cmd/podman/registry/config.go
@@ -89,7 +89,12 @@ func newPodmanConfig() {
// use for the containers.conf configuration file.
func setXdgDirs() error {
if !rootless.IsRootless() {
- return nil
+ // unset XDG_RUNTIME_DIR for root
+ // Sometimes XDG_RUNTIME_DIR is set to /run/user/0 sometimes it is unset,
+ // the inconsistency is causing issues for the dnsname plugin.
+ // It is already set to an empty string for conmon so lets do the same
+ // for podman. see #10806 and #10745
+ return os.Unsetenv("XDG_RUNTIME_DIR")
}
// Setup XDG_RUNTIME_DIR