summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2011-11-09 00:25:56 +0100
committerChristian Beier <dontmind@freeshell.org>2011-11-09 00:25:56 +0100
commit27b4372c94e4d2054d101de9a1eef745e1ebdbae (patch)
tree1cc242e054306898633dfd22bb0b872d32f0dc4f
parent14c8943c92dbdab78f4afbbd50ea29e7952b7bb8 (diff)
downloadlibvncserver-27b4372c94e4d2054d101de9a1eef745e1ebdbae.zip
libvncserver-27b4372c94e4d2054d101de9a1eef745e1ebdbae.tar.gz
When GetCredential() callback is not set, don't use authentications requiring it.
The auth methods that employ Getcredential() will only be used if the client's GetCredential callback is actually set.
-rw-r--r--libvncclient/rfbproto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c
index d424b04..a7faab1 100644
--- a/libvncclient/rfbproto.c
+++ b/libvncclient/rfbproto.c
@@ -569,8 +569,8 @@ ReadSupportedSecurityType(rfbClient* client, uint32_t *result, rfbBool subAuth)
rfbClientLog("%d) Received security type %d\n", loop, tAuth[loop]);
if (flag) continue;
if (tAuth[loop]==rfbVncAuth || tAuth[loop]==rfbNoAuth ||
- tAuth[loop]==rfbARD ||
- (!subAuth && (tAuth[loop]==rfbTLS || tAuth[loop]==rfbVeNCrypt)))
+ (tAuth[loop]==rfbARD && client->GetCredential) ||
+ (!subAuth && (tAuth[loop]==rfbTLS || (tAuth[loop]==rfbVeNCrypt && client->GetCredential))))
{
if (!subAuth && client->clientAuthSchemes)
{
OpenPOWER on IntegriCloud