diff --git a/gio/gdbusdaemon.c b/gio/gdbusdaemon.c index 8837b4819280f9c87fc7af70229f797d06a53c20..5a8e523f050008c1251bcac7bbde96853666ac46 100644 --- a/gio/gdbusdaemon.c +++ b/gio/gdbusdaemon.c @@ -1618,13 +1618,8 @@ initable_init (GInitable *initable, if (daemon->address == NULL) { #ifdef G_OS_UNIX - if (g_unix_socket_address_abstract_names_supported ()) - daemon->address = g_strdup ("unix:tmpdir=/tmp/gdbus-daemon"); - else - { - daemon->tmpdir = g_dir_make_tmp ("gdbus-daemon-XXXXXX", NULL); - daemon->address = g_strdup_printf ("unix:tmpdir=%s", daemon->tmpdir); - } + daemon->tmpdir = g_dir_make_tmp ("gdbus-daemon-XXXXXX", NULL); + daemon->address = g_strdup_printf ("unix:tmpdir=%s", daemon->tmpdir); flags |= G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER; #else /* Don’t require authentication on Windows as that hasn’t been diff --git a/gio/gdbusserver.c b/gio/gdbusserver.c index f144d129ae5a7a9b7568564f461ff54414e25955..db0c9ab50a822501be62419794f0173489aed16e 100644 --- a/gio/gdbusserver.c +++ b/gio/gdbusserver.c @@ -725,14 +725,7 @@ try_unix (GDBusServer *server, for (n = 0; n < 8; n++) g_string_append_c (s, random_ascii ()); - /* prefer abstract namespace if available for tmpdir: addresses - * abstract namespace is disallowed for dir: addresses */ - if (tmpdir != NULL && g_unix_socket_address_abstract_names_supported ()) - address = g_unix_socket_address_new_with_type (s->str, - -1, - G_UNIX_SOCKET_ADDRESS_ABSTRACT); - else - address = g_unix_socket_address_new (s->str); + address = g_unix_socket_address_new (s->str); g_string_free (s, TRUE); local_error = NULL; diff --git a/gio/tests/gdbus-auth.c b/gio/tests/gdbus-auth.c index b0d163d98da76adb89074e3a48ac0d49cd78778d..e62f53f871c085eb83b4dcfd851a77aabe4514e1 100644 --- a/gio/tests/gdbus-auth.c +++ b/gio/tests/gdbus-auth.c @@ -63,17 +63,10 @@ server_new_for_mechanism (const gchar *allowed_mechanism) guid = g_dbus_generate_guid (); #ifdef G_OS_UNIX - if (g_unix_socket_address_abstract_names_supported ()) - { - addr = g_strdup ("unix:tmpdir=/tmp/gdbus-test-"); - } - else - { - gchar *tmpdir; - tmpdir = g_dir_make_tmp ("gdbus-test-XXXXXX", NULL); - addr = g_strdup_printf ("unix:tmpdir=%s", tmpdir); - g_free (tmpdir); - } + gchar *tmpdir; + tmpdir = g_dir_make_tmp ("gdbus-test-XXXXXX", NULL); + addr = g_strdup_printf ("unix:tmpdir=%s", tmpdir); + g_free (tmpdir); #else addr = g_strdup ("nonce-tcp:"); #endif diff --git a/gio/tests/gdbus-overflow.c b/gio/tests/gdbus-overflow.c index e3896e1b1141a6a564ca3d374abdef8b257fdb81..b0dc89f0f9bd5ea19a45a84acf7f0a26674d29b5 100644 --- a/gio/tests/gdbus-overflow.c +++ b/gio/tests/gdbus-overflow.c @@ -219,13 +219,8 @@ main (int argc, if (is_unix) { - if (g_unix_socket_address_abstract_names_supported ()) - tmp_address = g_strdup ("unix:tmpdir=/tmp/gdbus-test-"); - else - { - tmpdir = g_dir_make_tmp ("gdbus-test-XXXXXX", NULL); - tmp_address = g_strdup_printf ("unix:tmpdir=%s", tmpdir); - } + tmpdir = g_dir_make_tmp ("gdbus-test-XXXXXX", NULL); + tmp_address = g_strdup_printf ("unix:tmpdir=%s", tmpdir); } else tmp_address = g_strdup ("nonce-tcp:"); diff --git a/gio/tests/gmenumodel.c b/gio/tests/gmenumodel.c index 618a29eae60f8f503028a3f305a80398e1917955..04ae2840b8110ca59c8aace1f804a4f8920e0326 100644 --- a/gio/tests/gmenumodel.c +++ b/gio/tests/gmenumodel.c @@ -831,13 +831,8 @@ service_thread_func (gpointer user_data) flags = G_DBUS_SERVER_FLAGS_NONE; #ifdef G_OS_UNIX - if (g_unix_socket_address_abstract_names_supported ()) - address = g_strdup ("unix:tmpdir=/tmp/test-dbus-peer"); - else - { - tmpdir = g_dir_make_tmp ("test-dbus-peer-XXXXXX", NULL); - address = g_strdup_printf ("unix:tmpdir=%s", tmpdir); - } + tmpdir = g_dir_make_tmp ("test-dbus-peer-XXXXXX", NULL); + address = g_strdup_printf ("unix:tmpdir=%s", tmpdir); #else address = g_strdup ("nonce-tcp:"); flags |= G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS;