From 50a58f0fabd8a34c1b6108a107e08abe3c1ccd24 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 14 Jul 2015 19:38:58 +0200 Subject: Imported Upstream version 1.0.4 --- libnm/nm-dbus-helpers.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libnm/nm-dbus-helpers.c') diff --git a/libnm/nm-dbus-helpers.c b/libnm/nm-dbus-helpers.c index 6bfd4bbd..45e09442 100644 --- a/libnm/nm-dbus-helpers.c +++ b/libnm/nm-dbus-helpers.c @@ -22,6 +22,8 @@ #include #include + +#include "nm-glib-compat.h" #include "nm-dbus-helpers.h" #include "nm-dbus-interface.h" @@ -93,7 +95,8 @@ _nm_dbus_new_connection (GCancellable *cancellable, GError **error) GDBusConnection *connection = NULL; /* If running as root try the private bus first */ - if (0 == geteuid ()) { + if (0 == geteuid () && !g_test_initialized ()) { + GError *local = NULL; GDBusConnection *p; @@ -203,7 +206,7 @@ _nm_dbus_new_connection_async (GCancellable *cancellable, simple = g_simple_async_result_new (NULL, callback, user_data, _nm_dbus_new_connection_async); /* If running as root try the private bus first */ - if (0 == geteuid ()) { + if (0 == geteuid () && !g_test_initialized ()) { GDBusConnection *p; if (cancellable) { -- cgit 1.3.0-6-gf8a5