]>
Commit | Line | Data |
---|---|---|
e6d0212c DM |
1 | Index: vnc/libvncserver/auth.c |
2 | =================================================================== | |
c8d35ad9 | 3 | @@ -300,8 +300,9 @@ |
e6d0212c DM |
4 | int32_t securityType = rfbSecTypeInvalid; |
5 | ||
6 | if (!cl->screen->authPasswdData || cl->reverseConnection) { | |
7 | - /* chk if this condition is valid or not. */ | |
8 | - securityType = rfbSecTypeNone; | |
c8d35ad9 FG |
9 | + /* chk if this condition is valid or not. */ |
10 | + /* we disable anonymous auth */ | |
11 | + // securityType = rfbSecTypeNone; | |
e6d0212c DM |
12 | } else if (cl->screen->authPasswdData) { |
13 | securityType = rfbSecTypeVncAuth; | |
14 | } | |
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 | |
c8d35ad9 FG |
20 | @@ -613,7 +613,11 @@ rfbReadExactTimeout(rfbClientPtr cl, char* buf, int len, int timeout) |
21 | n = read(sock, buf, len); | |
22 | } | |
23 | #else | |
e6d0212c | 24 | - n = read(sock, buf, len); |
c8d35ad9 FG |
25 | + if (cl->sock_read_fn) { |
26 | + n = cl->sock_read_fn(cl, buf, len); | |
27 | + } else { | |
28 | + n = read(sock, buf, len); | |
29 | + } | |
30 | #endif | |
e6d0212c DM |
31 | |
32 | if (n > 0) { | |
c8d35ad9 FG |
33 | @@ -801,7 +805,11 @@ rfbWriteExact(rfbClientPtr cl, |
34 | n = rfbssl_write(cl, buf, len); | |
35 | else | |
36 | #endif | |
37 | + if (cl->sock_write_fn) { | |
e6d0212c | 38 | + n = cl->sock_write_fn(cl, buf, len); |
c8d35ad9 FG |
39 | + } else { |
40 | n = write(sock, buf, len); | |
41 | + } | |
e6d0212c DM |
42 | |
43 | if (n > 0) { | |
44 | ||
45 | Index: vnc/rfb/rfb.h | |
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 | |
49 | @@ -397,6 +397,9 @@ | |
50 | struct _rfbStatList *Next; | |
51 | } rfbStatList; | |
52 | ||
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); | |
55 | + | |
56 | typedef struct _rfbClientRec { | |
57 | ||
58 | /* back pointer to the screen */ | |
59 | @@ -417,6 +420,10 @@ | |
60 | void* clientData; | |
61 | ClientGoneHookPtr clientGoneHook; | |
62 | ||
63 | + /* use to hook up TLS read/write */ | |
64 | + sock_read_fn_t sock_read_fn; | |
65 | + sock_read_fn_t sock_write_fn; | |
66 | + | |
67 | SOCKET sock; | |
68 | char *host; | |
69 |