GNOME Bugzilla – Bug 793116
No reply on private D-Bus DHCP socket due to auth problem
Last modified: 2018-03-19 10:28:52 UTC
I'm using NetworkManager 1.6.2-3 on Debian stretch x86_64. We have implemented a DHCP client in Ada (ADHCP, see here https://www.codelabs.ch/adhcp/) which is able to replace dhclient as NM's DHCP client of choice. The client is spawned via a wrapper binary as explained in "Using adhcp_client on a Linux Desktop" on the project website. The client calls an external notify binary which sends lease information via D-Bus over the private D-Bus socket unix:path=/var/run/NetworkManager/private-dhcp. Since the interface change from signals to method calls, we encounter some problems. The problem can be reproduces via dbus-monitor as well: $ sudo dbus-monitor --address unix:path=/var/run/NetworkManager/private-dhcp The expected outcome is: Failed to register connection to bus at unix:path=/var/run/NetworkManager/private-dhcp: No such interface 'org.freedesktop.DBus' on object at path /org/freedesktop/DBus There is no monitor facility on this socket, so far so good. But also another behavior can be observed: $ sudo dbus-monitor --address unix:path=/var/run/NetworkManager/private-dhcp Failed to register connection to bus at unix:path=/var/run/NetworkManager/private-dhcp: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. The server does not reply and syslog shows: Feb 2 10:37:34 hostname NetworkManager[PID]: Error adding entry to keyring: Error creating directory '/root/.dbus-keyrings': Read-only file system This looks like glib tries to perform some sort of DBUS_COOKIE_SHA1 authentication with the client where EXTERNAL should be used.
thanks for the helpful report. Fix at https://github.com/NetworkManager/NetworkManager/pull/79
fixed: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=5cd9340f831c5fab1e8749fcc3de4722d1701439