summaryrefslogtreecommitdiffstats
path: root/rfb/rfb.h
diff options
context:
space:
mode:
authorKyle J. McKay <mackyle@gmail.com>2012-02-10 19:13:00 -0800
committerChristian Beier <dontmind@freeshell.org>2012-02-11 13:38:20 +0100
commit5c57575c357bd1f277303607312266fd2139ad6e (patch)
treed76de5d76d9adde131489956b0e21d3ad3e22c30 /rfb/rfb.h
parent8121e8445d157c4f2e15770a9222ca9948a62e22 (diff)
downloadlibtdevnc-5c57575c357bd1f277303607312266fd2139ad6e.tar.gz
libtdevnc-5c57575c357bd1f277303607312266fd2139ad6e.zip
Support Mac OS X vnc client with no password
Support connections from the Mac OS X built-in VNC client to LibVNCServers running with no password and advertising a server version of 3.7 or greater.
Diffstat (limited to 'rfb/rfb.h')
-rw-r--r--rfb/rfb.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/rfb/rfb.h b/rfb/rfb.h
index 3317e54..e068e76 100644
--- a/rfb/rfb.h
+++ b/rfb/rfb.h
@@ -456,13 +456,44 @@ typedef struct _rfbClientRec {
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
pthread_t client_thread;
#endif
+
+ /* Note that the RFB_INITIALISATION_SHARED state is provided to support
+ clients that under some circumstances do not send a ClientInit message.
+ In particular the Mac OS X built-in VNC client (with protocolMinorVersion
+ == 889) is one of those. However, it only requires this support under
+ special circumstances that can only be determined during the initial
+ authentication. If the right conditions are met this state will be
+ set (see the auth.c file) when rfbProcessClientInitMessage is called.
+
+ If the state is RFB_INITIALISATION_SHARED we should not expect to recieve
+ any ClientInit message, but instead should proceed to the next stage
+ of initialisation as though an implicit ClientInit message was received
+ with a shared-flag of true. (There is currently no corresponding
+ RFB_INITIALISATION_NOTSHARED state to represent an implicit ClientInit
+ message with a shared-flag of false because no known existing client
+ requires such support at this time.)
+
+ Note that software using LibVNCServer to provide a VNC server will only
+ ever have a chance to see the state field set to
+ RFB_INITIALISATION_SHARED if the software is multi-threaded and manages
+ to examine the state field during the extremely brief window after the
+ 'None' authentication type selection has been received from the built-in
+ OS X VNC client and before the rfbProcessClientInitMessage function is
+ called -- control cannot return to the caller during this brief window
+ while the state field is set to RFB_INITIALISATION_SHARED. */
+
/** Possible client states: */
enum {
RFB_PROTOCOL_VERSION, /**< establishing protocol version */
RFB_SECURITY_TYPE, /**< negotiating security (RFB v.3.7) */
RFB_AUTHENTICATION, /**< authenticating */
RFB_INITIALISATION, /**< sending initialisation messages */
- RFB_NORMAL /**< normal protocol messages */
+ RFB_NORMAL, /**< normal protocol messages */
+
+ /* Ephemeral internal-use states that will never be seen by software
+ * using LibVNCServer to provide services: */
+
+ RFB_INITIALISATION_SHARED /**< sending initialisation messages with implicit shared-flag already true */
} state;
rfbBool reverseConnection;