Merge pull request #11195 from Luap99/xdg-root

rootful: unset XDG_RUNTIME_DIR
This commit is contained in:
openshift-ci[bot]
2021-08-16 12:51:14 +00:00
committed by GitHub

View File

@ -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