[Pkg-systemd-maintainers] Bug#717403: libpam-systemd fails when talking to old systemd-logind service

Michael Biebl biebl at debian.org
Sat Jul 20 13:20:00 BST 2013


Package: libpam-systemd
Version: 204-1
Severity: important

We currently do not restart systemd-logind as part of the upgrade
process. That means, when you try to login after the upgrade,
libpam-systemd will talk to the old logind (v44) process.

I get the following in the journal:

Jul 20 14:08:08 pluto login[3476]: pam_unix(login:session): session opened for user michael by LOGIN(uid=0)
Jul 20 14:08:08 pluto systemd-logind[5664]: New session 13 of user michael.
Jul 20 14:08:08 pluto login[3476]: pam_systemd(login:session): Failed to parse message: Message has only 5 arguments, but more were expected
Jul 20 14:08:08 pluto systemd-logind[5664]: Removed session 13.
Jul 20 14:08:08 pluto systemd[1]: getty at tty2.service holdoff time over, scheduling restart.
Jul 20 14:08:08 pluto systemd[1]: Stopping Getty on tty2...
Jul 20 14:08:08 pluto systemd[1]: Starting Getty on tty2...
Jul 20 14:08:08 pluto systemd[1]: Started Getty on tty2.


When I try to login on the console, I get immediately thrown back to the
login prompt. This means I'm no longer able to login!

A few thoughts/observations
1/ We can restart systemd-logind.service as part of the upgrade, but
then we will lose existing logind sessions. That is only from upgrades
from version v44 though. So this is probably ok to do.
2/ The above looks like a D-Bus API break in the logind API and we
should probably notify upstream about that.
3/ Failing to register a logind session in pam_systemd should not result
in a failed login attempt.
We setup the pam_systemd.so pam module as
session optional pam_systemd.so
So theoretically a failure in that module should not have that effect.
I had a quick look at pam_sm_open_session() [1]. In such a error
condition, the module will clean up and then return PAM_SESSION_ERR.
Nothing seems obviously wrong to me, so there is probably more going on
here which disturbes the PAM stack.

Michael

[1] http://cgit.freedesktop.org/systemd/systemd/tree/src/login/pam-module.c#n386

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libpam-systemd depends on:
ii  libc6              2.17-7
ii  libcap2            1:2.22-1.2
ii  libdbus-1-3        1.6.12-1
ii  libpam-runtime     1.1.3-9
ii  libpam0g           1.1.3-9
ii  multiarch-support  2.17-7
ii  systemd            204-1

libpam-systemd recommends no packages.

libpam-systemd suggests no packages.

-- no debconf information




More information about the Pkg-systemd-maintainers mailing list