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 1034208

Summary: service openhpid restart causes denial: avc: denied { read } for pid=25891 comm="openhpid" name="openhpid.pid" dev="tmpfs" ino=48780 scontext=system_u:system_r:openhpid_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file
Product: Red Hat Enterprise Linux 7 Reporter: Petr Sklenar <psklenar>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: mmalik, psklenar
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-25 13:21:35 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 Petr Sklenar 2013-11-25 12:35:45 UTC
Description of problem:
service openhpid restart causes denial, smth with tmpfs

Version-Release number of selected component (if applicable):
selinux-policy-3.12.1-103.el7.noarch
openhpi-3.2.1-2.el7.x86_64


How reproducible:
saw once, I guess always reproducible

Steps to Reproduce:
1, sed -i s/OPENHPI_UNCONFIGURED.*/OPENHPI_UNCONFIGURED="NO"/ /etc/openhpi/openhpi.con

2, service openhpid restart
[root@hp-dl380pgen8-02-vm-7 smoke]# cat /var/log/audit/audit.log | grep openhpid
type=SERVICE_START msg=audit(1385379821.928:109): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="openhpid" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
type=SERVICE_STOP msg=audit(1385379821.928:110): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="openhpid" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
type=AVC msg=audit(1385379891.755:111): avc:  denied  { read } for  pid=25891 comm="openhpid" name="openhpid.pid" dev="tmpfs" ino=48780 scontext=system_u:system_r:openhpid_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file
type=SYSCALL msg=audit(1385379891.755:111): arch=c000003e syscall=2 success=no exit=-13 a0=7f6882d7eec3 a1=0 a2=6 a3=7fff804bf120 items=0 ppid=1 pid=25891 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="openhpid" exe="/usr/sbin/openhpid" subj=system_u:system_r:openhpid_t:s0 key=(null)
type=AVC msg=audit(1385379891.755:112): avc:  denied  { write } for  pid=25891 comm="openhpid" name="openhpid.pid" dev="tmpfs" ino=48780 scontext=system_u:system_r:openhpid_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file
type=SYSCALL msg=audit(1385379891.755:112): arch=c000003e syscall=2 success=no exit=-13 a0=7f6882d7eec3 a1=41 a2=1a0 a3=7fff804bf120 items=0 ppid=1 pid=25891 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="openhpid" exe="/usr/sbin/openhpid" subj=system_u:system_r:openhpid_t:s0 key=(null)
type=SERVICE_START msg=audit(1385379891.758:113): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="openhpid" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'


Actual results:
denial:
type=AVC msg=audit(1385379891.755:111): avc:  denied  { read } for  pid=25891 comm="openhpid" name="openhpid.pid" dev="tmpfs" ino=48780 scontext=system_u:system_r:openhpid_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file


Expected results:
no denial


Additional info:

Comment 2 Miroslav Grepl 2013-11-25 13:21:35 UTC
Please execute

# restorecon -R -v /run/openhpid.pid

Did you start openhpid by hand? If no, are you able to reproduce it?