tcpdchk_libwrapped 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
  2. --- tcp_wrappers_7.6.orig/tcpdchk.c 2003-08-21 02:50:37.000000000 +0200
  3. +++ tcp_wrappers_7.6/tcpdchk.c 2003-08-21 02:50:33.000000000 +0200
  4. @@ -53,6 +53,24 @@
  5. #include "inetcf.h"
  6. #include "scaffold.h"
  7. +/* list of programs which are known to be linked with libwrap in debian */
  8. +static const char *const libwrap_programs[] = {
  9. + "portmap", "mountd", "statd", "ugidd",
  10. + "redir", "rlinetd",
  11. + "sshd",
  12. + "atftpd",
  13. + "diald",
  14. + "esound",
  15. + "gdm", "gnome-session",
  16. + "icecast", "icecast_admin", "icecast_client", "icecast_source",
  17. + "mysqld",
  18. + "ntop",
  19. + "pptpd",
  20. + "rquotad",
  21. + "sendmail", "smail",
  22. + NULL
  23. +};
  24. +
  25. /*
  26. * Stolen from hosts_access.c...
  27. */
  28. @@ -147,8 +165,8 @@
  29. /*
  30. * These are not run from inetd but may have built-in access control.
  31. */
  32. - inet_set("portmap", WR_NOT);
  33. - inet_set("rpcbind", WR_NOT);
  34. + for (c = 0; libwrap_programs[c]; c++)
  35. + inet_set(libwrap_programs[c], WR_YES);
  36. /*
  37. * Check accessibility of access control files.