Bug 739587

Summary: restorecon should always return 0 on success
Product: Red Hat Enterprise Linux 6 Reporter: Rob Crittenden <rcritten>
Component: policycoreutilsAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.2CC: dwalsh, mmalik, psklenar, psplicha
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: policycoreutils-2.0.83-19.16.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 15:31:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 739953    

Description Rob Crittenden 2011-09-19 15:06:25 UTC
Description of problem:

The restorecon man page doesn't include possible return values. It apparently returns 0 if it does nothing and 1 if it changes the context. Unclear what other possible values might be.

Version-Release number of selected component (if applicable):

policycoreutils-2.0.83-19.13.el6.i686

Steps to Reproduce:
1. chcon -t ssh_home_t ~/.emacs
2. restorecon ~/.emacs
3. echo $?

Value will be 1.

Comment 2 Daniel Walsh 2011-09-23 15:52:34 UTC
I changed restorecon to return 0 on success like it did in RHEL6.0.

Fixed in policycoreutils-2.0.83-19.16.el6

Comment 5 errata-xmlrpc 2011-12-06 15:31:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1637.html