From d4ac4dcb70faeed3e3a933c378bfbcbe25a1f260 Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Fri, 22 Nov 2024 17:31:12 +0100 Subject: [PATCH] gdm: update useradd settings Set HOME_DIR back to /var/lib/gdm. If this is not specified, gdm will store its files in $HOME/.cache. This is pretty ugly because I think this directory should only be used by real users? Maybe /var/cache would be a better place, because it would be the system equivalent of $HOME/.cache? Use tmpfiles.d to ensure /var/lib/gdm is created with the right permissions even in case /var would be tmpfs Signed-off-by: Markus Volk Signed-off-by: Khem Raj --- meta-gnome/recipes-gnome/gdm/gdm_47.0.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta-gnome/recipes-gnome/gdm/gdm_47.0.bb b/meta-gnome/recipes-gnome/gdm/gdm_47.0.bb index 45f23b49bb..9aefeed7d2 100644 --- a/meta-gnome/recipes-gnome/gdm/gdm_47.0.bb +++ b/meta-gnome/recipes-gnome/gdm/gdm_47.0.bb @@ -42,10 +42,12 @@ do_install:append() { rm -rf ${D}/run ${D}${localstatedir}/run echo "auth optional pam_gnome_keyring.so" >> ${D}${sysconfdir}/pam.d/gdm-password echo "session optional pam_gnome_keyring.so auto_start" >> ${D}${sysconfdir}/pam.d/gdm-password + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d ${localstatedir}/lib/gdm 700 gdm gdm - -" > ${D}${sysconfdir}/tmpfiles.d/gdm.conf } USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = "--system --no-create-home --groups video gdm" +USERADD_PARAM:${PN} = "--system --groups video --home ${localstatedir}/lib/gdm gdm" SYSTEMD_SERVICE:${PN} = "${BPN}.service" @@ -64,7 +66,6 @@ CONFFILES:${PN} += "${sysconfdir}/gdm/custom.conf" FILES:${PN} += " \ ${datadir}/dconf \ ${base_libdir}/security/pam_gdm.so \ - ${localstatedir} \ ${systemd_unitdir} ${systemd_user_unitdir} \ "