mirror of
https://github.com/containers/podman.git
synced 2025-10-25 02:04:43 +08:00
Eval symlinks on XDG_RUNTIME_DIR
Partial Fix for https://github.com/containers/podman/issues/14606 [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -105,6 +105,10 @@ func setXdgDirs() error {
|
||||
if _, found := os.LookupEnv("DBUS_SESSION_BUS_ADDRESS"); !found {
|
||||
sessionAddr := filepath.Join(os.Getenv("XDG_RUNTIME_DIR"), "bus")
|
||||
if _, err := os.Stat(sessionAddr); err == nil {
|
||||
sessionAddr, err = filepath.EvalSymlinks(sessionAddr)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
os.Setenv("DBUS_SESSION_BUS_ADDRESS", "unix:path="+sessionAddr)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user