mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 17:08:53 +02:00
Add glib credentials support to OpenBSD.
https://bugzilla.gnome.org/show_bug.cgi?id=650885
This commit is contained in:
committed by
Dan Winship
parent
2ee470a71f
commit
77f4f5aa02
@@ -612,7 +612,7 @@ _g_dbus_auth_run_client (GDBusAuth *auth,
|
||||
g_data_input_stream_set_newline_type (dis, G_DATA_STREAM_NEWLINE_TYPE_CR_LF);
|
||||
|
||||
#ifdef G_OS_UNIX
|
||||
if (G_IS_UNIX_CONNECTION (auth->priv->stream) && g_unix_credentials_message_is_supported ())
|
||||
if (G_IS_UNIX_CONNECTION (auth->priv->stream))
|
||||
{
|
||||
credentials = g_credentials_new ();
|
||||
if (!g_unix_connection_send_credentials (G_UNIX_CONNECTION (auth->priv->stream),
|
||||
@@ -989,13 +989,13 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
|
||||
|
||||
/* first read the NUL-byte (TODO: read credentials if using a unix domain socket) */
|
||||
#ifdef G_OS_UNIX
|
||||
if (G_IS_UNIX_CONNECTION (auth->priv->stream) && g_unix_credentials_message_is_supported ())
|
||||
if (G_IS_UNIX_CONNECTION (auth->priv->stream))
|
||||
{
|
||||
local_error = NULL;
|
||||
credentials = g_unix_connection_receive_credentials (G_UNIX_CONNECTION (auth->priv->stream),
|
||||
cancellable,
|
||||
&local_error);
|
||||
if (credentials == NULL)
|
||||
if (credentials == NULL && !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED))
|
||||
{
|
||||
g_propagate_error (error, local_error);
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user