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 1156430

Summary: SELinux blocking rhev agent from accessing systemd dbus
Product: Red Hat Enterprise Linux 7 Reporter: Vinzenz Feenstra [evilissimo] <vfeenstr>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Milos Malik <mmalik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.0CC: mgrepl, mmalik, plautrba, pvrabec, vfeenstr
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-29 07:47:00 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 Vinzenz Feenstra [evilissimo] 2014-10-24 12:48:40 UTC
Description of problem:

type=USER_AVC msg=audit(1414153851.855:510): pid=714 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_call interface=org.freedesktop.login1.Manager member=LockSessions dest=org.freedesktop.login1 spid=4358 tpid=711 scontext=system_u:system_r:rhev_agentd_t:s0 tcontext=system_u:system_r:systemd_logind_t:s0 tclass=dbus  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'

Needed:

#============= rhev_agentd_t ==============
allow rhev_agentd_t systemd_logind_t:dbus send_msg;


Version-Release number of selected component (if applicable):


How reproducible:
On my system, every time I am disconnecting the screen

Steps to Reproduce:
1. RHEV + RHEL7 Guest w/ GNOME + rhevm-guest-agent installed
2. Open Console and login to GNOME
3. Close Console

Actual results:
Denial in audit log, and screen does not get locked

Expected results:
No selinux denial and a locked screen

Additional info:

Comment 1 Milos Malik 2014-10-24 12:55:55 UTC
Which version of selinux-policy do you use?

# rpm -qa selinux-policy\*
selinux-policy-mls-3.13.1-6.el7.noarch
selinux-policy-doc-3.13.1-6.el7.noarch
selinux-policy-minimum-3.13.1-6.el7.noarch
selinux-policy-sandbox-3.13.1-6.el7.noarch
selinux-policy-devel-3.13.1-6.el7.noarch
selinux-policy-3.13.1-6.el7.noarch
selinux-policy-targeted-3.13.1-6.el7.noarch
# sesearch -s rhev_agentd_t -t systemd_logind_t -c dbus -p send_msg -A -C
Found 1 semantic av rules:
   allow rhev_agentd_t systemd_logind_t : dbus send_msg ; 

# sesearch -t rhev_agentd_t -s systemd_logind_t -c dbus -p send_msg -A -C
Found 1 semantic av rules:
   allow systemd_logind_t rhev_agentd_t : dbus send_msg ; 

#

The rebased selinux-policy in RHEL-7.1 contains both rules.

Comment 2 Milos Malik 2014-10-24 12:57:47 UTC
This bug looks like a duplicate of BZ#1149253.

Comment 3 Vinzenz Feenstra [evilissimo] 2014-10-29 07:47:00 UTC
selinux-policy-3.12.1-153.el7_0.11.noarch
selinux-policy-targeted-3.12.1-153.el7_0.11.noarch

My fault, it is a dup of 1149253

*** This bug has been marked as a duplicate of bug 1149253 ***