Bug 183671

Summary: kdesu confused by extra output after successful authentication
Product: [Applications] kdesu Reporter: Markus Meltner <meltnerm>
Component: generalAssignee: kdesu bugs tracker <kdesu-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: psychonaut, tyrerj
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch

Description Markus Meltner 2009-02-08 12:09:28 UTC
Version:            (using KDE 4.2.0)
Compiler:          gcc (GCC) 4.3.0  
OS:                Other
Installed from:    Compiled From Sources

su is configured to report time of last login in case of successful login, e.g.: "Last login: Sun Feb  8 11:36:23 CET 2009 on pts/6"

su.cpp in kdelibs though does expect su to report just an empty line so su.cpp thinks authorization failed which in this case is not true. Solution is to also check if the reported output of su contains at the beginning of the line "Last login:"

See attached patch implementing this with RegExp.
Comment 1 Markus Meltner 2009-02-08 12:12:22 UTC
Created attachment 31116 [details]
Patch

Patch solving issue and checking su output for "Last login:" message, too.
Comment 2 Markus Meltner 2009-02-08 12:15:49 UTC
output od su program not being handled without attached patch:

kdesu(25171)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [ /sources/kde/src/kdelibs-4.2.0/kdesu/su.cpp : 254 ]  Read line < "Last login: Sun Feb  8 11:36:23 CET 2009 on pts/6" >
Comment 3 Oswald Buddenhagen 2010-03-29 22:14:13 UTC
*** Bug 232617 has been marked as a duplicate of this bug. ***
Comment 4 Oswald Buddenhagen 2010-04-07 00:51:42 UTC
*** Bug 233467 has been marked as a duplicate of this bug. ***
Comment 5 Oswald Buddenhagen 2010-11-06 10:20:28 UTC
*** Bug 232617 has been marked as a duplicate of this bug. ***
Comment 6 Oswald Buddenhagen 2010-11-06 11:31:09 UTC
*** Bug 232617 has been marked as a duplicate of this bug. ***
Comment 7 James Richard Tyrer 2010-11-06 11:36:24 UTC
(In reply to comment #2)
> output od su program not being handled without attached patch:
> 
> kdesu(25171)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU: [
> /sources/kde/src/kdelibs-4.2.0/kdesu/su.cpp : 254 ]  Read line < "Last login:
> Sun Feb  8 11:36:23 CET 2009 on pts/6" >

Please see Bug 233467 for new patch which should also fix Bug 232617.

Please test it for me.
Comment 8 James Richard Tyrer 2010-11-06 11:49:20 UTC
(In reply to comment #6)
> *** Bug 232617 has been marked as a duplicate of this bug. ***

Are you interested in fixing this bug? Or, are you only interested in pedantically closing bugs which have not been fixed ye?

IAC:

Bug 232617 should be marked as a duplicate of Bug 233467.

This bug (Bug 183671) should be marked as a duplicate of Bug 233467.

The reason for this is that chronology is not always the best or only criteria.  Bug 233467 encompasses a larger issue, so it should be the bug which remains open and it is where the patch was posted.
Comment 9 Oswald Buddenhagen 2010-11-06 14:45:57 UTC

*** This bug has been marked as a duplicate of bug 25690 ***