GNOME Bugzilla – Bug 696109
[review] dcbw/duid-fixes: fix crash when machine-id isn't present
Last modified: 2013-03-20 16:28:35 UTC
Turns out machine-id doesn't have to be in /etc, if you're not running systemd or you're running an older distro, it might be in /var/lib/dbus. Look for the machine-id in both locations, and if there really, really isn't a machine-id, just make something up from /dev/urandom.
Created attachment 239208 [details] [review] Don't warn if we don't have an IPv6 config when starting DHCPv6
Created attachment 239209 [details] [review] Look harder for machine-id and fall back to generated one if missing
Review of attachment 239209 [details] [review]: Note there is dbus_get_local_machine_id() for libdbus users; an equivalent is currently private in GLib but could be made public.
Review of attachment 239208 [details] [review]: Looks good.
Review of attachment 239209 [details] [review]: Looks good.
Review of attachment 239209 [details] [review]: Looks reasonable for fixing the actual problem. As a sidenote, I would expect the machine id to come from hardware (which is unfortunately not the case) and then be used unhashed for DUID. I don't think we want to do anything about the hardware part right now and would rather wait for a service that provices us with something like that. But I'm curious why is machine-id considered so sensitive.
(In reply to comment #3) > Note there is dbus_get_local_machine_id() for libdbus users; an equivalent is > currently private in GLib but could be made public. g_get_machine_id() seems like a logical addition to gutils
(In reply to comment #7) > (In reply to comment #3) > > Note there is dbus_get_local_machine_id() for libdbus users; an equivalent is > > currently private in GLib but could be made public. > > g_get_machine_id() seems like a logical addition to gutils Yeah, we'd switch to that if it was available.
pushed, thanks all