diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2015-05-26 13:25:23 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-05-26 13:51:45 +0200 |
commit | 02e3d6c2866402549c6976f564eb663ff12d3ebd (patch) | |
tree | 42349b73493241749be2958fa0382ef0c1b8cd10 /libnm/nm-dbus-helpers.c | |
parent | dd959087a2aaf4ba3b3b222d65518c98cef930c3 (diff) | |
download | NetworkManager-02e3d6c2866402549c6976f564eb663ff12d3ebd.tar.gz |
tests: don't try to connect to the private socketlr/tap-tests
Even if we're running the tests as root we still want to use the mock
service instead of whatever version of daemon runs on the test host.
Diffstat (limited to 'libnm/nm-dbus-helpers.c')
-rw-r--r-- | libnm/nm-dbus-helpers.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libnm/nm-dbus-helpers.c b/libnm/nm-dbus-helpers.c index 6bfd4bbd83..a9fc58edf3 100644 --- a/libnm/nm-dbus-helpers.c +++ b/libnm/nm-dbus-helpers.c @@ -93,7 +93,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 +204,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) { |