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.
Is the pid file created in the init script? If yes then the init script should be doing the restorecon.
The other issue will require a local policy until we fixes it in RHEL6.6
Yes, the pid file is created by init script, but that is not doing restorecon:
# Create as root an empty pidfile for the agent.
if [ ! -f ${pidfile} ]; then
/bin/touch ${pidfile}
/bin/chown ovirtagent:ovirtagent ${pidfile}
fi
This should be fixed in selinux-policy-3.7.19-231.el6_5.3.noarch
#============= rhev_agentd_t ==============
#!!!! This avc is allowed in the current policy
allow rhev_agentd_t sysfs_t:file { read open };
Description of problem: After update to RHEL 6.5 I found this AVC's related to rhev-guest-agent: type=AVC msg=audit(1385142166.199:258): avc: denied { read } for pid=6666 comm="ovirt-guest-age" name="online" dev=sysfs ino=23 scontext=unconfined_u:system_r:rhev_agentd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file type=AVC msg=audit(1385142166.199:259): avc: denied { open } for pid=6666 comm="ovirt-guest-age" name="online" dev=sysfs ino=23 scontext=unconfined_u:system_r:rhev_agentd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file type=AVC msg=audit(1385142825.200:270): avc: denied { write } for pid=10145 comm="ovirt-guest-age" name="ovirt-guest-agent.pid" dev=dm-2 ino=3924535 scontext=unconfined_u:system_r:rhev_agentd_t:s0 tcontext=unconfined_u:object_r:initrc_var_run_t:s0 tclass=file type=SYSCALL msg=audit(1385142825.200:270): arch=c000003e syscall=2 success=yes exit=6 a0=160d080 a1=241 a2=1b6 a3=0 items=0 ppid=1 pid=10145 auid=1637 uid=175 gid=175 euid=175 suid=175 fsuid=175 egid=175 sgid=175 fsgid=175 tty=(none) ses=33 comm="ovirt-guest-age" exe="/usr/bin/python" subj=unconfined_u:system_r:rhev_agentd_t:s0 key=(null) type=AVC msg=audit(1385142825.201:271): avc: denied { setattr } for pid=10145 comm="ovirt-guest-age" name="ovirt-guest-agent.pid" dev=dm-2 ino=3924535 scontext=unconfined_u:system_r:rhev_agentd_t:s0 tcontext=unconfined_u:object_r:initrc_var_run_t:s0 tclass=file type=SYSCALL msg=audit(1385142825.201:271): arch=c000003e syscall=90 success=yes exit=0 a0=160d080 a1=1b4 a2=7fb4c90aba08 a3=7fffadffa800 items=0 ppid=1 pid=10145 auid=1637 uid=175 gid=175 euid=175 suid=175 fsuid=175 egid=175 sgid=175 fsgid=175 tty=(none) ses=33 comm="ovirt-guest-age" exe="/usr/bin/python" subj=unconfined_u:system_r:rhev_agentd_t:s0 key=(null) audit2allow rule: #============= rhev_agentd_t ============== allow rhev_agentd_t initrc_var_run_t:file { write setattr }; allow rhev_agentd_t sysfs_t:file { read open }; /sbin/restorecon -v /var/run/ovirt-guest-agent.pid that change /var/run/ovirt-guest-agent.pid context from unconfined_u:object_r:initrc_var_run_t:s0 to unconfined_u:object_r:rhev_agentd_var_run_t:s0 does not solve because every time ovirt-guest-agent restarts the file is created with initrc_var_run_t context again. Version-Release number of selected component (if applicable): selinux-policy-3.7.19-231.el6.noarch selinux-policy-targeted-3.7.19-231.el6.noarch rhevm-guest-agent-common-1.0.7-13.el6ev.noarch How reproducible: Start ovirt-guest-agent Steps to Reproduce: 1. service ovirt-guest-agent start 2. tail /var/log/audit/audit.log Actual results: The AVC's mencioned. Expected results: None AVC Additional info: