Hi,

Some GDM/gnome-shell users having a rather strange issue where they
can't unlock their screen because logind thinks their session is no
longer active:

https://bugzilla.gnome.org/show_bug.cgi?id=685988

Turns out those users are running

$ su -

and upon typing

# exit

the users' sessions are put in the CLOSING state.  This is because
pam_sm_close session calls ReleaseSession which then closes the user's
fifo fd and immediately writes out the session state file.

Interestingly enough, ReleaseSession was written specifically for su:

commit 75c8e3cffd7da8eede614cf61384957af2c82a29
Author: Lennart Poettering <[email protected]>
Date:   Thu Mar 22 02:06:40 2012 +0100

    logind: close FIFO before ending sessions cleanly

    For clean session endings ask logind explicitly to get rid of the FIFO
    before closing it so that the FIFO logic doesn't result in su/sudo to be
    terminated immediately.

I don't really understand the commit message, though.

I've attached a patch that bypasses ReleaseSession if CreateSession
returns the session the user is already in, but I fear it's wrong if
ReleaseSession was specifically designed for su, since we're
essentially bypassing it for the su case with my patch.

Thoughts?
--Ray

Attachment: dont-release.patch
Description: Binary data

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to