safe_finger 933 B

123456789101112131415161718192021222324252627282930
  1. --- tcp-wrappers-7.6-ipv6.1.orig/safe_finger.c
  2. +++ tcp-wrappers-7.6-ipv6.1/safe_finger.c
  3. @@ -26,21 +26,24 @@
  4. #include <stdio.h>
  5. #include <ctype.h>
  6. #include <pwd.h>
  7. +#include <syslog.h>
  8. extern void exit();
  9. /* Local stuff */
  10. -char path[] = "PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc:/usr/sbin";
  11. +char path[] = "PATH=/bin:/usr/bin:/sbin:/usr/sbin";
  12. #define TIME_LIMIT 60 /* Do not keep listinging forever */
  13. #define INPUT_LENGTH 100000 /* Do not keep listinging forever */
  14. #define LINE_LENGTH 128 /* Editors can choke on long lines */
  15. #define FINGER_PROGRAM "finger" /* Most, if not all, UNIX systems */
  16. #define UNPRIV_NAME "nobody" /* Preferred privilege level */
  17. -#define UNPRIV_UGID 32767 /* Default uid and gid */
  18. +#define UNPRIV_UGID 65534 /* Default uid and gid */
  19. int finger_pid;
  20. +int allow_severity = SEVERITY;
  21. +int deny_severity = LOG_WARNING;
  22. void cleanup(sig)
  23. int sig;