diff options
author | Christian Beier <dontmind@freeshell.org> | 2011-11-09 00:25:56 +0100 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2011-11-09 00:25:56 +0100 |
commit | 27b4372c94e4d2054d101de9a1eef745e1ebdbae (patch) | |
tree | 1cc242e054306898633dfd22bb0b872d32f0dc4f | |
parent | 14c8943c92dbdab78f4afbbd50ea29e7952b7bb8 (diff) | |
download | libvncserver-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.c | 4 |
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) { |