Details
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 |
308735,1 | Wait for authentication in QDBusConnection::connectToPeer() | dev | qt/qtbase | Status: NEW | 0 | 0 |
306732,5 | Fix passing QDBusUnixFileDescriptors over peer-to-peer connections | dev | qt/qtbase | Status: MERGED | +2 | 0 |
307612,2 | Fix passing QDBusUnixFileDescriptors over peer-to-peer connections | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |