Blame SOURCES/tcp_wrappers-7.6-sig.patch

c863fc
diff -up tcp_wrappers_7.6/hosts_access.c.patch12 tcp_wrappers_7.6/hosts_access.c
c863fc
--- tcp_wrappers_7.6/hosts_access.c.patch12	2008-08-29 09:45:12.000000000 +0200
c863fc
+++ tcp_wrappers_7.6/hosts_access.c	2008-08-29 09:45:12.000000000 +0200
c863fc
@@ -66,6 +66,7 @@ static char sep[] = ", \t\r\n";
c863fc
 
c863fc
 #define	YES		1
c863fc
 #define	NO		0
c863fc
+#define ERR             -1
c863fc
 
c863fc
  /*
c863fc
   * These variables are globally visible so that they can be redirected in
c863fc
@@ -106,7 +107,6 @@ int     hosts_access(request)
c863fc
 struct request_info *request;
c863fc
 {
c863fc
     int     verdict;
c863fc
-
c863fc
     /*
c863fc
      * If the (daemon, client) pair is matched by an entry in the file
c863fc
      * /etc/hosts.allow, access is granted. Otherwise, if the (daemon,
c863fc
@@ -129,9 +129,9 @@ struct request_info *request;
c863fc
 	return (verdict == AC_PERMIT);
c863fc
     if (table_match(hosts_allow_table, request))
c863fc
 	return (YES);
c863fc
-    if (table_match(hosts_deny_table, request))
c863fc
-	return (NO);
c863fc
-    return (YES);
c863fc
+    if (table_match(hosts_deny_table, request) == NO)
c863fc
+	return (YES);
c863fc
+    return (NO);
c863fc
 }
c863fc
 
c863fc
 /* table_match - match table entries with (daemon, client) pair */
c863fc
@@ -175,6 +175,7 @@ struct request_info *request;
c863fc
 	(void) fclose(fp);
c863fc
     } else if (errno != ENOENT) {
c863fc
 	tcpd_warn("cannot open %s: %m", table);
c863fc
+	match = ERR;
c863fc
     }
c863fc
     if (match) {
c863fc
 	if (hosts_access_verbose > 1)