Red Hat Bugzilla – Bug 216055
LSPP: newrole doesn't preserve shell exit status
Last modified: 2007-11-30 17:07:37 EST
Description of problem:
When newrole exits, it doesn't preserve the exit status from the shell. It
always returns 0 (or -1 for an error in newrole).
It should return the exit status of the child unless there is an error in newrole.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. newrole -r
2. exit 42
3. echo $?
I attached a patch for newrole.c which will fix this.
Created attachment 141427 [details]
Fixed in policycoreutils-1.33.4-2.el5
QE ack for RHEL5.
A package has been built which should help the problem described in
this bug report. This report is therefore being closed with a resolution
of CURRENTRELEASE. You may reopen this bug report if the solution does
not work for you.