rfc931.diff 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. diff -ruNp tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
  2. --- tcp_wrappers_7.6.orig/scaffold.c 2005-03-09 18:22:04.000000000 +0100
  3. +++ tcp_wrappers_7.6/scaffold.c 2005-03-09 18:20:47.000000000 +0100
  4. @@ -237,10 +237,17 @@ struct request_info *request;
  5. /* ARGSUSED */
  6. -void rfc931(request)
  7. -struct request_info *request;
  8. +void rfc931(rmt_sin, our_sin, dest)
  9. +#ifdef INET6
  10. +struct sockaddr *rmt_sin;
  11. +struct sockaddr *our_sin;
  12. +#else
  13. +struct sockaddr_in *rmt_sin;
  14. +struct sockaddr_in *our_sin;
  15. +#endif
  16. +char *dest;
  17. {
  18. - strcpy(request->user, unknown);
  19. + strcpy(dest, unknown);
  20. }
  21. /* check_path - examine accessibility */
  22. diff -ruNp tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
  23. --- tcp_wrappers_7.6.orig/tcpd.h 2005-03-09 18:22:04.000000000 +0100
  24. +++ tcp_wrappers_7.6/tcpd.h 2005-03-09 18:21:23.000000000 +0100
  25. @@ -83,7 +83,11 @@ extern int hosts_access(struct request_i
  26. extern void shell_cmd(char *); /* execute shell command */
  27. extern char *percent_x(char *, int, char *, struct request_info *);
  28. /* do %<char> expansion */
  29. +#ifdef INET6
  30. extern void rfc931(struct sockaddr *, struct sockaddr *, char *);
  31. +#else
  32. +extern void rfc931(struct sockaddr_in *, struct sockaddr_in *, char *);
  33. +#endif
  34. /* client name from RFC 931 daemon */
  35. extern void clean_exit(struct request_info *); /* clean up and exit */
  36. extern void refuse(struct request_info *); /* clean up and exit */