mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-01-29 14:40:26 +01:00
libei: Do not abort if LIBEI_SOCKET is not set
When called with NULL as the path to the EI socket, the function ei_setup_backend_socket() will fallback to the LIBEI_SOCKET environment variable to determine the path to the socket. If that environment variable is not set, ei_setup_backend_socket() will abort. That means that an innocent client running in an environment without EI support will be killed. If that client happens to be Xwayland, that would abort the Xserver and take all X11 clients with it, including the window manager itself in the case of mutter. Return -ENOENT instead so that clients have a chance to recover and survive the lack of EI support. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
parent
24a74f1b26
commit
325d7e6a43
1 changed files with 2 additions and 2 deletions
|
|
@ -83,8 +83,8 @@ ei_setup_backend_socket(struct ei *ei, const char *socketpath)
|
|||
if (!socketpath)
|
||||
socketpath = getenv("LIBEI_SOCKET");
|
||||
|
||||
assert(socketpath);
|
||||
assert(socketpath[0] != '\0');
|
||||
if (!socketpath || socketpath[0] == '\0')
|
||||
return -ENOENT;
|
||||
|
||||
_cleanup_free_ char *path = NULL;
|
||||
if (socketpath[0] == '/') {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue