Bug 216055 - LSPP: newrole doesn't preserve shell exit status
Summary: LSPP: newrole doesn't preserve shell exit status
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: policycoreutils
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-17 00:04 UTC by Amy Griffis
Modified: 2007-11-30 22:07 UTC (History)
3 users (show)

Fixed In Version: RC
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-02-08 00:32:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch (655 bytes, patch)
2006-11-17 00:04 UTC, Amy Griffis
no flags Details | Diff

Description Amy Griffis 2006-11-17 00:04:17 UTC
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):


How reproducible:


Steps to Reproduce:
1. newrole -r 
2. exit 42
3. echo $?
  
Actual results:
0

Expected results:
42

Additional info:
I attached a patch for newrole.c which will fix this.

Comment 1 Amy Griffis 2006-11-17 00:04:17 UTC
Created attachment 141427 [details]
patch

Comment 2 Daniel Walsh 2006-11-28 15:15:57 UTC
Fixed in policycoreutils-1.33.4-2.el5

Comment 3 Jay Turner 2007-01-11 03:38:35 UTC
QE ack for RHEL5.

Comment 4 RHEL Program Management 2007-02-08 00:32:17 UTC
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.



Note You need to log in before you can comment on or make changes to this bug.