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 <f_l_k@t-online.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Markus Volk 2024-11-22 17:31:12 +01:00 committed by Khem Raj
parent ee89518454
commit d4ac4dcb70
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -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} \
"