Bug 305501

Summary: crash when logging, apparently related to pam / pam_mount
Product: kdm Reporter: Stormi <stormi>
Component: generalAssignee: kdm bugs tracker <kdm-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mageia RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: backtrace and "where full"
extract from syslogs with kdm running with -debug 7
take 1

Description Stormi 2012-08-20 16:25:26 UTC
After installing the update candidate for KDE SC 4.8.5 in Mageia 2, kdm began to crash systematically when I logged in (just after validating the password), for every user.

I produced a backtrace (attached) which hinted that pam_mount could be involved. Changing the auth configuration in /etc/pam.d/system-auth from 

auth        required      pam_env.so
auth        sufficient    pam_tcb.so shadow nullok prefix=$2a$ count=8
auth        sufficient    pam_winbind.so use_first_pass cached_login
auth        optional      pam_mount.so use_first_pass
auth        required      pam_deny.so

to

auth        required      pam_env.so
auth        optional      pam_mount.so
auth        sufficient    pam_tcb.so shadow nullok prefix=$2a$ count=8 use_first_pass
auth        sufficient    pam_winbind.so use_first_pass cached_login
auth        required      pam_deny.so

made the crashes stop.

Reproducible: Always
Comment 1 Stormi 2012-08-20 16:26:11 UTC
Created attachment 73327 [details]
backtrace and "where full"
Comment 2 Stormi 2012-08-20 16:26:51 UTC
Created attachment 73328 [details]
extract from syslogs with kdm running with -debug 7
Comment 3 Oswald Buddenhagen 2012-08-21 06:32:43 UTC
your first configuration is clearly bogus - it's even in the pam_mount man page that it wouldn't work. the immediate effect was that the pam_mount line in the session section would prompt for a password at a time kdm is entirely unprepared for it. it shouldn't crash, though ...
Comment 4 Oswald Buddenhagen 2012-08-21 06:50:00 UTC
Created attachment 73342 [details]
take 1

please try whether this produces the error message without crashing.
Comment 5 Stormi 2012-08-21 14:21:14 UTC
Thanks. Mikala provided a new kdebase4-workspace package for me to test, after applying this patch, but it still crashes unfortunately.
Comment 6 Stormi 2012-08-21 14:29:19 UTC
Forget my previous comment, I tested the wrong package : it works. Login proceeds and the error message appears in the logs.
Comment 7 Oswald Buddenhagen 2012-09-16 12:36:46 UTC
Git commit cb146aeecafa84bfa00d7736231b87cdd28f1f6e by Oswald Buddenhagen.
Committed on 21/08/2012 at 08:47.
Pushed by ossi into branch 'master'.

don't crash when PAM prompts at the wrong time

M  +10   -0    kdm/backend/client.c

http://commits.kde.org/kde-workspace/cb146aeecafa84bfa00d7736231b87cdd28f1f6e