Bug 193081

Summary: selinux-policy-targeted-2.2.40-1.fc5 installation fails
Product: [Fedora] Fedora Reporter: Steve Forsythe <sforsythe>
Component: selinux-policy-targetedAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Current Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-28 20:00:58 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 Steve Forsythe 2006-05-25 00:14:01 UTC
Description of problem:

Yum installation of selinux-policy-targeted-2.2.40-1.fc5 fails:
  Updating  : selinux-policy-targeted      ####################### [15/36]
Traceback (most recent call last):
  File "/usr/sbin/genhomedircon", line 373, in ?
    selconf.write()
  File "/usr/sbin/genhomedircon", line 334, in write
    fd.write(self.genoutput())
  File "/usr/sbin/genhomedircon", line 321, in genoutput
    for h in self.getHomeDirs():
  File "/usr/sbin/genhomedircon", line 311, in getHomeDirs
    if self.checkExists(homedir) == 1:
  File "/usr/sbin/genhomedircon", line 287, in checkExists
    regex = i.split()[0]
IndexError: list index out of range
libsemanage.semanage_install_sandbox: genhomedircon returned error code 1.

genhomedir is attempting to process
/etc/selinux/targeted/contexts/files/file_contexts,
when it fails. This file is corrupted with stuff like:

########################################
#
# Macros for switching between source policy
# and loadable policy module support
#

The corrupted file is apparently generated by the semodule command in the
post-install script. The only .pp files in /usr/share/selinux/targeted are
base.pp, clamav.pp, and enableaudit.pp, so the semodule command is:

  semodule -b base.pp -i clamav.pp -s targeted

Running this by hand results in the corrupted file_contexts and the
genhomedircon error. Running it without the -i clamav.pp appears to correct the
problem.

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

selinux-policy-targeted-2.2.40-1.fc5

How reproducible:


Steps to Reproduce:
1. Yum install selinux-policy-targeted-2.2.40-1.fc5
2. Or after installation: semodule -b base.pp -i clamav.pp -s targeted
3.
  
Actual results:

Corrupted file_contexts and error in genhomedircon

Expected results:

Clean installation


Additional info:

Comment 1 Daniel Walsh 2006-05-25 12:59:33 UTC
Fixed in policycoreutils-1.30.10-1.fc5

Comment 2 Daniel Walsh 2007-03-28 20:00:58 UTC
Closing bugs