[glib/glib-2-60: 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/glib-2-60: 6/7] gdbusdaemon: Only authorize anonymous users on Windows, not Unix
- Date: Tue, 11 Jun 2019 10:22:28 +0000 (UTC)
commit 85c1ec0827751c1600d8eb419cb1947b56c7eb11
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 e6b3c1af0..d893b930a 100644
--- a/gio/gdbusdaemon.c
+++ b/gio/gdbusdaemon.c
@@ -1534,7 +1534,7 @@ on_authorize_authenticated_peer (GDBusAuthObserver *observer,
GCredentials *credentials,
gpointer user_data)
{
- gboolean authorized = TRUE;
+ gboolean authorized = FALSE;
if (credentials != NULL)
{
@@ -1544,6 +1544,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]