Bug 233467 - kdesu rejects valid root password when .bashrc outputs anything to stdout or stderr
Summary: kdesu rejects valid root password when .bashrc outputs anything to stdout or ...
Status: RESOLVED DUPLICATE of bug 183671
Alias: None
Product: kdesu
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Unspecified
: NOR normal
Target Milestone: ---
Assignee: kdesu bugs tracker
URL:
Keywords:
: 232617 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-06 11:23 UTC by Tristan Miller
Modified: 2010-11-06 12:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix for Bug 232617 & Bug 183671 (872 bytes, patch)
2010-11-06 11:23 UTC, James Richard Tyrer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tristan Miller 2010-04-06 11:23:50 UTC
Version:            (using KDE 4.4.2)
Installed from:    openSUSE RPMs

Reproducibility: Always

Steps to reproduce:
1. Make sure ~/.bashrc outputs something to stdout or stderr.  For example, it could contain the following line:
   echo foo
2. Run kdesu and enter your root password.

Observed behaviour:
3. kdesu rejects the root password and reprompts.  Meanwhile the following is output to console:

$ kdesu echo foobar
kdesu(6522) KDESu::PtyProcess::exec: [ /usr/src/packages/BUILD/kdelibs-4.4.2/kdesu/process.cpp : 295 ]  Running "/bin/su"
kdesu(6522) KDESu::SuProcess::ConverseSU: [ /usr/src/packages/BUILD/kdelibs-4.4.2/kdesu/su.cpp : 259 ]  Read line "Password: "
kdesu(6522) KDESu::PtyProcess::exec: [ /usr/src/packages/BUILD/kdelibs-4.4.2/kdesu/process.cpp : 295 ]  Running "/bin/su"
kdesu(6522) KDESu::SuProcess::ConverseSU: [ /usr/src/packages/BUILD/kdelibs-4.4.2/kdesu/su.cpp : 259 ]  Read line "Password: "
kdesu(6522) KDESu::PtyProcess::WaitSlave: [ /usr/src/packages/BUILD/kdelibs-4.4.2/kdesu/process.cpp : 381 ]  Child pid 6530
kdesu(6522) KDESu::SuProcess::ConverseSU: [ /usr/src/packages/BUILD/kdelibs-4.4.2/kdesu/su.cpp : 259 ]  Read line ""
kdesu(6522) KDESu::SuProcess::ConverseSU: [ /usr/src/packages/BUILD/kdelibs-4.4.2/kdesu/su.cpp : 259 ]  Read line "foo"
kdesu_stub
$

Expected behaviour:
3. kdesu should not be sensitive to data printed to stdout or stderr by ~/.bashrc
Comment 1 Oswald Buddenhagen 2010-04-07 00:51:42 UTC

*** This bug has been marked as a duplicate of bug 183671 ***
Comment 2 James Richard Tyrer 2010-11-06 11:23:32 UTC
Created attachment 53187 [details]
Fix for Bug 232617 &  Bug 183671

This should fix both:

Bug 232617 for "You have new mail."

Bug 183671 for "Last login:"

I am not able to test it for  Bug 183671.
Comment 3 James Richard Tyrer 2010-11-06 12:04:10 UTC
*** Bug 232617 has been marked as a duplicate of this bug. ***