Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1153350

Summary: haproxy runs as unconfined_service_t even if it is confined
Product: Red Hat Enterprise Linux 7 Reporter: Milos Malik <mmalik>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: bperkins
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-7.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:46:02 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 2014-10-15 20:18:04 UTC
Description of problem:
 * haproxy unit file executes a wrapper instead of the binary and the wrapper is labeled bin_t

Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.13.1-4.el7.noarch
selinux-policy-3.13.1-4.el7.noarch
haproxy-1.5.4-1.el7.x86_64

How reproducible:
always

Steps to Reproduce:
# ps -efZ | grep haproxy
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 16266 12359  0 22:16 pts/0 00:00:00 grep --color=auto haproxy
# service haproxy start
Redirecting to /bin/systemctl start  haproxy.service
# ps -efZ | grep haproxy
system_u:system_r:unconfined_service_t:s0 root 16285 1  0 22:16 ?      00:00:00 /usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
system_u:system_r:unconfined_service_t:s0 haproxy 16286 16285  0 22:16 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
system_u:system_r:unconfined_service_t:s0 haproxy 16287 16286  0 22:16 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 16291 12359  0 22:16 pts/0 00:00:00 grep --color=auto haproxy
#

Actual results:
 * the service runs as unconfined_service_t

Expected results:
 * the service runs as haproxy_t again

Comment 1 Miroslav Grepl 2014-10-16 13:30:56 UTC
commit c5c0b4516b2a34522e71d002ebcab4c9c7e6fb32
Author: Miroslav Grepl <mgrepl>
Date:   Thu Oct 16 14:35:44 2014 +0200

    Add labeling for /usr/sbin/haproxy-systemd-wrapper wrapper to make haproxy running haproxy_t.

Comment 6 errata-xmlrpc 2015-03-05 10:46:02 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-2015-0458.html