mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 15:48:05 +02:00
weston-launcher: use CLOEXEC on fallback path
If there is no weston-launcher available, launcher-util.c will fall back to opening the given file itself. It that case it does not set the close-on-exec flag, and will presumably leak the file descriptor to children. Use O_CLOEXEC on the fallback path, too. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
8ff691593c
commit
27979b053f
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ weston_launcher_open(struct weston_compositor *compositor,
|
|||
struct weston_launcher_open *message;
|
||||
|
||||
if (sock == -1)
|
||||
return open(path, flags);
|
||||
return open(path, flags | O_CLOEXEC);
|
||||
|
||||
n = sizeof(*message) + strlen(path) + 1;
|
||||
message = malloc(n);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue