protocol: don't place sockets in $HOME

No server will put them there and no client will look for it there.
This commit is contained in:
Wim Taymans 2021-07-27 10:57:31 +02:00
parent b70a3dca85
commit 8e8cb34dc2
2 changed files with 2 additions and 17 deletions

View file

@ -65,16 +65,8 @@ get_runtime_dir(void)
runtime_dir = getenv("PIPEWIRE_RUNTIME_DIR");
if (runtime_dir == NULL)
runtime_dir = getenv("XDG_RUNTIME_DIR");
if (runtime_dir == NULL)
runtime_dir = getenv("HOME");
if (runtime_dir == NULL)
runtime_dir = getenv("USERPROFILE");
if (runtime_dir == NULL) {
struct passwd pwd, *result = NULL;
char buffer[4096];
if (getpwuid_r(getuid(), &pwd, buffer, sizeof(buffer), &result) == 0)
runtime_dir = result ? result->pw_dir : NULL;
}
return runtime_dir;
}