Bug 34768

Summary: su doesn't report exit status
Product: [Retired] Red Hat Linux Reporter: Need Real Name <hag>
Component: sh-utilsAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-04 21:08:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2001-04-04 21:08:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.16 i686)


/bin/su doesn't report the exit status of commands run with -c.  This is a
severe bug that has been outstanding for a year plus (see bug #11029).


Reproducible: Always
Steps to Reproduce:
1. su -c "/bin/false"
2. echo $?

	

Actual Results:  echo prints "0"


Expected Results:  echo prints "1"


I spent an hour tracking down something related to this.
The fact that there is an outstanding bug a *year* old on this very subject
does not make me a happy user.
Further, this appears to be a redhat specific bug; sh-utils-1.16 on my
netbsd machines doesn't behave like this.

If I have to whip out my gdb and fix this myself in the next few days, I
will be *very* disappointed.  It's bad enough to have real problems on my
company's actual product, but having idiot bugs like this waste my time
really doesn't amuse me.

Pardon the flaming above, but I'm just a little annoyed at this one.

If I don't see a fix in the next two days, I'll fix it myself and attach
the fix to this bug.
Hopefully it isn't too contorted.  The fact that it's redhat specific makes
me a little leery.


I classified this bug as "high severity" since a large class of
administrative tools are dependent on su functioning properly.

Comment 1 Bernhard Rosenkraenzer 2001-05-20 10:15:02 UTC
Sorry for the delay; our internal sh-utils maintainer changed 3 times between 
the original report and now. Looking into this.


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