]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/misc/tcpwrapper.c
Further coverity related cleanups.
[nfs-utils.git] / support / misc / tcpwrapper.c
index 8743a7b420ca7c9a172932b13574060e7b8a4cf8..ebe63e173a3ae22c513e10d64b82a0c720efb80e 100644 (file)
   * authorized by the /etc/hosts.{allow,deny} files. The local system is
   * always treated as an authorized host. The access control tables are never
   * consulted for requests from the local system, and are always consulted
-  * for requests from other hosts. Access control is based on IP addresses
-  * only; attempts to map an address to a host name might cause the
-  * portmapper to hang.
+  * for requests from other hosts.
   * 
   * Author: Wietse Venema (wietse@wzv.win.tue.nl), dept. of Mathematics and
   * Computing Science, Eindhoven University of Technology, The Netherlands.
   */
 
-#include "tcpwrapper.h"
-
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <tcpwrapper.h>
 #include <unistd.h>
 #include <string.h>
 #include <rpc/rpc.h>
@@ -57,8 +57,15 @@ int     deny_severity = LOG_WARNING;
 
 /* A handful of macros for "readability". */
 
+#ifdef HAVE_LIBWRAP
 /* coming from libwrap.a (tcp_wrappers) */
 extern int hosts_ctl(char *daemon, char *name, char *addr, char *user);
+#else
+int hosts_ctl(char *daemon, char *name, char *addr, char *user)
+{
+       return 0;
+}
+#endif
 
 #define        legal_port(a,p) \
   (ntohs((a)->sin_port) < IPPORT_RESERVED || (p) >= IPPORT_RESERVED)