diff options
author | runge <runge@karlrunge.com> | 2009-05-21 10:32:18 -0400 |
---|---|---|
committer | runge <runge@karlrunge.com> | 2009-05-21 10:32:18 -0400 |
commit | 804335f9d296440bb708ca844f5d89b58b50b0c6 (patch) | |
tree | a59c3c06a829b0a80c5d276d587369e01e92a5fb /libvncserver/tightvnc-filetransfer | |
parent | 2cd48332e02d9c81f67b2d718ad1feed5b0a808e (diff) | |
download | libtdevnc-804335f9d296440bb708ca844f5d89b58b50b0c6.tar.gz libtdevnc-804335f9d296440bb708ca844f5d89b58b50b0c6.zip |
Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422.
Diffstat (limited to 'libvncserver/tightvnc-filetransfer')
-rw-r--r-- | libvncserver/tightvnc-filetransfer/rfbtightserver.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libvncserver/tightvnc-filetransfer/rfbtightserver.c b/libvncserver/tightvnc-filetransfer/rfbtightserver.c index a24666b..ef29514 100644 --- a/libvncserver/tightvnc-filetransfer/rfbtightserver.c +++ b/libvncserver/tightvnc-filetransfer/rfbtightserver.c @@ -75,6 +75,24 @@ rfbVncAuthSendChallenge(rfbClientPtr cl) } /* + * LibVNCServer has a bug WRT Tight SecurityType and RFB 3.8 + * It should send auth result even for rfbAuthNone. + * See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=517422 + * For testing set USE_SECTYPE_TIGHT_FOR_RFB_3_8 when compiling + * or set it here. + */ +#define SECTYPE_TIGHT_FOR_RFB_3_8 \ + if (cl->protocolMajorVersion==3 && cl->protocolMinorVersion > 7) { \ + uint32_t authResult; \ + rfbLog("rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8\n"); \ + authResult = Swap32IfLE(rfbVncAuthOK); \ + if (rfbWriteExact(cl, (char *)&authResult, 4) < 0) { \ + rfbLogPerror("rfbAuthProcessClientMessage: write"); \ + rfbCloseClient(cl); \ + return; \ + } \ + } +/* * Read client's preferred authentication type (protocol 3.7t). */ @@ -117,6 +135,9 @@ rfbProcessClientAuthType(rfbClientPtr cl) switch (auth_type) { case rfbAuthNone: /* Dispatch client input to rfbProcessClientInitMessage. */ +#ifdef USE_SECTYPE_TIGHT_FOR_RFB_3_8 + SECTYPE_TIGHT_FOR_RFB_3_8 +#endif cl->state = RFB_INITIALISATION; break; case rfbAuthVNC: @@ -188,6 +209,9 @@ rfbSendAuthCaps(rfbClientPtr cl) /* Call the function for authentication from here */ rfbProcessClientAuthType(cl); } else { +#ifdef USE_SECTYPE_TIGHT_FOR_RFB_3_8 + SECTYPE_TIGHT_FOR_RFB_3_8 +#endif /* Dispatch client input to rfbProcessClientInitMessage. */ cl->state = RFB_INITIALISATION; } |