Commit 29ecdb33 authored by Ray Strode's avatar Ray Strode

session-record: support NULL display name if tty available (for logout/failed)

wayland sessions don't necessarily have a display name, so this
commit just uses the display device instead.

It's like commit 1edb0e4a but for
logout and failed records.

Discovered by Sinclair Yeh <syeh@vmware.com>

https://bugzilla.gnome.org/show_bug.cgi?id=749404
parent 65b15db0
......@@ -279,6 +279,9 @@ gdm_session_record_logout (GPid session_pid,
UTMP session_record = { 0 };
UTMP *u;
if (x11_display_name == NULL)
x11_display_name = display_device;
g_debug ("Writing logout record");
#if defined(HAVE_UT_UT_TYPE)
......@@ -350,6 +353,9 @@ gdm_session_record_failed (GPid session_pid,
{
UTMP session_record = { 0 };
if (x11_display_name == NULL)
x11_display_name = display_device;
record_set_username (&session_record, user_name);
g_debug ("Writing failed session attempt record");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment