mirror of
https://github.com/swaywm/sway.git
synced 2026-04-29 06:46:22 -04:00
Fail if wl_client_get_credentials fails on non-FreeBSD systems
This commit is contained in:
parent
6b200ca7e3
commit
fa255aa994
1 changed files with 5 additions and 0 deletions
|
|
@ -68,9 +68,14 @@ static bool global_filter(const struct wl_client *client,
|
||||||
pid_t pid = 0;
|
pid_t pid = 0;
|
||||||
wl_client_get_credentials((struct wl_client *)client, &pid, NULL, NULL);
|
wl_client_get_credentials((struct wl_client *)client, &pid, NULL, NULL);
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
|
#ifdef __FreeBSD__
|
||||||
wlr_log(WLR_DEBUG, "Host doesn't support Wayland credentials, "
|
wlr_log(WLR_DEBUG, "Host doesn't support Wayland credentials, "
|
||||||
"cannot enforce security rules");
|
"cannot enforce security rules");
|
||||||
return true;
|
return true;
|
||||||
|
#else
|
||||||
|
wlr_log(WLR_ERROR, "Failed to get Wayland connection credentials");
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
char cmd[PATH_MAX + 1];
|
char cmd[PATH_MAX + 1];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue