[glib: 5/11] gio/gdbusauth: remove #ifdef G_OS_UNIX around credentials
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 5/11] gio/gdbusauth: remove #ifdef G_OS_UNIX around credentials
- Date: Wed, 18 May 2022 14:01:44 +0000 (UTC)
commit 18886d43d28981f01daa11198704968b70677fee
Author: Marc-André Lureau <marcandre lureau redhat com>
Date: Thu Apr 7 23:26:47 2022 +0400
gio/gdbusauth: remove #ifdef G_OS_UNIX around credentials
The AF_UNIX API is available under all platforms since 2.71.1, and
credentials functions returns NOT_SUPPORTED error appropriately,
we can thus remove the special-casing for !unix.
Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>
gio/gdbusauth.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
---
diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c
index 7a7900c1b1..2e3c50db61 100644
--- a/gio/gdbusauth.c
+++ b/gio/gdbusauth.c
@@ -37,11 +37,9 @@
#include "gdatainputstream.h"
#include "gdataoutputstream.h"
-#ifdef G_OS_UNIX
#include "gnetworking.h"
#include "gunixconnection.h"
#include "gunixcredentialsmessage.h"
-#endif
#include "glibintl.h"
@@ -972,7 +970,6 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
g_data_input_stream_set_newline_type (dis, G_DATA_STREAM_NEWLINE_TYPE_CR_LF);
/* read the NUL-byte, possibly with credentials attached */
-#ifdef G_OS_UNIX
#ifndef G_CREDENTIALS_PREFER_MESSAGE_PASSING
if (G_IS_SOCKET_CONNECTION (auth->priv->stream))
{
@@ -1018,15 +1015,7 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
goto out;
}
}
-#else
- local_error = NULL;
- (void)g_data_input_stream_read_byte (dis, cancellable, &local_error);
- if (local_error != NULL)
- {
- g_propagate_error (error, local_error);
- goto out;
- }
-#endif
+
if (credentials != NULL)
{
if (G_UNLIKELY (_g_dbus_debug_authentication ()))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]