After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793116 - No reply on private D-Bus DHCP socket due to auth problem
No reply on private D-Bus DHCP socket due to auth problem
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
1.6.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2018-02-02 09:41 UTC by reet
Modified: 2018-03-19 10:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description reet 2018-02-02 09:41:31 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.
Comment 1 Thomas Haller 2018-03-15 13:02:51 UTC
thanks for the helpful report.

Fix at https://github.com/NetworkManager/NetworkManager/pull/79