1 Index: vnc/libvncserver/auth.c
2 ===================================================================
4 int32_t securityType = rfbSecTypeInvalid;
6 if (!cl->screen->authPasswdData || cl->reverseConnection) {
7 - /* chk if this condition is valid or not. */
8 - securityType = rfbSecTypeNone;
9 + /* chk if this condition is valid or not. */
10 + /* we disable anonymous auth */
11 + // securityType = rfbSecTypeNone;
12 } else if (cl->screen->authPasswdData) {
13 securityType = rfbSecTypeVncAuth;
15 Index: vnc/newterm/Makefile.am
16 Index: vnc/libvncserver/sockets.c
17 ===================================================================
18 --- vnc.orig/libvncserver/sockets.c 2011-01-20 16:42:41.000000000 +0100
19 +++ vnc/libvncserver/sockets.c 2011-01-21 10:20:03.000000000 +0100
20 @@ -613,7 +613,11 @@ rfbReadExactTimeout(rfbClientPtr cl, char* buf, int len, int timeout)
21 n = read(sock, buf, len);
24 - n = read(sock, buf, len);
25 + if (cl->sock_read_fn) {
26 + n = cl->sock_read_fn(cl, buf, len);
28 + n = read(sock, buf, len);
33 @@ -801,7 +805,11 @@ rfbWriteExact(rfbClientPtr cl,
34 n = rfbssl_write(cl, buf, len);
37 + if (cl->sock_write_fn) {
38 + n = cl->sock_write_fn(cl, buf, len);
40 n = write(sock, buf, len);
46 ===================================================================
47 --- vnc.orig/rfb/rfb.h 2011-01-20 16:36:06.000000000 +0100
48 +++ vnc/rfb/rfb.h 2011-01-21 06:44:22.000000000 +0100
50 struct _rfbStatList *Next;
53 +typedef ssize_t (*sock_read_fn_t)(struct _rfbClientRec *cl, void *buf, size_t count);
54 +typedef ssize_t (*sock_write_fn_t)(struct _rfbClientRec *cl, const void *buf, size_t count);
56 typedef struct _rfbClientRec {
58 /* back pointer to the screen */
61 ClientGoneHookPtr clientGoneHook;
63 + /* use to hook up TLS read/write */
64 + sock_read_fn_t sock_read_fn;
65 + sock_read_fn_t sock_write_fn;