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
26 - n = read(sock, buf, len);
27 + if (cl->sock_read_fn)
28 + n = cl->sock_read_fn(cl, buf, len);
30 + n = read(sock, buf, len);
36 LOCK(cl->outputMutex);
38 - n = write(sock, buf, len);
39 + if (cl->sock_write_fn)
40 + n = cl->sock_write_fn(cl, buf, len);
42 + n = write(sock, buf, len);
47 ===================================================================
48 --- vnc.orig/rfb/rfb.h 2011-01-20 16:36:06.000000000 +0100
49 +++ vnc/rfb/rfb.h 2011-01-21 06:44:22.000000000 +0100
51 struct _rfbStatList *Next;
54 +typedef ssize_t (*sock_read_fn_t)(struct _rfbClientRec *cl, void *buf, size_t count);
55 +typedef ssize_t (*sock_write_fn_t)(struct _rfbClientRec *cl, const void *buf, size_t count);
57 typedef struct _rfbClientRec {
59 /* back pointer to the screen */
62 ClientGoneHookPtr clientGoneHook;
64 + /* use to hook up TLS read/write */
65 + sock_read_fn_t sock_read_fn;
66 + sock_read_fn_t sock_write_fn;