diff options
author | dscho <dscho> | 2002-04-23 12:34:50 +0000 |
---|---|---|
committer | dscho <dscho> | 2002-04-23 12:34:50 +0000 |
commit | e66eeecd62f62acc3d86f737d979f97a529686b0 (patch) | |
tree | 2334cf41cd26be51da17b77a34792471a0d9c8f2 /sockets.c | |
parent | fd2931c0ed7f0b4d126b142106e7a7197f43e4e3 (diff) | |
download | libtdevnc-e66eeecd62f62acc3d86f737d979f97a529686b0.tar.gz libtdevnc-e66eeecd62f62acc3d86f737d979f97a529686b0.zip |
sync with TightVNC 1.2.3
Diffstat (limited to 'sockets.c')
-rw-r--r-- | sockets.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -67,6 +67,13 @@ struct timeval #include <fcntl.h> #include <errno.h> +#ifdef USE_LIBWRAP +#include <syslog.h> +#include <tcpd.h> +int allow_severity=LOG_INFO; +int deny_severity=LOG_WARNING; +#endif + #include "rfb.h" /*#ifndef WIN32 @@ -223,6 +230,16 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec) return; } +#ifdef USE_LIBWRAP + if(!hosts_ctl("vnc",STRING_UNKNOWN,inet_ntoa(addr.sin_addr), + STRING_UNKNOWN)) { + rfbLog("Rejected connection from client %s\n", + inet_ntoa(addr.sin_addr)); + close(sock); + return; + } +#endif + rfbLog("Got connection from client %s\n", inet_ntoa(addr.sin_addr)); rfbNewClient(rfbScreen,sock); |