Revert "rootful: unset XDG_RUNTIME_DIR"

This reverts commit 91e21bed48.

XDG_RUNTIME_DIR is required for the authfile path. We cannot unset it.

[NO TESTS NEEDED]

Fixes #11725

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2021-09-24 10:40:15 +02:00
parent 800d594afa
commit 1cf66f514f
No known key found for this signature in database
GPG Key ID: EB145DD938A3CAF2
1 changed files with 1 additions and 6 deletions

View File

@ -89,12 +89,7 @@ func newPodmanConfig() {
// use for the containers.conf configuration file.
func setXdgDirs() error {
if !rootless.IsRootless() {
// 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")
return nil
}
// Setup XDG_RUNTIME_DIR