mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 07:26:15 +01:00
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>
This commit is contained in:
parent
b5c97b1016
commit
18886d43d2
@ -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 ()))
|
||||
|
Loading…
Reference in New Issue
Block a user