[systemd-devel] pam_systemd closing user's session prematurely

Lennart Poettering lennart at poettering.net
Tue Oct 16 11:20:38 PDT 2012


On Fri, 12.10.12 15:45, Ray Strode (halfline at gmail.com) wrote:

> Hi,

Heya,

> 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

> 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.

I have now commited a fix that achieves the same as yours but doesn't
key this of the static service database: I simply extended the
OpenSession() bus call to inform clients whether they are a new session
or just got the previous data returned. With that boolean we can then
later do or skip the unrelease and should be safe. Adding this
OpenSession() seemed like the cleanest way to pass this information to
pam_systemd, and should be without risk, since we never included
OpenSession() in any docs, as we consider it a private API.

Thanks for tracking this down and for your patch!

Please test!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list