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 699906 - Segfaults if it can't read /etc/machine-id, needs fallback for /var/lib/dbus/machine-id
Segfaults if it can't read /etc/machine-id, needs fallback for /var/lib/dbus/...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
0.9.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-05-08 08:59 UTC by Michael Biebl
Modified: 2013-05-09 08:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Biebl 2013-05-08 08:59:10 UTC
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707204

If NM can't read /etc/machine-id and has DHCPv6 enabled for the connection, it segfaults in nm_dhcp_dhclient_escape_duid (the referenced bug report has a complete backtrace)


/etc/machine-id is only guaranteed to exist on systemd systems.
NM should fallback to read /var/lib/dbus/machine-id, and handle the case if it can't read either of those two.
Comment 1 Pavel Simerda 2013-05-09 08:54:22 UTC
commit 0bf0ee7136dff2b9a6435221987f447e11eea285
Author: Dan Williams <dcbw@redhat.com>
Date:   Fri Mar 15 16:49:39 2013 -0500

    dhcp: look harder for machine-id, and generate random DUID if it doesn't exist (bgo #696109)
    
    Not all systems have machine-id in /etc, some still have it in /var/lib/dbus/
    especially if they aren't using systemd.  Furthermore, if we don't have
    any machine-id file (like in the future, if we don't have a messaebus
    daemon running) fall back to a random DUID as a last resort.

(in git master)

Please reopen if this doesn't help.