diff options
author | Ronan Le Martret <ronan.lemartret@iot.bzh> | 2017-04-19 16:16:03 +0200 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2017-05-16 04:51:29 +0000 |
commit | 6ca247d19f2a0d7cc0cb1beb8d26c99e7fac337b (patch) | |
tree | 33f4ff8ea9e3134bede9ff19ea2d596e437d0209 /meta-agl/recipes-graphics/wayland/weston | |
parent | 7c227f30c8437d2f5a7b95622d97a86149a716c8 (diff) |
Run weston with dedicated 'display' user and group
* Create a user/group display
* Allow weston to start without mandatory root user
* start weston-terminal for each user
Bug-AGL: SPEC-546
Change-Id: Id50acdbf5f7c07d5e0440575d42998b8819b5547
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/9135
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-boot-test: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Dominig ar Foll <dominig.arfoll@fridu.net>
Reviewed-by: José Bollo <jobol@nonadev.net>
Reviewed-by: Stéphane Desneux <stephane.desneux@iot.bzh>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl/recipes-graphics/wayland/weston')
-rw-r--r-- | meta-agl/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-agl/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston.patch b/meta-agl/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston.patch new file mode 100644 index 000000000..7b84a67ba --- /dev/null +++ b/meta-agl/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston.patch @@ -0,0 +1,46 @@ +From f5555b045a64231d4beaba51cbbf5f5485173900 Mon Sep 17 00:00:00 2001 +From: Ronan Le Martret <ronan.lemartret@iot.bzh> +Date: Fri, 14 Apr 2017 19:04:32 +0200 +Subject: [PATCH] Allow regular users to launch Weston + +Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh> +--- + configure.ac | 6 ++++++ + src/launcher-direct.c | 2 ++ + 2 files changed, 8 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 1d11864..4e48d52 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -131,6 +131,12 @@ if test x$enable_xkbcommon = xyes; then + COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon >= 0.3.0" + fi + ++AC_ARG_ENABLE(sys-uid, [ --enable-sys-uid],, ++ enable_sys_uid=no) ++if test x$enable_sys_uid = xyes; then ++ AC_DEFINE(ENABLE_SYS_UID, [1], [Allow regular users to launch Weston]) ++fi ++ + AC_ARG_ENABLE(setuid-install, [ --enable-setuid-install],, + enable_setuid_install=yes) + AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes) +diff --git a/src/launcher-direct.c b/src/launcher-direct.c +index 29d9c28..1ac6651 100644 +--- a/src/launcher-direct.c ++++ b/src/launcher-direct.c +@@ -272,8 +272,10 @@ launcher_direct_connect(struct weston_launcher **out, struct weston_compositor * + { + struct launcher_direct *launcher; + ++#ifndef ENABLE_SYS_UID + if (geteuid() != 0) + return -EINVAL; ++#endif + + launcher = zalloc(sizeof(*launcher)); + if (launcher == NULL) +-- +2.6.6 + |