summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteven_carr <steven_carr>2006-06-05 17:33:51 +0000
committersteven_carr <steven_carr>2006-06-05 17:33:51 +0000
commita75a576e138e75a522140bb6f2e7345cf8863b15 (patch)
treef2e05f623ebeaf5ace5e221eadf07e224ea850e1
parent203eee7cfdb70556125f959d3b548fbd1213d8d2 (diff)
downloadlibtdevnc-a75a576e.tar.gz
libtdevnc-a75a576e.zip
All security types for RFB >= 3.7 *have* to respond with a Security Result (Even rfbSecTypeNone)
-rwxr-xr-xlibvncserver/auth.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libvncserver/auth.c b/libvncserver/auth.c
index a1f75a0..45b3a8e 100755
--- a/libvncserver/auth.c
+++ b/libvncserver/auth.c
@@ -265,7 +265,8 @@ rfbProcessClientSecurityType(rfbClientPtr cl)
int n;
uint8_t chosenType;
rfbSecurityHandler* handler;
-
+ uint32_t authResult;
+
/* Read the security type. */
n = rfbReadExact(cl, (char *)&chosenType, 1);
if (n <= 0) {
@@ -281,6 +282,13 @@ rfbProcessClientSecurityType(rfbClientPtr cl)
for (handler = securityHandlers; handler; handler = handler->next) {
if (chosenType == handler->type) {
if (chosenType == rfbSecTypeNone) {
+ authResult = Swap32IfLE(rfbVncAuthOK);
+
+ if (rfbWriteExact(cl, (char *)&authResult, 4) < 0) {
+ rfbLogPerror("rfbAuthProcessClientMessage: write");
+ rfbCloseClient(cl);
+ return;
+ }
cl->state = RFB_INITIALISATION;
return;
} else {