From 8f696c578c91e17ed44af7b846b257a50377c91b Mon Sep 17 00:00:00 2001
From: Guilherme Quentel Melo <gqmelo@gmail.com>
Date: Tue, 7 Feb 2017 18:28:43 -0200
Subject: [PATCH 1/4] Add /var/lib/dbus/machine-id as a fallback

---
 dbus/dbus-sysdeps-unix.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
index 1eb54bd..8d137eb 100644
--- a/dbus/dbus-sysdeps-unix.c
+++ b/dbus/dbus-sysdeps-unix.c
@@ -4196,6 +4196,15 @@ _dbus_read_local_machine_uuid (DBusGUID   *machine_id,
   if (b)
     return TRUE;
 
+  /* Fallback to the machine ID of system-wide dbus*/
+  _dbus_string_init_const (&filename, "/var/lib/dbus/machine-id");
+
+  b = _dbus_read_uuid_file (&filename, machine_id, FALSE, error);
+  if (b)
+    return TRUE;
+
+  dbus_error_free (error);
+
   /* Fallback to the system machine ID */
   _dbus_string_init_const (&filename, "/etc/machine-id");
   b = _dbus_read_uuid_file (&filename, machine_id, FALSE, &etc_error);
-- 
2.20.1

