Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85396

Passing QDBusUnixFileDescriptor over peer-to-peer connections does not work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.1
    • 5.12.0, 5.15.0
    • D-Bus
    • None
    • 6d880185b1483b4efb3e358815060537d91b0de4 (qt/qtbase/dev) 3c2f7af2094adc924b3cffadf77602f0f8c47f93 (qt/qtbase/5.15)

    Description

      Passing QDBusUnixFileDescriptor over peer-to-peer connections does not work. This is for two reasons:

      QDBusConnectionPrivate::setPeer does not set this->capabilities, unlike QDBusConnectionPrivate::setConnection which is executed for bus connections, which contains the line:

      capabilities = connectionCapabilies(connection);

       

      When this line is added to QDBusConnectionPrivate::setPeer, the second issue is that QDBusConnectionPrivate::setPeer  is called before the authentication is finished, and therefore dbus_connection_can_send_type will always return 0. The solution is probably to wait in QDBusConnectionManager::executeConnectionRequest and qDBusNewConnection until the authentication is done (this is already done for bus connections implicitly by calling dbus_bus_register.

       

      I've attached a patch which should fix this issue.

       

      Attachments

        For Gerrit Dashboard: QTBUG-85396
        # Subject Branch Project Status CR V

        Activity

          People

            thiago Thiago Macieira
            steffen-kiess Steffen Kieß
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change