1 From f5555b045a64231d4beaba51cbbf5f5485173900 Mon Sep 17 00:00:00 2001
2 From: Ronan Le Martret <ronan.lemartret@iot.bzh>
3 Date: Fri, 14 Apr 2017 19:04:32 +0200
4 Subject: [PATCH] Allow regular users to launch Weston
6 Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
8 configure.ac | 6 ++++++
9 src/launcher-direct.c | 2 ++
10 2 files changed, 8 insertions(+)
12 diff --git a/configure.ac b/configure.ac
13 index 1d11864..4e48d52 100644
16 @@ -131,6 +131,12 @@ if test x$enable_xkbcommon = xyes; then
17 COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon >= 0.3.0"
20 +AC_ARG_ENABLE(sys-uid, [ --enable-sys-uid],,
22 +if test x$enable_sys_uid = xyes; then
23 + AC_DEFINE(ENABLE_SYS_UID, [1], [Allow regular users to launch Weston])
26 AC_ARG_ENABLE(setuid-install, [ --enable-setuid-install],,
27 enable_setuid_install=yes)
28 AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes)
29 diff --git a/src/launcher-direct.c b/src/launcher-direct.c
30 index 29d9c28..1ac6651 100644
31 --- a/src/launcher-direct.c
32 +++ b/src/launcher-direct.c
33 @@ -272,8 +272,10 @@ launcher_direct_connect(struct weston_launcher **out, struct weston_compositor *
35 struct launcher_direct *launcher;
37 +#ifndef ENABLE_SYS_UID
42 launcher = zalloc(sizeof(*launcher));