summaryrefslogtreecommitdiffstats
path: root/sockets.c
diff options
context:
space:
mode:
authordscho <dscho>2002-04-23 12:34:50 +0000
committerdscho <dscho>2002-04-23 12:34:50 +0000
commite66eeecd62f62acc3d86f737d979f97a529686b0 (patch)
tree2334cf41cd26be51da17b77a34792471a0d9c8f2 /sockets.c
parentfd2931c0ed7f0b4d126b142106e7a7197f43e4e3 (diff)
downloadlibtdevnc-e66eeecd62f62acc3d86f737d979f97a529686b0.tar.gz
libtdevnc-e66eeecd62f62acc3d86f737d979f97a529686b0.zip
sync with TightVNC 1.2.3
Diffstat (limited to 'sockets.c')
-rw-r--r--sockets.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sockets.c b/sockets.c
index 812e4f8..7164904 100644
--- a/sockets.c
+++ b/sockets.c
@@ -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);