diff options
author | Simon McVittie <smcv@collabora.com> | 2019-06-05 15:00:29 +0100 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2019-06-11 11:06:47 +0100 |
commit | 85c1ec0827751c1600d8eb419cb1947b56c7eb11 (patch) | |
tree | 2431f2f507f31d1386096ee4cc0dc9fb0cb6ed53 | |
parent | d2ae55fafad634ad577b25a03d5aaa8d7881a919 (diff) | |
download | glib-85c1ec0827751c1600d8eb419cb1947b56c7eb11.tar.gz |
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>
-rw-r--r-- | gio/gdbusdaemon.c | 10 |
1 files changed, 9 insertions, 1 deletions
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; } |