Bug 113512

Summary: rpm does not set file contexts if file_contexts file is not present
Product: [Fedora] Fedora Reporter: Daniel Walsh <dwalsh>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED DUPLICATE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 19:00:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Daniel Walsh 2004-01-14 20:25:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031114

Description of problem:
If you install using RPM on a SELinux box the file contexts get set
correctly, if you remove the
/etc/security/selinux/src/policy/file_contexts/file_contexts file,
they will not.

# rpm -Uhv --force /tmp/openssh-server-3.6.1p2-25.i386.rpm 
WARNING: Multiple same specifications for /var/lib/dhcp(3)?.
Preparing...               
########################################### [100%]
   1:openssh-server        
########################################### [100%]
# ls -lZ /usr/sbin/sshd 
-rwxr-xr-x  root     root     system_u:object_r:sshd_exec_t   
/usr/sbin/sshd
rm /etc/security/selinux/src/policy/file_contexts/file_contexts 
rm: remove regular file
`/etc/security/selinux/src/policy/file_contexts/file_contexts'? y
[root@celtics ~]$ rpm -Uhv --force
/tmp/openssh-server-3.6.1p2-25.i386.rpm     
/etc/security/selinux/src/policy/file_contexts/file_contexts: No such
file or directory
Preparing...               
########################################### [100%]
   1:openssh-server        
########################################### [100%]
[root@celtics ~]$ ls -lZ /usr/sbin/sshd                              
          -rwxr-xr-x  root     root     dwalsh:object_r:sbin_t       
   /usr/sbin/sshd


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

How reproducible:
Always

Steps to Reproduce:
1.Remove file_contexts file
2.Install a rpm containing security contexts (Openssh)
3.Check out the security contexts of the file
    

Actual Results:  File contexts do not match spec.

Expected Results:  File contexts match spec

Additional info:

Comment 1 Jeff Johnson 2004-01-26 03:16:20 UTC

*** This bug has been marked as a duplicate of 114040 ***

Comment 2 Red Hat Bugzilla 2006-02-21 19:00:45 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.