mirror of
https://github.com/swaywm/sway.git
synced 2026-04-28 06:46:26 -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;
|
||||
wl_client_get_credentials((struct wl_client *)client, &pid, NULL, NULL);
|
||||
if (pid == 0) {
|
||||
#ifdef __FreeBSD__
|
||||
wlr_log(WLR_DEBUG, "Host doesn't support Wayland credentials, "
|
||||
"cannot enforce security rules");
|
||||
return true;
|
||||
#else
|
||||
wlr_log(WLR_ERROR, "Failed to get Wayland connection credentials");
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
char cmd[PATH_MAX + 1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue