Clean conf/layer.conf
[scm/bb/meta-tizen.git] / recipes-graphics / wayland / weston / 0003-downstream-allow-to-start-for-system-users.patch
1 From: Philippe Coval <philippe.coval@open.eurogiciel.org>
2 Date: Tue, 10 Jun 2014 15:01:27 +0200
3 Subject: downstream: allow to start for system users
4
5 Change-Id: I1529784d5dd9ce30e595de80c66d895d97338ff8
6 Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
7 ---
8  src/launcher-util.c | 4 ++++
9  1 file changed, 4 insertions(+)
10
11 diff --git a/src/launcher-util.c b/src/launcher-util.c
12 index ac764dc..f53bb33 100644
13 --- a/src/launcher-util.c
14 +++ b/src/launcher-util.c
15 @@ -409,7 +409,11 @@ weston_launcher_connect(struct weston_compositor *compositor, int tty,
16                                           seat_id, tty);
17                 if (r < 0) {
18                         launcher->logind = NULL;
19 +#ifdef LOCAL_CONFIG_WESTON_ALLOW_SYS_UID
20 +                       if (geteuid() <= 499) { /* 499 = SYS_UID_MAX in login.defs, but it should be parsed */
21 +#else
22                         if (geteuid() == 0) {
23 +#endif
24                                 if (setup_tty(launcher, tty) == -1) {
25                                         free(launcher);
26                                         return NULL;