Bug 542933 - restorecon -i does not ignore files that do not exist
Summary: restorecon -i does not ignore files that do not exist
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-01 09:38 UTC by Jan Pazdziora (Red Hat)
Modified: 2010-02-01 07:44 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-02-01 07:44:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora (Red Hat) 2009-12-01 09:38:32 UTC
Description of problem:

In rpm scriptlets, I rely on restorecon -i not giving error when file that I try to restorecon does not exist. On Fedora 12, this feature is broken, restorecon prints error message and returns 255.

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

# rpm -qf /sbin/restorecon
policycoreutils-2.0.74-17.fc12.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. Make sure /var/log/xxx does not exist.
2. Run # restorecon -rvi /var/log/xxx ; echo $?
  
Actual results:

# restorecon -rvi /var/log/xxx ; echo $?
restorecon:  lstat(/var/log/xxx) failed:  No such file or directory
255

Expected results:

# restorecon -rvi /var/log/xxx ; echo $?0
0

This is what I get with policycoreutils-1.33.12-14.6.el5 and policycoreutils-2.0.62-12.14.fc11.i586.

Additional info:

Comment 1 Jan Pazdziora (Red Hat) 2010-02-01 07:44:17 UTC
Ths issue seems to be fixed with

# rpm -qf /sbin/restorecon
policycoreutils-2.0.78-10.fc12.i686

Comment 2 Jan Pazdziora (Red Hat) 2010-02-01 07:44:43 UTC
This issue seems to be fixed with

# rpm -qf /sbin/restorecon
policycoreutils-2.0.78-10.fc12.i686


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