Comment 6 for bug 809890

Revision history for this message
Jason Conti (jconti) wrote :

Thanks to Doug's addition info, I think I managed to track down this problem after creating a new user to test. When clicking the username in lightdm-example-gtk-greeter, start_authentication() is executed in lightdm-example-gtk-greeter.c. If the user is anything but "Other" or "Guest", the greeter attempts to load the user's ~/.dmrc file to look up the default session. Since this user has never logged in, there is no ~/.dmrc file, so the session name is NULL. This NULL session is then passed to set_session() in lightdm-example-gtk-greeter.c, which attempts to compare the name with all the available session using strcmp, which crashes because session is NULL. Could probably use g_strcmp0, but I think the better option is just to add a g_return_if_fail (session != NULL) to the start of the file. I rebuilt with this patch, and haven't been able to crash it in the same way since.