OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../tcp_wrappers/0024-tcp_wrappers-7.6-sig-fix.patch
  5. # Copyright (C) 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. * Fri May 6 2005 Thomas Woerner <twoerner@redhat.com> 7.6-39
  17. - fixed sig patch (#141110). Thanks to Nikita Shulga for the patch
  18. * Mon Feb 10 2003 Harald Hoyer <harald@redhat.de> 7.6-29
  19. - added security patch tcp_wrappers-7.6-sig.patch
  20. diff -ruNp tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
  21. --- tcp_wrappers_7.6.orig/hosts_access.c 2006-03-01 22:14:14.000000000 +0100
  22. +++ tcp_wrappers_7.6/hosts_access.c 2006-03-01 22:14:11.000000000 +0100
  23. @@ -66,6 +66,7 @@ static char sep[] = ", \t\r\n";
  24. #define YES 1
  25. #define NO 0
  26. +#define ERR -1
  27. /*
  28. * These variables are globally visible so that they can be redirected in
  29. @@ -130,11 +131,11 @@ struct request_info *request;
  30. verdict = setjmp(tcpd_buf);
  31. if (verdict != 0)
  32. return (verdict == AC_PERMIT);
  33. - if (table_match(hosts_allow_table, request))
  34. + if (table_match(hosts_allow_table, request) == YES)
  35. return (YES);
  36. - if (table_match(hosts_deny_table, request))
  37. - return (NO);
  38. - return (YES);
  39. + if (table_match(hosts_deny_table, request) == NO)
  40. + return (YES);
  41. + return (NO);
  42. }
  43. /* table_match - match table entries with (daemon, client) pair */
  44. @@ -178,8 +179,9 @@ struct request_info *request;
  45. (void) fclose(fp);
  46. } else if (errno != ENOENT) {
  47. tcpd_warn("cannot open %s: %m", table);
  48. + match = ERR;
  49. }
  50. - if (match) {
  51. + if (match == YES) {
  52. if (hosts_access_verbose > 1)
  53. syslog(LOG_DEBUG, "matched: %s line %d",
  54. tcpd_context.file, tcpd_context.line);