Bug 440594

Summary: rpm -V error: SELinux context differs for syslog.conf
Product: Red Hat Enterprise Linux 4 Reporter: Chris Ward <cward>
Component: sysklogdAssignee: Peter Vrabec <pvrabec>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: low    
Version: 4.7CC: dwalsh, pmatilai
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-09 14:54:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Ward 2008-04-04 09:34:24 UTC
Description of problem:
SELinux context differs when I run rpm -V for the current RHEL4 build of
sysklogd-1.4.1-27.el4 and the previous version sysklogd-1.4.1-26_EL, even if
freshly installed. 

sysklogd-1.4.1-44.el5.i386, the current release for RHEL5 doesn't have the same
problem. 

%> rpm -q sysklogd
sysklogd-1.4.1-27.el4.x86_64

%> rpm -V sysklogd
S.5....T. c /etc/sysconfig/syslog
S.5....TC c /etc/syslog.conf
        ^
# verify error 'C' = SELinux Context Differs


I have a feeling this isn't a major problem, considering the older version had
the same problem...but nonetheless, less verify errors, the better. 

I'm honestly not sure what's causing the verify error to occur, perhaps it's a
bug in rpm -V itself, because when I check the context of syslog.conf, it
appears to be correct.


%> rpm -V sysklogd
S.5....TC c /etc/syslog.conf
        ^

%> ls -Z /etc/syslog.conf 
-rw-r--r--  root     root     user_u:object_r:etc_t            /etc/syslog.conf

%> restorecon /etc/syslog.conf 

%> ls -Z /etc/syslog.conf 
-rw-r--r--  root     root     user_u:object_r:etc_t            /etc/syslog.conf

%> rpm -V sysklogd
S.5....TC c /etc/syslog.conf
        ^

%> rpm -q sysklogd

sysklogd-1.4.1-27.el4.x86_64


Version-Release number of selected component (if applicable):
sysklogd-1.4.1-27.el4

How reproducible:
always

Steps to Reproduce:
1.see above
2.
3.
  
Expected results:
no SELinux context verify error

Comment 1 Daniel Walsh 2008-04-08 13:16:37 UTC
It is checking the SELinux user of the file user_u versus system_u.

If you run restorecon -F /etc/syslog.conf 
it should fix the file so RPM will not complain.

This was fixed to not check the user componant in later versions of rpm.

Comment 2 Peter Vrabec 2008-04-10 09:54:28 UTC
so, is this rpm problem? Should I reassign the issue?

Comment 3 Chris Ward 2008-04-10 11:29:57 UTC
Exactly what I'm thinking, should this bug be reassigned to rpm then? Should rpm
be checking the user of the file user_u versus system_u?

Comment 4 Daniel Walsh 2008-04-10 15:23:05 UTC
I think the problem is the checking at all.  rpm -V checking of SELinux context
was removed from newer versions or rpm.  It is arguable either way, that this is
correct behavior, since it does not match the default context.