07_all_sig.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --- tcp_wrappers_7.6/hosts_access.c.sig 2003-02-10 16:18:31.000000000 +0100
  2. +++ tcp_wrappers_7.6/hosts_access.c 2003-02-10 16:50:38.000000000 +0100
  3. @@ -66,6 +66,7 @@
  4. #define YES 1
  5. #define NO 0
  6. +#define ERR -1
  7. /*
  8. * These variables are globally visible so that they can be redirected in
  9. @@ -106,7 +107,6 @@
  10. struct request_info *request;
  11. {
  12. int verdict;
  13. -
  14. /*
  15. * If the (daemon, client) pair is matched by an entry in the file
  16. * /etc/hosts.allow, access is granted. Otherwise, if the (daemon,
  17. @@ -129,9 +129,9 @@
  18. return (verdict == AC_PERMIT);
  19. if (table_match(hosts_allow_table, request))
  20. return (YES);
  21. - if (table_match(hosts_deny_table, request))
  22. - return (NO);
  23. - return (YES);
  24. + if (table_match(hosts_deny_table, request) == NO)
  25. + return (YES);
  26. + return (NO);
  27. }
  28. /* table_match - match table entries with (daemon, client) pair */
  29. @@ -175,6 +175,7 @@
  30. (void) fclose(fp);
  31. } else if (errno != ENOENT) {
  32. tcpd_warn("cannot open %s: %m", table);
  33. + match = ERR;
  34. }
  35. if (match) {
  36. if (hosts_access_verbose > 1)