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).
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.
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 ***