Patchwork [Pull,v2,3/4] connman: create xuser

login
register
mail settings
Submitter Saul Wold
Date Nov. 1, 2011, 9:44 p.m.
Message ID <5f42fbce6e383b6330efde454da2cfe0a38df5cf.1320183757.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/14165/
State Accepted
Commit 8139ac9284031e00d6b268210b04b57670d9268a
Headers show

Comments

Saul Wold - Nov. 1, 2011, 9:44 p.m.
We create xuser here as a backup incase that xerver-nodm-init
is not on the system.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-connectivity/connman/connman.inc     |    7 ++++++-
 meta/recipes-connectivity/connman/connman_0.75.bb |    2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
Otavio Salvador - Nov. 2, 2011, 6:54 p.m.
On Tue, Nov 1, 2011 at 19:44, Saul Wold <sgw@linux.intel.com> wrote:
> We create xuser here as a backup incase that xerver-nodm-init
> is not on the system.

This is wrong. If xserver-nodm-init (btw, there's a typo on the commit
message) is not in the image user is suppose to know what he/she is
doing so we shouldn't add users not required to make their life
easier.
Saul Wold - Nov. 2, 2011, 11:23 p.m.
On 11/02/2011 11:54 AM, Otavio Salvador wrote:
> On Tue, Nov 1, 2011 at 19:44, Saul Wold<sgw@linux.intel.com>  wrote:
>> We create xuser here as a backup incase that xerver-nodm-init
>> is not on the system.
>
> This is wrong. If xserver-nodm-init (btw, there's a typo on the commit
> message) is not in the image user is suppose to know what he/she is
> doing so we shouldn't add users not required to make their life
> easier.
>

Otavio,

The situation is that when xserver-nodm-init is not installed or this is 
not a ROOTLESS_X, dbus still requires the xuser be available for 
connmand to run correctly.

Sau!
Otavio Salvador - Nov. 3, 2011, 12:45 a.m.
On Wed, Nov 2, 2011 at 21:23, Saul Wold <saul.wold@intel.com> wrote:
> On 11/02/2011 11:54 AM, Otavio Salvador wrote:
>>
>> On Tue, Nov 1, 2011 at 19:44, Saul Wold<sgw@linux.intel.com>  wrote:
>>>
>>> We create xuser here as a backup incase that xerver-nodm-init
>>> is not on the system.
>>
>> This is wrong. If xserver-nodm-init (btw, there's a typo on the commit
>> message) is not in the image user is suppose to know what he/she is
>> doing so we shouldn't add users not required to make their life
>> easier.
...
> The situation is that when xserver-nodm-init is not installed or this is not
> a ROOTLESS_X, dbus still requires the xuser be available for connmand to run
> correctly.

Something is wrong here; or it is being handled on the wrong package
or the design is wrong.

Shouldn't it be in base-passwd then?

Patch

diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index ae1b725..480b59c 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 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 8a02753..78f2199 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 = "r2"
+PR = "r3"
 
 EXTRA_OECONF += "\
   ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \