[systemd-devel] systemd v4[01] and graphical login managers

Lennart Poettering lennart at poettering.net
Fri Feb 10 12:02:03 PST 2012


On Fri, 10.02.12 09:48, Christian Hesse (list at eworm.de) wrote:

> 
> Lennart Poettering <lennart at poettering.net> on Thu, 9 Feb 2012 22:29:38 +0100:
> > On Thu, 09.02.12 20:57, Christian Hesse (list at eworm.de) wrote: 
> > > > systemd-logind tracks open sessions by keeping open a FIFO fd to the PAM
> > > > session client. When the session client dies then systemd will see that
> > > > as EOF. Now, if the PAM client side eagerly closes all fds it finds this
> > > > will trigger an immediate end of session.
> > > 
> > > Can I help tracking this down? Let me know what to do.
> > 
> > Well, strace the PAM client which invokes the PAM session hooks and
> > figure out where exactly the fifo is closed and by what piece of
> > code. The FIFO fd is received via a dbus reply (which you'll see as a
> > recvmsg() with an SCM_RIGHTS param, followed by an fcntl(F_DUPFD)), and
> > you'd need to trace where it gets closed in the parent process.
> 
> Here is my trace:
> http://www.eworm.de/tmp/lightdm.log
> 
> I think this is the code closing the fd:
> http://bazaar.launchpad.net/~lightdm-team/lightdm/trunk/view/head:/src/pam-session.c#L393

Well, but normally the PAM session should only be closed after the user
logged out again. Why is this invoked so early?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list