[glib: 6/7] gdbusdaemon: Only authorize anonymous users on Windows, not Unix
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 6/7] gdbusdaemon: Only authorize anonymous users on Windows, not Unix
- Date: Tue, 11 Jun 2019 10:31:25 +0000 (UTC)
commit 11233f572df8f93e36d1115bc489b72f287cac53
Author: Simon McVittie <smcv collabora com>
Date: Wed Jun 5 15:00:29 2019 +0100
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>
gio/gdbusdaemon.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/gio/gdbusdaemon.c b/gio/gdbusdaemon.c
index a9b626215..eb628398d 100644
--- a/gio/gdbusdaemon.c
+++ b/gio/gdbusdaemon.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]