Bug 1278777

Summary: invalid filename is used in file context pattern for pegasus configuration file
Product: Red Hat Enterprise Linux 7 Reporter: Milos Malik <mmalik>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-68.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1278771 Environment:
Last Closed: 2016-11-04 02:24:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milos Malik 2015-11-06 11:49:34 UTC
+++ This bug was initially created as a clone of Bug #1278771 +++

Description of problem:
# semanage fcontext -l | grep /etc/Pegasus
/etc/Pegasus(/.*)?                                 all files          system_u:object_r:pegasus_conf_t:s0 
/etc/Pegasus/pegasus_current\.conf                 all files          system_u:object_r:pegasus_data_t:s0 
#

But the service does not create / use any file called pegasus_current.conf. The service creates / uses a file called cimserver_current.conf.

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-60.el7.noarch
selinux-policy-devel-3.13.1-60.el7.noarch
selinux-policy-doc-3.13.1-60.el7.noarch
selinux-policy-minimum-3.13.1-60.el7.noarch
selinux-policy-mls-3.13.1-60.el7.noarch
selinux-policy-sandbox-3.13.1-60.el7.noarch
selinux-policy-targeted-3.13.1-60.el7.noarch
tog-pegasus-2.14.1-3.el7.x86_64
tog-pegasus-devel-2.14.1-3.el7.x86_64
tog-pegasus-libs-2.14.1-3.el7.x86_64

How reproducible:
always

Steps to Reproduce:
# service tog-pegasus start
Redirecting to /bin/systemctl start  tog-pegasus.service
# service tog-pegasus status
Redirecting to /bin/systemctl status  tog-pegasus.service
● tog-pegasus.service - OpenPegasus CIM Server
   Loaded: loaded (/usr/lib/systemd/system/tog-pegasus.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2015-11-06 12:03:10 CET; 3s ago
  Process: 21133 ExecStart=/usr/sbin/cimserver (code=exited, status=0/SUCCESS)
  Process: 21128 ExecStartPre=/usr/share/Pegasus/scripts/generate-certs (code=exited, status=0/SUCCESS)
 Main PID: 21137 (cimserver)
   CGroup: /system.slice/tog-pegasus.service
           └─21137 /usr/sbin/cimserver

Nov 06 12:03:10 rhel72.localdomain systemd[1]: Starting OpenPegasus CIM Serv....
Nov 06 12:03:10 rhel72.localdomain systemd[1]: Started OpenPegasus CIM Server.
Hint: Some lines were ellipsized, use -l to show in full.
# service tog-pegasus stop
Redirecting to /bin/systemctl stop  tog-pegasus.service
# restorecon -Rv /etc/Pegasus/
restorecon reset /etc/Pegasus/cimserver_current.conf context system_u:object_r:pegasus_data_t:s0->system_u:object_r:pegasus_conf_t:s0
# restorecon -Rv /etc/Pegasus/
#

Actual results:
 * the file context pattern contains an invalid filename

Expected results:
 * the file context pattern contains a correct filename

Comment 2 Mike McCune 2016-03-28 22:59:28 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 6 errata-xmlrpc 2016-11-04 02:24:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2283.html