Bug 183671 - kdesu confused by extra output after successful authentication
Summary: kdesu confused by extra output after successful authentication
Status: RESOLVED DUPLICATE of bug 25690
Alias: None
Product: kdesu
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources All
: NOR normal
Target Milestone: ---
Assignee: kdesu bugs tracker
URL:
Keywords:
: 233467 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-08 12:09 UTC by Markus Meltner
Modified: 2010-11-06 14:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch (793 bytes, patch)
2009-02-08 12:12 UTC, Markus Meltner
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***