Skip to contentSkip to conversation

handle VNC v3.7 clients correctly

PATCH In review Dan Kenigsberg 2 participants 2 messages Oct 28, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 handle VNC v3.7 clients correctly

According to http://www.realvnc.com/docs/rfbproto.pdf section 6.2.1, when handling older clients, SecurityResult should not be sent.

vnc.c +4 -1
index 72c8d1c..8ae671a 100644
@@ -1775,7 +1775,10 @@ static int protocol_client_auth(VncState *vs, char *data, size_t len)
        switch (vs->auth) {
        case VNC_AUTH_NONE:
            VNC_DEBUG("Accept auth none\n");
-           vnc_write_u32(vs, 0); /* Accept auth completion */
+           if (vs->minor >= 8) {
+               vnc_write_u32(vs, 0); /* Accept auth completion */
+               vnc_flush(vs);
+           }
            vnc_read_when(vs, protocol_client_init, 1);
            break;
#1 lore raw
Quoted 2 lines · Dan Kenigsberg

According to http://www.realvnc.com/docs/rfbproto.pdf section 6.2.1, when handling older clients, SecurityResult should not be sent.

Yep, good catch - thanks for finding this bug of mine.

Regards,
Dan.

Signature · 4 lines
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=|