sig_fix 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. * Fri May 6 2005 Thomas Woerner <twoerner@redhat.com> 7.6-39
  2. - fixed sig patch (#141110). Thanks to Nikita Shulga for the patch
  3. * Mon Feb 10 2003 Harald Hoyer <harald@redhat.de> 7.6-29
  4. - added security patch tcp_wrappers-7.6-sig.patch
  5. diff -ruNp tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
  6. --- tcp_wrappers_7.6.orig/hosts_access.c 2006-03-01 22:14:14.000000000 +0100
  7. +++ tcp_wrappers_7.6/hosts_access.c 2006-03-01 22:14:11.000000000 +0100
  8. @@ -66,6 +66,7 @@ static char sep[] = ", \t\r\n";
  9. #define YES 1
  10. #define NO 0
  11. +#define ERR -1
  12. /*
  13. * These variables are globally visible so that they can be redirected in
  14. @@ -130,11 +131,11 @@ struct request_info *request;
  15. verdict = setjmp(tcpd_buf);
  16. if (verdict != 0)
  17. return (verdict == AC_PERMIT);
  18. - if (table_match(hosts_allow_table, request))
  19. + if (table_match(hosts_allow_table, request) == YES)
  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. @@ -178,8 +179,9 @@ struct request_info *request;
  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 (match == YES) {
  37. if (hosts_access_verbose > 1)
  38. syslog(LOG_DEBUG, "matched: %s line %d",
  39. tcpd_context.file, tcpd_context.line);