diff mbox series

[blacksail,45/60] systemd: merge group members from /etc/group and nss-systemd

Message ID cc97d91005f4ea2c4c78da088109809296dd8ebe.1793867929.git.yoann.congal@smile.fr
State RFC, archived
Delegated to: Yoann Congal
Headers show
Series [blacksail,01/60] gstreamer1.0-plugins-bad: use gtk+3 dependency name | expand

Commit Message

Yoann Congal Nov. 5, 2026, 8:43 a.m. UTC
From: Martin Hundebøll <martin@geanix.com>

When systemd is configured with userdb and nss integration, it provides
group memberships in **addition** to those recorded in /etc/group. For
those additional memberships to be considered by nss, the group database
must be configured to merge the result from both /etc/group and the
systemd nss plugin.

[RB] Reference for the recommended configuration can be found at:
https://www.freedesktop.org/software/systemd/man/latest/nss-systemd.html

Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 4041c0e84b3e98841bca9ab1d35b763acc2c0db4)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 meta/recipes-core/systemd/systemd_261.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-core/systemd/systemd_261.3.bb b/meta/recipes-core/systemd/systemd_261.3.bb
index 1f482d988e8..f7e588a1968 100644
--- a/meta/recipes-core/systemd/systemd_261.3.bb
+++ b/meta/recipes-core/systemd/systemd_261.3.bb
@@ -898,7 +898,7 @@  pkg_postinst:${PN}:libc-glibc () {
 	fi
 	if ${@bb.utils.contains('PACKAGECONFIG', 'nss', 'true', 'false', d)}; then
 		sed -e 's#\(^passwd:.*\)#\1 systemd#' \
-			-e 's#\(^group:.*\)#\1 systemd#' \
+			-e 's#\(^group:.*\)#\1 [SUCCESS=merge] systemd#' \
 			-e 's#\(^shadow:.*\)#\1 systemd#' \
 			-i $D${sysconfdir}/nsswitch.conf
 	fi