Bug 442706

Summary: fixfiles prints out 'broken pipe' error when selinux is disabled
Product: [Fedora] Fedora Reporter: Karsten Hopp <karsten>
Component: glpiAssignee: Remi Collet <fedora>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: fedora
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: 2008-04-25 18:55:22 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:
Bug Depends On:    
Bug Blocks: 235705    

Description Karsten Hopp 2008-04-16 11:26:19 UTC
Description of problem:
Several packages run fixfiles in their %post script and the script failes when
selinux is disabled, p.e.:
  Installier: glpi                         ################### [2891/6284]
semodule: SELinux policy is not managed or store cannot be accessed.
cut: Schreibfehler: Datenübergabe unterbrochen (broken pipe)


Version-Release number of selected component (if applicable):
policycoreutils-2.0.46-2.fc9.i386

Comment 1 Daniel Walsh 2008-04-22 21:13:39 UTC
The problem here is the glpi spec file is not checking if SELinux is installed.

It should be using 

semodule -s targeted glpi.pp

You don't need to install a Policy Package for this either.

semanage fcontext could be used.


/etc/glpi(/.*)?          root:object_r:httpd_sys_content_t:s0
/var/log/glpi(/.*)?   system_u:object_r:httpd_sys_content_t:s0
/var/lib/glpi(/.*)?   system_u:object_r:httpd_sys_content_t:s0


This would be better if you specified.

/etc/glpi(/.*)?       system_u:object_r:httpd_sys_content_t:s0
/var/log/glpi(/.*)?   system_u:object_r:httpd_sys_script_rw_t:s0
Do the php scripts actually read/write this directory or could you label it
httpd_log_t?
/var/lib/glpi(/.*)?   system_u:object_r:httpd_sys_script_rw_t:s0


Comment 2 Remi Collet 2008-04-25 18:54:36 UTC
@daniel, thanks

Next release will use semanage fcontext.