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 1423013 - Can't make a dbus method call to the com.redhat.RHSM1.RegisterServer Start method until /etc/dbus-1/system.conf is edited
Summary: Can't make a dbus method call to the com.redhat.RHSM1.RegisterServer Start me...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.3
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: rc
: ---
Assignee: Alex Wood
QA Contact: Sean Toner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-16 21:00 UTC by Sean Toner
Modified: 2017-08-01 19:20 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:20:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2083 0 normal SHIPPED_LIVE python-rhsm and subscription-manager bug fix and enhancement update 2017-08-01 18:14:19 UTC

Description Sean Toner 2017-02-16 21:00:56 UTC
Description of problem
======================

Making a dbus call to start the RegisterServer using the dbus-send or busctl utilities fails with an Access Denied.  This appears to be caused by the /etc/dbus-1/system.conf file rejecting send_type="method_call"


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

[root@stoner-rhel-74 ~]# rpm -qa | grep subscription
subscription-manager-gui-1.19.1-1.git.9.908316a.el7.x86_64
subscription-manager-1.19.1-1.git.9.908316a.el7.x86_64
subscription-manager-initial-setup-addon-1.19.1-1.git.9.908316a.el7.x86_64
subscription-manager-migration-1.19.1-1.git.9.908316a.el7.x86_64
subscription-manager-migration-data-2.0.34-1.git.0.2384ef4.el7.noarch


How reproducible
================

Always


Steps to Reproduce:
===================

See Actual results below

Actual results:
===============

[root@stoner-rhel-74 ~]# dbus-send --system --print-reply --dest='com.redhat.RHSM1' '/com/redhat/RHSM1/RegisterServer' com.redhat.RHSM1.RegisterServer.Start
Error org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.26" (uid=0 pid=2324 comm="dbus-send --system --print-reply --dest=com.redhat") interface="com.redhat.RHSM1.RegisterServer" member="Start" error name="(unset)" requested_reply="0" destination="com.redhat.RHSM1" (uid=0 pid=812 comm="python /usr/libexec/rhsm-service ")


Expected results:
=================

[root@stoner-rhel-74 ~]# dbus-send --system --print-reply --dest='com.redhat.RHSM1' '/com/redhat/RHSM1/RegisterServer' com.redhat.RHSM1.RegisterServer.Start
method return sender=:1.5 -> dest=:1.4 reply_serial=2
   string "unix:abstract=/var/run/dbus-XP0szXbntD,guid=e234053b12b7e78b2c48cac758a60d17"


Additional info:
================

The fix I made was to edit the /etc/dbus-1/system.conf file like this:

    <!-- <deny send_type="method_call"/> -->

    <!-- Signals and reply messages (method returns, errors) are allowed
         by default -->
    <allow send_type="method_call"/>

Then systemctl restart dbus.service, and reissue the dbus-send.

Comment 2 Alex Wood 2017-03-16 21:10:35 UTC
Fix up for review with https://github.com/candlepin/subscription-manager/pull/1562

Comment 4 Sean Toner 2017-04-17 19:09:56 UTC
To verify this BZ I did not have to edit the /etc/dbus-1/system.conf file.  The send_type did not have to be edited to get dbus to work and dbus.service did not need to be restarted:

[root@stoner-rhel-74 subman1.9.7]# cat /etc/dbus-1/system.conf | grep send_type
    <deny send_type="method_call"/>
    <allow send_type="signal"/>
    <allow send_requested_reply="true" send_type="method_return"/>
    <allow send_requested_reply="true" send_type="error"/>


And running the original command that got an access denied now works successfully:

[root@stoner-rhel-74 subman1.9.7]# dbus-send --system --print-reply --dest='com.redhat.RHSM1' '/com/redhat/RHSM1/RegisterServer' com.redhat.RHSM1.RegisterServer.Start
method return sender=:1.37865 -> dest=:1.37926 reply_serial=2
   string "unix:abstract=/var/run/dbus-hFLSsUWi7q,guid=1cc8ab09c9c716d9f755819358f50415"


Verified on:

[root@stoner-rhel-74 ~]# rpm -qa | grep subscription
subscription-manager-1.19.7-1.el7.x86_64
subscription-manager-plugin-container-1.19.7-1.el7.x86_64
subscription-manager-migration-data-2.0.35-1.el7.noarch
subscription-manager-plugin-ostree-1.19.7-1.el7.x86_64
subscription-manager-migration-1.19.7-1.el7.x86_64
subscription-manager-initial-setup-addon-1.19.7-1.el7.x86_64
subscription-manager-gui-1.19.7-1.el7.x86_64

Comment 5 errata-xmlrpc 2017-08-01 19:20:42 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://access.redhat.com/errata/RHBA-2017:2083


Note You need to log in before you can comment on or make changes to this bug.