From 8cf7c76ce1fd648bb1625961c6b902c2b4ffe8a7 Mon Sep 17 00:00:00 2001 From: Saul Wold Date: Thu, 27 Oct 2011 16:15:36 +0200 Subject: [PATCH] connman: Use useradd to add the xuser for DBus Connmand needs to start as the xuser as defined in the dbus configuration and needs to share this with rootless X. Since it's possible for connmand to run on a sytem without rootless X we still need to create the user here. Useradd will fail gracefully if the user already exists. Fixes: [YOCTO #1699] (From OE-Core rev: 8139ac9284031e00d6b268210b04b57670d9268a) (From OE-Core rev: 835ab34adb6acf562e37db99a1dd24f7b8bd95ec) Signed-off-by: Saul Wold Signed-off-by: Richard Purdie Conflicts: meta/recipes-connectivity/connman/connman_0.75.bb --- meta/recipes-connectivity/connman/connman.inc | 7 ++++++- meta/recipes-connectivity/connman/connman_0.75.bb | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc index a72c34a183..b6c1330be4 100644 --- a/meta/recipes-connectivity/connman/connman.inc +++ b/meta/recipes-connectivity/connman/connman.inc @@ -18,7 +18,12 @@ DEPENDS = "libgdbus dbus glib-2.0 hal iptables" INITSCRIPT_NAME = "connman" INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." -inherit autotools pkgconfig update-rc.d +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --no-create-home \ + --shell /bin/false --groups video,tty,audio \ + --user-group xuser" + +inherit autotools pkgconfig update-rc.d useradd do_install_append() { install -d ${D}${sysconfdir}/init.d/ diff --git a/meta/recipes-connectivity/connman/connman_0.75.bb b/meta/recipes-connectivity/connman/connman_0.75.bb index 5a7b28429a..5c5472da7f 100644 --- a/meta/recipes-connectivity/connman/connman_0.75.bb +++ b/meta/recipes-connectivity/connman/connman_0.75.bb @@ -1,5 +1,5 @@ require connman.inc -PR = "r1" +PR = "r2" EXTRA_OECONF += "\ ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \