mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 11:42:10 +01:00
gdbusdaemon: Only authorize anonymous users on Windows, not Unix
On Unix, we expect EXTERNAL authentication to work. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
d2ae55fafa
commit
85c1ec0827
@ -1534,7 +1534,7 @@ on_authorize_authenticated_peer (GDBusAuthObserver *observer,
|
|||||||
GCredentials *credentials,
|
GCredentials *credentials,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
gboolean authorized = TRUE;
|
gboolean authorized = FALSE;
|
||||||
|
|
||||||
if (credentials != NULL)
|
if (credentials != NULL)
|
||||||
{
|
{
|
||||||
@ -1544,6 +1544,14 @@ on_authorize_authenticated_peer (GDBusAuthObserver *observer,
|
|||||||
authorized = g_credentials_is_same_user (credentials, own_credentials, NULL);
|
authorized = g_credentials_is_same_user (credentials, own_credentials, NULL);
|
||||||
g_object_unref (own_credentials);
|
g_object_unref (own_credentials);
|
||||||
}
|
}
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* We allow ANONYMOUS authentication on Windows for now, in
|
||||||
|
* combination with the nonce-tcp transport. */
|
||||||
|
authorized = TRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return authorized;
|
return authorized;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user