Commit 58bb064a authored by Pekka Paalanen's avatar Pekka Paalanen Committed by Kristian Høgsberg
Browse files

client: unset WAYLAND_SOCKET env variable



WAYLAND_SOCKET contains a file descriptor that is an open connection to
a Wayland server. It is private to us, and makes no sense to relay the
same value (or any value) to our child processes.

Unset the environment variable to prevent it from being accidentally
relayed to other processes.
Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <ppaalanen@gmail.com>
parent cf89b40c
......@@ -352,6 +352,7 @@ wl_display_connect(const char *name)
flags = fcntl(display->fd, F_GETFD);
if (flags != -1)
fcntl(display->fd, F_SETFD, flags | FD_CLOEXEC);
unsetenv("WAYLAND_SOCKET");
} else if (connect_to_socket(display, name) < 0) {
free(display);
return NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment