mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +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
a5923d4e49
commit
11233f572d
@ -1539,7 +1539,7 @@ on_authorize_authenticated_peer (GDBusAuthObserver *observer,
|
||||
GCredentials *credentials,
|
||||
gpointer user_data)
|
||||
{
|
||||
gboolean authorized = TRUE;
|
||||
gboolean authorized = FALSE;
|
||||
|
||||
if (credentials != NULL)
|
||||
{
|
||||
@ -1549,6 +1549,14 @@ on_authorize_authenticated_peer (GDBusAuthObserver *observer,
|
||||
authorized = g_credentials_is_same_user (credentials, own_credentials, NULL);
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user