Bug 207169 - restorecon fails to report errors to stdout
Summary: restorecon fails to report errors to stdout
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: policycoreutils
Version: 4.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-09-19 19:45 UTC by John W. Lockhart
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version: RHBA-2007-0227
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-01 22:46:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0227 0 normal SHIPPED_LIVE policycoreutils bug fix update 2007-04-27 21:37:00 UTC

Description John W. Lockhart 2006-09-19 19:45:56 UTC
Description of problem:
restorecon does not print to stdout what it would save
to a file.

Version-Release number of selected component (if applicable):
policycoreutils-1.18.1-4.9.i386

How reproducible:
On a RHEL4 system:
   rpm -ql xorg-x11-xfs | restorecon -n -v -f -
   (no output)
   rpm -ql xorg-x11-xfs | restorecon -n -v -o FOO -f -
   (no output)
   cat FOO
     /etc/X11/fs/config

Note also:
# rpm -V  xorg-x11-xfs
........C c /etc/X11/fs/config

# rpm -ql xorg-x11-xfs | restorecon -n -vv -f -
restorecon reset context
/etc/X11/fs/config:user_u:object_r:etc_t->system_u:object_r:etc_t

Steps to Reproduce:
See above
  
Actual results:
Hidden error

Expected results:

Names of files should appear on stdout when requested.
Prefer that the output be:
<path/filename> <expected context> <actual context>

And that the exit code be non-zero if unexpected contexts
are discovered.

(Note also that '-o -' creates a file named '-' rather than
writing to stdout.)

Comment 1 Daniel Walsh 2007-01-29 16:03:38 UTC
Fixed in policycoreutils-1.18.1-4.10

Comment 8 Red Hat Bugzilla 2007-05-01 22:46:55 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0227.html



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