]> code.ossystems Code Review - openembedded-core.git/commitdiff
connman: Use useradd to add the xuser for DBus
authorSaul Wold <sgw@linux.intel.com>
Thu, 27 Oct 2011 14:15:36 +0000 (16:15 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 2 Nov 2011 08:21:01 +0000 (08:21 +0000)
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]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-connectivity/connman/connman.inc
meta/recipes-connectivity/connman/connman_0.75.bb

index ae1b725e7dd0b781afe986a9fce7de83f1942149..480b59cb5c459063ed5f4cfe2a02cf7d22203ccd 100644 (file)
@@ -18,7 +18,12 @@ DEPENDS  = "libgdbus dbus glib-2.0 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/
index 8a02753f043c62e7b0ae82074dfb059f37d50a89..78f2199d0c7cf40d77d8c7995f4f1f6995af13a6 100644 (file)
@@ -1,5 +1,5 @@
 require connman.inc
-PR = "r2"
+PR = "r3"
 
 EXTRA_OECONF += "\
   ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \