Enable Systemd NSS module to support DynamicUsers
DynamicUsers flag in systemd service configuration file required to create,
handle and recycle temporary users.
This is essential module for upcoming daemons' privilege separation work.
Reference: https://github.com/openbmc/openbmc/issues/3383
Signed-off-by: Anton D. Kachalov <gmouse@google.com>
Change-Id: Iabd709c4a20f754fc6ea505e640b2d361aba0be2
diff --git a/meta-phosphor/classes/obmc-phosphor-image.bbclass b/meta-phosphor/classes/obmc-phosphor-image.bbclass
index 0a07fc6..c83dce3 100644
--- a/meta-phosphor/classes/obmc-phosphor-image.bbclass
+++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass
@@ -88,7 +88,9 @@
}
enable_ldap_nsswitch() {
- sed -i 's/\(\(passwd\|group\|shadow\):\s*\).*/\1files ldap/' \
+ sed -i 's/\(\(passwd\|group\):\s*\).*/\1files systemd ldap/' \
+ "${IMAGE_ROOTFS}${sysconfdir}/nsswitch.conf"
+ sed -i 's/\(shadow:\s*\).*/\1files ldap/' \
"${IMAGE_ROOTFS}${sysconfdir}/nsswitch.conf"
}