diff options
| author | Michael Biebl <biebl@debian.org> | 2015-07-14 19:38:58 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-07-14 19:38:58 +0200 |
| commit | 50a58f0fabd8a34c1b6108a107e08abe3c1ccd24 (patch) | |
| tree | 6790165f39daee79e2b6c6617483320613493367 /libnm/nm-dbus-helpers.c | |
| parent | f408e27bccfacf347605a8d98649975a68f38a17 (diff) | |
Imported Upstream version 1.0.4 upstream/1.0.4
Diffstat (limited to 'libnm/nm-dbus-helpers.c')
| -rw-r--r-- | libnm/nm-dbus-helpers.c | 7 |
1 files changed, 5 insertions, 2 deletions
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 <string.h> #include <gio/gio.h> + +#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) { |