Patchwork [2/2] shadow: use 'users' group by default

login
register
mail settings
Submitter Otavio Salvador
Date July 20, 2012, 6:13 p.m.
Message ID <1342808031-21564-2-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/32749/
State New
Headers show

Comments

Otavio Salvador - July 20, 2012, 6:13 p.m.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/recipes-extended/shadow/shadow_4.1.4.3.bb |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
Otavio Salvador - July 20, 2012, 6:16 p.m.
On Fri, Jul 20, 2012 at 3:13 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

This would be nice to have included in next denzil.
Richard Purdie - July 22, 2012, 12:18 p.m.
On Fri, 2012-07-20 at 15:16 -0300, Otavio Salvador wrote:
> On Fri, Jul 20, 2012 at 3:13 PM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
> > Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> 
> This would be nice to have included in next denzil.

Reading the one line description of this, I have no idea what the
problem was or how this solves it. Its therefore unlikely to make it
into master, let alone denzil. Can you provide more detail please.

Cheers,

Richard
Otavio Salvador - July 22, 2012, 6:32 p.m.
On Sun, Jul 22, 2012 at 9:18 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Fri, 2012-07-20 at 15:16 -0300, Otavio Salvador wrote:
>> On Fri, Jul 20, 2012 at 3:13 PM, Otavio Salvador
>> <otavio@ossystems.com.br> wrote:
>> > Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>>
>> This would be nice to have included in next denzil.
>
> Reading the one line description of this, I have no idea what the
> problem was or how this solves it. Its therefore unlikely to make it
> into master, let alone denzil. Can you provide more detail please.

The current setting makes useradd to create an user with group 1000 by
default (in Debian, users group) but in Yocto users group is 100 and
there's no 1000 group by default.

Patch

diff --git a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
index 506f4e6..b9ff6e0 100644
--- a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
@@ -9,7 +9,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
 
 DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 RDEPENDS_${PN} = "shadow-securetty ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}"
-PR = "r10"
+PR = "r11"
 
 SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \
            file://login_defs_pam.sed \
@@ -85,6 +85,9 @@  do_install_append() {
 	sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd
 	sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd
 
+	# Use users group by default
+	sed -i sed 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd
+
 	install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} 
 
 	# Move binaries to the locations we want