b04127b576c85dcb4346a99b4bfc576b5bd79092
[AGL/meta-agl.git] / meta-agl / recipes-graphics / wayland / wayland / 0001-Change-socket-mode-add-rw-for-group.patch
1 From 9162f7d4cfeec7103474e8703218b3679ca9ed10 Mon Sep 17 00:00:00 2001
2 From: Ronan Le Martret <ronan.lemartret@iot.bzh>
3 Date: Tue, 18 Apr 2017 13:53:26 +0200
4 Subject: [PATCH] Change socket mode:add rw for group
5
6 Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
7 ---
8  src/wayland-server.c | 5 ++++-
9  1 file changed, 4 insertions(+), 1 deletion(-)
10
11 diff --git a/src/wayland-server.c b/src/wayland-server.c
12 index 64d1bec..313c5a0 100644
13 --- a/src/wayland-server.c
14 +++ b/src/wayland-server.c
15 @@ -1189,7 +1189,10 @@ _wl_display_add_socket(struct wl_display *display, struct wl_socket *s)
16                 wl_log("bind() failed with error: %m\n");
17                 return -1;
18         }
19 -
20 +       if (chmod(s->addr.sun_path, 0660) < 0) {
21 +               wl_log("chmod() failed with error: %m\n");
22 +               return -1;
23 +       }
24         if (listen(s->fd, 128) < 0) {
25                 wl_log("listen() failed with error: %m\n");
26                 return -1;
27 -- 
28 2.6.6
29