Reported by Thorsten Kukuk <kukuk@suse.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00093.html>.
* lib/readutmp.c (read_utmp_from_systemd): Don't use the value returned
by sd_session_get_display if it is NULL.
+2023-09-15 Bruno Haible <bruno@clisp.org>
+
+ readutmp: Fix crash when gdm is in use.
+ Reported by Thorsten Kukuk <kukuk@suse.com> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00093.html>.
+ * lib/readutmp.c (read_utmp_from_systemd): Don't use the value returned
+ by sd_session_get_display if it is NULL.
+
2023-09-14 Bruno Haible <bruno@clisp.org>
doc: Mention libucontext.
char *display;
if (sd_session_get_display (session, &display) < 0)
display = NULL;
- host = display;
+ /* Workaround: gdm "forgets" to pass the display to
+ systemd, thus display may be NULL here. */
+ if (display != NULL)
+ host = display;
}
}
else