Bug 726824 - systemd > 30 breaks su: pam_systemd
Summary: systemd > 30 breaks su: pam_systemd
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-29 21:05 UTC by Anton Guda
Modified: 2011-09-01 18:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-01 00:46:05 UTC
Type: ---


Attachments (Terms of Use)
log of dbus-monitor --system: bad case (systemd-34) (3.04 KB, text/plain)
2011-08-31 18:00 UTC, Anton Guda
no flags Details
log of dbus-monitor --system: good case (systemd-30) (2.88 KB, text/plain)
2011-08-31 18:01 UTC, Anton Guda
no flags Details

Description Anton Guda 2011-07-29 21:05:00 UTC
Description of problem:
After upgrade to systemd 31 or 32 su became nonfunctional.
Stderr message:
su: cannot not open session: Cannot make/remove an entry for the specified session
log message:
pam_systemd(su:session): Failed to parse message: Message has only 3 arguments, but more were expected

Version-Release number of selected component (if applicable):
systemd-31,32
pam-1.1.4-3
coreutils-8.12-3


How reproducible:
Always


Steps to Reproduce:
1. upgrade to systemd >= 31
2. su - +root password from ordinary user or su from root
  
Actual results:
su fails with error.


Expected results:
su works


Additional info:
Console root login works. But if upgraded remotely, OS may loose you control - if not enough sudo entries exists. So - high severity.

Comment 1 Anton Guda 2011-08-04 14:31:12 UTC
Tested systemd 33 - same result.
Fallback to 30 - all fine.

Comment 2 Lennart Poettering 2011-08-21 12:33:26 UTC
If you do "systemctl restart systemd-logind.service", do things work then?

Comment 3 Anton Guda 2011-08-21 13:17:07 UTC
The same result.
It seems to be a change in protocol used by PAM:
pam_systemd(su:session): Failed to parse message: Message has only 3 arguments,
but more were expected

Comment 4 Lennart Poettering 2011-08-29 12:36:25 UTC
It's an interface change of the D-Bus iface of logind in an older version to a newer version. Normally this should go away if you restart systemd-logind.service, which more recent systemd packages do automatically on upgrade.

If this doesn't happen for you for some reason an old pam_systemd instance sticks around. If you reboot does this go away?

Comment 5 Anton Guda 2011-08-29 16:15:07 UTC
After every systemd update or rollback I do reboot.
Tested with systemd-34 - same result.
Added some debug pam_warn in PAM system-auth. Here some logs:

authpriv.notice<85>: Aug 29 19:10:24 atu [su:]< pam_warn(su-l:auth): function=[pam_sm_authenticate] service=[su-l] terminal=[pts/2] user=[root] ruser=[atu] rhost=[<unknown>]>
authpriv.notice<85>: Aug 29 19:10:27 atu [su:]< pam_warn(su-l:setcred): function=[pam_sm_setcred] service=[su-l] terminal=[pts/2] user=[root] ruser=[atu] rhost=[<unknown>]>
authpriv.err<83>: Aug 29 19:10:27 atu [su:]< pam_systemd(su-l:session): Failed to parse message: Message has only 3 arguments, but more were expected>
authpriv.info<86>: Aug 29 19:10:27 atu [su:]< pam_unix(su-l:session): session opened for user root by atu(uid=1000)>
authpriv.notice<85>: Aug 29 19:10:27 atu [su:]< pam_warn(su-l:setcred): function=[pam_sm_setcred] service=[su-l] terminal=[pts/2] user=[root] ruser=[atu] rhost=[<unknown>]>

Comment 6 Lennart Poettering 2011-08-30 23:42:18 UTC
Maybe you are using a mixed 32bit/64bit setup where the PAM module got updated in the logind service didn't or something like this?

Did you every compile systemd yourself?

Comment 7 Anton Guda 2011-08-31 17:21:01 UTC
32-bit only setup.
Most of packages taken from rawhide and rebuild.
systemd-34 tested both binary from rawhide and self-made - no difference.

Comment 8 Anton Guda 2011-08-31 18:00:17 UTC
Created attachment 520869 [details]
log of dbus-monitor --system: bad case (systemd-34)

I made a 2 dbus-monitor logs:
good1 - systemd-30, bad - systemd-34
No visual difference. strings 1-23 and tail - switching from tty4 (root) to tty2 (atu=1000) and back.

Comment 9 Anton Guda 2011-08-31 18:01:03 UTC
Created attachment 520870 [details]
log of dbus-monitor --system: good case (systemd-30)

Comment 10 Lennart Poettering 2011-09-01 00:46:05 UTC
rawhide?

Please run f16 proper and use the official packages. I am very sure you are for some reason running incompatible versions of pam_systemd and logind, and that's probaby due to the fact you built the package yourself and ended up with a partial upgrade. But this is the wrong place to file bugs about self-built packages, this bug tracker is for fedora packages (and rhel, ...).

Please reopen if you can reproduce this issue with a standard f16 system with no left-overs of self-built packages. Thanks.

Comment 11 Anton Guda 2011-09-01 18:41:37 UTC
Found a source of this bug. Since historic times is was a manualy added string to /etc/pam.d/system-auth-ac:
session required pam_systemd.so
It was added by hand as authconfig don't do this at that time.
After switching to
-session optional pam_systemd.so
all works.

P.S. I have some doubts - at may be a now masked bug, for example - logind may use different number of params in login and su. I will not reopen - all works.


Note You need to log in before you can comment on or make changes to this bug.