chrony: add group argument to useradd command
PATCH 1/1 chrony: add group argument to useradd command
If privdrop is enabled, the following error happens during the build process:
useradd: group chronyd exists - if you want to add this user to that group, use -g.
Several other recipes have added "-g $somegroup" to USERADD_PARAM, and as such, chrony should follow suit.
--- meta-networking/recipes-support/chrony/chrony_4.8.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-support/chrony/chrony_4.8.bb +1 -1
@@ -47,7 +47,7 @@ inherit update-rc.d systemd pkgconfig # Add chronyd user if privdrop packageconfig is selected inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 'useradd', '', d)} USERADD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '${PN}', '', d)}" -USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '--system -d / -M --shell /sbin/nologin chronyd;', '', d)}" +USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '--system -d / -M -g chronyd --shell /sbin/nologin chronyd;', '', d)}" GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '--system chronyd', '', d)}" # Configuration options:
Signature · 1 line
2.54.0
Adam Duskett via lists.openembedded.org schrieb am Mo 18. Mai, 12:17 (+0200):
meta-networking/recipes-support/chrony/chrony_4.8.bb inherit update-rc.d systemd pkgconfig · line 50
Quoted 10 lines
meta-networking/recipes-support/chrony/chrony_4.8.bb +1
-1@@ -47,7 +47,7 @@ inherit update-rc.d systemd pkgconfig # Add chronyd user if privdrop packageconfig is selected inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 'useradd', '', d)} USERADD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '${PN}', '', d)}" -USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '--system -d / -M --shell /sbin/nologin chronyd;', '', d)}" +USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '--system -d / -M -g chronyd --shell /sbin/nologin chronyd;', '', d)}"
Is it possible to use ${sbindir} here?
Signature · 6 lines
Navimatix GmbH T: 03641 - 327 99 0 Tatzendpromenade 2 F: 03641 - 526 306 07745 Jena www.navimatix.de Geschäftsführer: Steffen Späthe, Jan Rommeley Registergericht: Amtsgericht Jena, HRB 501480
Hi Jörg;
Quoted 14 lines · Jörg Sommer
Adam Duskett via lists.openembedded.org schrieb am Mo 18. Mai, 12:17 (+0200):
Review
Quoted 1 line
(quoted diff) +0
-0b/meta-networking/recipes-support/chrony/chrony_4.8.bb
meta-networking/recipes-support/chrony/chrony_4.8.bb inherit update-rc.d systemd pkgconfig · line 48
Quoted 6 lines
index
a7fc73e081..837f2e073f100644meta-networking/recipes-support/chrony/chrony_4.8.bb +0
-0@@ -47,7 +47,7 @@ inherit update-rc.d systemd pkgconfig # Add chronyd user if privdrop packageconfig is selected inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'privdrop','useradd', '', d)}
meta-networking/recipes-support/chrony/chrony_4.8.bb inherit update-rc.d systemd pkgconfig · line 49
Quoted 1 line
meta-networking/recipes-support/chrony/chrony_4.8.bb +0
-0USERADD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'privdrop','${PN}', '', d)}"
meta-networking/recipes-support/chrony/chrony_4.8.bb inherit update-rc.d systemd pkgconfig · line 50
Quoted 1 line
meta-networking/recipes-support/chrony/chrony_4.8.bb +0
-1-USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG',
Quoted 8 lines
'privdrop', '--system -d / -M --shell
/sbin/nologinchronyd;', '', d)}"meta-networking/recipes-support/chrony/chrony_4.8.bb inherit update-rc.d systemd pkgconfig · line 50
Quoted 1 line
meta-networking/recipes-support/chrony/chrony_4.8.bb +1
-0+USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG','privdrop', '--system -d / -M -g chronyd --shell
/sbin/nologinchronyd;', '', d)}"Is it possible to use ${sbindir} here?
Yes it is possible, but this patch is about the group and not about
/sbin/nologin.
One patch should do one thing :)
Quoted 8 lines
--
Navimatix GmbH T: 03641 - 327 99 0
Tatzendpromenade 2 F: 03641 - 526 306
07745 Jena www.navimatix.deGeschäftsführer: Steffen Späthe, Jan Rommeley
Registergericht: Amtsgericht Jena, HRB 501480