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.

765 lines
22 KiB

  1. diff -u tcp_wrappers_7.6.orig/clean_exit.c tcp_wrappers_7.6/clean_exit.c
  2. --- tcp_wrappers_7.6.orig/clean_exit.c 1994-12-29 03:42:20.000000000 +1100
  3. +++ tcp_wrappers_7.6/clean_exit.c 2017-11-14 22:50:48.000000000 +1100
  4. @@ -9,10 +9,11 @@
  5. */
  6. #ifndef lint
  7. -static char sccsid[] = "@(#) clean_exit.c 1.4 94/12/28 17:42:19";
  8. +static char sccsid[] __attribute__((__unused__)) = "@(#) clean_exit.c 1.4 94/12/28 17:42:19";
  9. #endif
  10. #include <stdio.h>
  11. +#include <unistd.h>
  12. extern void exit();
  13. diff -u tcp_wrappers_7.6.orig/diag.c tcp_wrappers_7.6/diag.c
  14. --- tcp_wrappers_7.6.orig/diag.c 1994-12-29 03:42:20.000000000 +1100
  15. +++ tcp_wrappers_7.6/diag.c 2017-11-14 22:51:09.000000000 +1100
  16. @@ -10,7 +10,7 @@
  17. */
  18. #ifndef lint
  19. -static char sccsid[] = "@(#) diag.c 1.1 94/12/28 17:42:20";
  20. +static char sccsid[] __attribute__((__unused__)) = "@(#) diag.c 1.1 94/12/28 17:42:20";
  21. #endif
  22. /* System libraries */
  23. diff -u tcp_wrappers_7.6.orig/eval.c tcp_wrappers_7.6/eval.c
  24. --- tcp_wrappers_7.6.orig/eval.c 1995-01-31 05:51:46.000000000 +1100
  25. +++ tcp_wrappers_7.6/eval.c 2017-11-14 22:51:50.000000000 +1100
  26. @@ -19,7 +19,7 @@
  27. */
  28. #ifndef lint
  29. -static char sccsid[] = "@(#) eval.c 1.3 95/01/30 19:51:45";
  30. +static char sccsid[] __attribute__((__unused__)) = "@(#) eval.c 1.3 95/01/30 19:51:45";
  31. #endif
  32. /* System libraries. */
  33. diff -u tcp_wrappers_7.6.orig/fakelog.c tcp_wrappers_7.6/fakelog.c
  34. --- tcp_wrappers_7.6.orig/fakelog.c 1994-12-29 03:42:22.000000000 +1100
  35. +++ tcp_wrappers_7.6/fakelog.c 2017-11-14 22:52:07.000000000 +1100
  36. @@ -6,7 +6,7 @@
  37. */
  38. #ifndef lint
  39. -static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
  40. +static char sccsid[] __attribute__((__unused__)) = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
  41. #endif
  42. #include <stdio.h>
  43. @@ -17,7 +17,7 @@
  44. /* ARGSUSED */
  45. -openlog(name, logopt, facility)
  46. +void openlog(name, logopt, facility)
  47. char *name;
  48. int logopt;
  49. int facility;
  50. @@ -27,7 +27,7 @@
  51. /* vsyslog - format one record */
  52. -vsyslog(severity, fmt, ap)
  53. +void vsyslog(severity, fmt, ap)
  54. int severity;
  55. char *fmt;
  56. va_list ap;
  57. @@ -43,7 +43,7 @@
  58. /* VARARGS */
  59. -VARARGS(syslog, int, severity)
  60. +void VARARGS(syslog, int, severity)
  61. {
  62. va_list ap;
  63. char *fmt;
  64. @@ -56,7 +56,7 @@
  65. /* closelog - dummy */
  66. -closelog()
  67. +void closelog()
  68. {
  69. /* void */
  70. }
  71. diff -u tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c
  72. --- tcp_wrappers_7.6.orig/fix_options.c 2017-11-13 09:29:08.000000000 +1100
  73. +++ tcp_wrappers_7.6/fix_options.c 2017-11-14 22:52:22.000000000 +1100
  74. @@ -6,7 +6,7 @@
  75. */
  76. #ifndef lint
  77. -static char sccsid[] = "@(#) fix_options.c 1.6 97/04/08 02:29:19";
  78. +static char sccsid[] __attribute__((__unused__)) = "@(#) fix_options.c 1.6 97/04/08 02:29:19";
  79. #endif
  80. #include <sys/types.h>
  81. @@ -29,14 +29,14 @@
  82. /* fix_options - get rid of IP-level socket options */
  83. -fix_options(request)
  84. -struct request_info *request;
  85. +void fix_options(request)
  86. +struct request_info *request;
  87. {
  88. #ifdef IP_OPTIONS
  89. unsigned char optbuf[BUFFER_SIZE / 3], *cp;
  90. char lbuf[BUFFER_SIZE], *lp;
  91. #if !defined(__GLIBC__)
  92. - int optsize = sizeof(optbuf), ipproto;
  93. + unsigned int optsize = sizeof(optbuf), ipproto;
  94. #else /* __GLIBC__ */
  95. size_t optsize = sizeof(optbuf);
  96. int ipproto;
  97. diff -u tcp_wrappers_7.6.orig/fromhost.c tcp_wrappers_7.6/fromhost.c
  98. --- tcp_wrappers_7.6.orig/fromhost.c 1994-12-29 03:42:24.000000000 +1100
  99. +++ tcp_wrappers_7.6/fromhost.c 2017-11-14 22:52:33.000000000 +1100
  100. @@ -11,7 +11,7 @@
  101. */
  102. #ifndef lint
  103. -static char sccsid[] = "@(#) fromhost.c 1.17 94/12/28 17:42:23";
  104. +static char sccsid[] __attribute__((__unused__)) = "@(#) fromhost.c 1.17 94/12/28 17:42:23";
  105. #endif
  106. #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
  107. diff -u tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
  108. --- tcp_wrappers_7.6.orig/hosts_access.c 2017-11-13 09:29:25.000000000 +1100
  109. +++ tcp_wrappers_7.6/hosts_access.c 2017-11-14 22:52:48.000000000 +1100
  110. @@ -18,7 +18,7 @@
  111. */
  112. #ifndef lint
  113. -static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
  114. +static char sccsid[] __attribute__((__unused__)) = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
  115. #endif
  116. /* System libraries. */
  117. diff -u tcp_wrappers_7.6.orig/hosts_ctl.c tcp_wrappers_7.6/hosts_ctl.c
  118. --- tcp_wrappers_7.6.orig/hosts_ctl.c 1994-12-29 03:42:28.000000000 +1100
  119. +++ tcp_wrappers_7.6/hosts_ctl.c 2017-11-14 22:53:01.000000000 +1100
  120. @@ -12,7 +12,7 @@
  121. */
  122. #ifndef lint
  123. -static char sccsid[] = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27";
  124. +static char sccsid[] __attribute__((__unused__)) = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27";
  125. #endif
  126. #include <stdio.h>
  127. diff -u tcp_wrappers_7.6.orig/inetcf.c tcp_wrappers_7.6/inetcf.c
  128. --- tcp_wrappers_7.6.orig/inetcf.c 1997-02-12 12:13:24.000000000 +1100
  129. +++ tcp_wrappers_7.6/inetcf.c 2017-11-14 22:53:11.000000000 +1100
  130. @@ -6,7 +6,7 @@
  131. */
  132. #ifndef lint
  133. -static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23";
  134. +static char sccsid[] __attribute__((__unused__)) = "@(#) inetcf.c 1.7 97/02/12 02:13:23";
  135. #endif
  136. #include <sys/types.h>
  137. @@ -14,6 +14,7 @@
  138. #include <stdio.h>
  139. #include <errno.h>
  140. #include <string.h>
  141. +#include <stdlib.h>
  142. extern int errno;
  143. extern void exit();
  144. @@ -21,6 +22,8 @@
  145. #include "tcpd.h"
  146. #include "inetcf.h"
  147. +extern int check_path(char *, struct stat *);
  148. +
  149. /*
  150. * Network configuration files may live in unusual places. Here are some
  151. * guesses. Shorter names follow longer ones.
  152. diff -u tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c
  153. --- tcp_wrappers_7.6.orig/misc.c 2017-11-13 09:29:25.000000000 +1100
  154. +++ tcp_wrappers_7.6/misc.c 2017-11-14 22:53:23.000000000 +1100
  155. @@ -5,7 +5,7 @@
  156. */
  157. #ifndef lint
  158. -static char sccsic[] = "@(#) misc.c 1.2 96/02/11 17:01:29";
  159. +static char sccsid[] __attribute__((__unused__)) = "@(#) misc.c 1.2 96/02/11 17:01:29";
  160. #endif
  161. #include <sys/types.h>
  162. diff -u tcp_wrappers_7.6.orig/myvsyslog.c tcp_wrappers_7.6/myvsyslog.c
  163. --- tcp_wrappers_7.6.orig/myvsyslog.c 1994-12-29 03:42:34.000000000 +1100
  164. +++ tcp_wrappers_7.6/myvsyslog.c 2017-11-14 22:53:35.000000000 +1100
  165. @@ -8,7 +8,7 @@
  166. */
  167. #ifndef lint
  168. -static char sccsid[] = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33";
  169. +static char sccsid[] __attribute__((__unused__)) = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33";
  170. #endif
  171. #ifdef vsyslog
  172. diff -u tcp_wrappers_7.6.orig/options.c tcp_wrappers_7.6/options.c
  173. --- tcp_wrappers_7.6.orig/options.c 2017-11-13 09:29:08.000000000 +1100
  174. +++ tcp_wrappers_7.6/options.c 2017-11-14 22:53:50.000000000 +1100
  175. @@ -29,7 +29,7 @@
  176. */
  177. #ifndef lint
  178. -static char sccsid[] = "@(#) options.c 1.17 96/02/11 17:01:31";
  179. +static char sccsid[] __attribute__((__unused__)) = "@(#) options.c 1.17 96/02/11 17:01:31";
  180. #endif
  181. /* System libraries. */
  182. @@ -47,6 +47,8 @@
  183. #include <ctype.h>
  184. #include <setjmp.h>
  185. #include <string.h>
  186. +#include <stdlib.h>
  187. +#include <unistd.h>
  188. #ifndef MAXPATHNAMELEN
  189. #define MAXPATHNAMELEN BUFSIZ
  190. @@ -108,21 +110,21 @@
  191. /* List of known keywords. Add yours here. */
  192. static struct option option_table[] = {
  193. - "user", user_option, NEED_ARG,
  194. - "group", group_option, NEED_ARG,
  195. - "umask", umask_option, NEED_ARG,
  196. - "linger", linger_option, NEED_ARG,
  197. - "keepalive", keepalive_option, 0,
  198. - "spawn", spawn_option, NEED_ARG | EXPAND_ARG,
  199. - "twist", twist_option, NEED_ARG | EXPAND_ARG | USE_LAST,
  200. - "rfc931", rfc931_option, OPT_ARG,
  201. - "setenv", setenv_option, NEED_ARG | EXPAND_ARG,
  202. - "nice", nice_option, OPT_ARG,
  203. - "severity", severity_option, NEED_ARG,
  204. - "allow", allow_option, USE_LAST,
  205. - "deny", deny_option, USE_LAST,
  206. - "banners", banners_option, NEED_ARG,
  207. - 0,
  208. + { "user", user_option, NEED_ARG },
  209. + { "group", group_option, NEED_ARG },
  210. + { "umask", umask_option, NEED_ARG },
  211. + { "linger", linger_option, NEED_ARG },
  212. + { "keepalive", keepalive_option, 0 },
  213. + { "spawn", spawn_option, NEED_ARG | EXPAND_ARG },
  214. + { "twist", twist_option, NEED_ARG | EXPAND_ARG | USE_LAST },
  215. + { "rfc931", rfc931_option, OPT_ARG },
  216. + { "setenv", setenv_option, NEED_ARG | EXPAND_ARG },
  217. + { "nice", nice_option, OPT_ARG },
  218. + { "severity", severity_option, NEED_ARG },
  219. + { "allow", allow_option, USE_LAST },
  220. + { "deny", deny_option, USE_LAST },
  221. + { "banners", banners_option, NEED_ARG },
  222. + { 0 },
  223. };
  224. /* process_options - process access control options */
  225. @@ -447,88 +449,88 @@
  226. static struct syslog_names log_fac[] = {
  227. #ifdef LOG_KERN
  228. - "kern", LOG_KERN,
  229. + { "kern", LOG_KERN },
  230. #endif
  231. #ifdef LOG_USER
  232. - "user", LOG_USER,
  233. + { "user", LOG_USER },
  234. #endif
  235. #ifdef LOG_MAIL
  236. - "mail", LOG_MAIL,
  237. + { "mail", LOG_MAIL },
  238. #endif
  239. #ifdef LOG_DAEMON
  240. - "daemon", LOG_DAEMON,
  241. + { "daemon", LOG_DAEMON },
  242. #endif
  243. #ifdef LOG_AUTH
  244. - "auth", LOG_AUTH,
  245. + { "auth", LOG_AUTH },
  246. #endif
  247. #ifdef LOG_LPR
  248. - "lpr", LOG_LPR,
  249. + { "lpr", LOG_LPR },
  250. #endif
  251. #ifdef LOG_NEWS
  252. - "news", LOG_NEWS,
  253. + { "news", LOG_NEWS },
  254. #endif
  255. #ifdef LOG_UUCP
  256. - "uucp", LOG_UUCP,
  257. + { "uucp", LOG_UUCP },
  258. #endif
  259. #ifdef LOG_CRON
  260. - "cron", LOG_CRON,
  261. + { "cron", LOG_CRON },
  262. #endif
  263. #ifdef LOG_FTP
  264. - "ftp", LOG_FTP,
  265. + { "ftp", LOG_FTP },
  266. #endif
  267. #ifdef LOG_LOCAL0
  268. - "local0", LOG_LOCAL0,
  269. + { "local0", LOG_LOCAL0 },
  270. #endif
  271. #ifdef LOG_LOCAL1
  272. - "local1", LOG_LOCAL1,
  273. + { "local1", LOG_LOCAL1 },
  274. #endif
  275. #ifdef LOG_LOCAL2
  276. - "local2", LOG_LOCAL2,
  277. + { "local2", LOG_LOCAL2 },
  278. #endif
  279. #ifdef LOG_LOCAL3
  280. - "local3", LOG_LOCAL3,
  281. + { "local3", LOG_LOCAL3 },
  282. #endif
  283. #ifdef LOG_LOCAL4
  284. - "local4", LOG_LOCAL4,
  285. + { "local4", LOG_LOCAL4 },
  286. #endif
  287. #ifdef LOG_LOCAL5
  288. - "local5", LOG_LOCAL5,
  289. + { "local5", LOG_LOCAL5 },
  290. #endif
  291. #ifdef LOG_LOCAL6
  292. - "local6", LOG_LOCAL6,
  293. + { "local6", LOG_LOCAL6 },
  294. #endif
  295. #ifdef LOG_LOCAL7
  296. - "local7", LOG_LOCAL7,
  297. + { "local7", LOG_LOCAL7 },
  298. #endif
  299. - 0,
  300. + { 0 },
  301. };
  302. static struct syslog_names log_sev[] = {
  303. #ifdef LOG_EMERG
  304. - "emerg", LOG_EMERG,
  305. + { "emerg", LOG_EMERG },
  306. #endif
  307. #ifdef LOG_ALERT
  308. - "alert", LOG_ALERT,
  309. + { "alert", LOG_ALERT },
  310. #endif
  311. #ifdef LOG_CRIT
  312. - "crit", LOG_CRIT,
  313. + { "crit", LOG_CRIT },
  314. #endif
  315. #ifdef LOG_ERR
  316. - "err", LOG_ERR,
  317. + { "err", LOG_ERR },
  318. #endif
  319. #ifdef LOG_WARNING
  320. - "warning", LOG_WARNING,
  321. + { "warning", LOG_WARNING },
  322. #endif
  323. #ifdef LOG_NOTICE
  324. - "notice", LOG_NOTICE,
  325. + { "notice", LOG_NOTICE },
  326. #endif
  327. #ifdef LOG_INFO
  328. - "info", LOG_INFO,
  329. + { "info", LOG_INFO },
  330. #endif
  331. #ifdef LOG_DEBUG
  332. - "debug", LOG_DEBUG,
  333. + { "debug", LOG_DEBUG },
  334. #endif
  335. - 0,
  336. + { 0 },
  337. };
  338. /* severity_map - lookup facility or severity value */
  339. @@ -589,7 +591,7 @@
  340. if (src[0] == 0)
  341. return (0);
  342. - while (ch = *src) {
  343. + while ((ch = *src)) {
  344. if (ch == ':') {
  345. if (*++src == 0)
  346. tcpd_warn("rule ends in \":\"");
  347. diff -u tcp_wrappers_7.6.orig/patchlevel.h tcp_wrappers_7.6/patchlevel.h
  348. --- tcp_wrappers_7.6.orig/patchlevel.h 1997-03-22 05:27:24.000000000 +1100
  349. +++ tcp_wrappers_7.6/patchlevel.h 2017-11-14 22:54:15.000000000 +1100
  350. @@ -1,3 +1,3 @@
  351. #ifndef lint
  352. -static char patchlevel[] = "@(#) patchlevel 7.6 97/03/21 19:27:23";
  353. +static char patchlevel[] __attribute__((__unused__)) = "@(#) patchlevel 7.6 97/03/21 19:27:23";
  354. #endif
  355. diff -u tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c
  356. --- tcp_wrappers_7.6.orig/percent_m.c 2017-11-13 09:29:08.000000000 +1100
  357. +++ tcp_wrappers_7.6/percent_m.c 2017-11-14 22:54:31.000000000 +1100
  358. @@ -5,7 +5,7 @@
  359. */
  360. #ifndef lint
  361. -static char sccsid[] = "@(#) percent_m.c 1.1 94/12/28 17:42:37";
  362. +static char sccsid[] __attribute__((__unused__)) = "@(#) percent_m.c 1.1 94/12/28 17:42:37";
  363. #endif
  364. #include <stdio.h>
  365. @@ -27,7 +27,7 @@
  366. char *bp = obuf;
  367. char *cp = ibuf;
  368. - while (*bp = *cp)
  369. + while ((*bp = *cp))
  370. if (*cp == '%' && cp[1] == 'm') {
  371. #ifdef HAVE_STRERROR
  372. strcpy(bp, strerror(errno));
  373. diff -u tcp_wrappers_7.6.orig/percent_x.c tcp_wrappers_7.6/percent_x.c
  374. --- tcp_wrappers_7.6.orig/percent_x.c 1994-12-29 03:42:38.000000000 +1100
  375. +++ tcp_wrappers_7.6/percent_x.c 2017-11-14 22:54:40.000000000 +1100
  376. @@ -11,7 +11,7 @@
  377. */
  378. #ifndef lint
  379. -static char sccsid[] = "@(#) percent_x.c 1.4 94/12/28 17:42:37";
  380. +static char sccsid[] __attribute__((__unused__)) = "@(#) percent_x.c 1.4 94/12/28 17:42:37";
  381. #endif
  382. /* System libraries. */
  383. @@ -19,6 +19,7 @@
  384. #include <stdio.h>
  385. #include <syslog.h>
  386. #include <string.h>
  387. +#include <unistd.h>
  388. extern void exit();
  389. diff -u tcp_wrappers_7.6.orig/refuse.c tcp_wrappers_7.6/refuse.c
  390. --- tcp_wrappers_7.6.orig/refuse.c 1994-12-29 03:42:40.000000000 +1100
  391. +++ tcp_wrappers_7.6/refuse.c 2017-11-14 22:54:50.000000000 +1100
  392. @@ -8,7 +8,7 @@
  393. */
  394. #ifndef lint
  395. -static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39";
  396. +static char sccsid[] __attribute__((__unused__)) = "@(#) refuse.c 1.5 94/12/28 17:42:39";
  397. #endif
  398. /* System libraries. */
  399. diff -u tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
  400. --- tcp_wrappers_7.6.orig/rfc931.c 2017-11-13 09:29:08.000000000 +1100
  401. +++ tcp_wrappers_7.6/rfc931.c 2017-11-14 22:54:58.000000000 +1100
  402. @@ -10,7 +10,7 @@
  403. */
  404. #ifndef lint
  405. -static char sccsid[] = "@(#) rfc931.c 1.10 95/01/02 16:11:34";
  406. +static char sccsid[] __attribute__((__unused__)) = "@(#) rfc931.c 1.10 95/01/02 16:11:34";
  407. #endif
  408. /* System libraries. */
  409. @@ -23,6 +23,7 @@
  410. #include <setjmp.h>
  411. #include <signal.h>
  412. #include <string.h>
  413. +#include <unistd.h>
  414. /* Local stuff. */
  415. @@ -152,7 +153,7 @@
  416. * protocol, not part of the data.
  417. */
  418. - if (cp = strchr(user, '\r'))
  419. + if ((cp = strchr(user, '\r')))
  420. *cp = 0;
  421. result = user;
  422. }
  423. diff -u tcp_wrappers_7.6.orig/safe_finger.c tcp_wrappers_7.6/safe_finger.c
  424. --- tcp_wrappers_7.6.orig/safe_finger.c 2017-11-13 09:29:08.000000000 +1100
  425. +++ tcp_wrappers_7.6/safe_finger.c 2017-11-14 22:55:08.000000000 +1100
  426. @@ -15,7 +15,7 @@
  427. */
  428. #ifndef lint
  429. -static char sccsid[] = "@(#) safe_finger.c 1.4 94/12/28 17:42:41";
  430. +static char sccsid[] __attribute__((__unused__)) = "@(#) safe_finger.c 1.4 94/12/28 17:42:41";
  431. #endif
  432. /* System libraries */
  433. @@ -27,6 +27,10 @@
  434. #include <ctype.h>
  435. #include <pwd.h>
  436. #include <syslog.h>
  437. +#include <fcntl.h>
  438. +#include <stdlib.h>
  439. +#include <sys/wait.h>
  440. +#include <unistd.h>
  441. extern void exit();
  442. @@ -45,6 +49,8 @@
  443. int allow_severity = SEVERITY;
  444. int deny_severity = LOG_WARNING;
  445. +int pipe_stdin();
  446. +
  447. void cleanup(sig)
  448. int sig;
  449. {
  450. @@ -52,7 +58,7 @@
  451. exit(0);
  452. }
  453. -main(argc, argv)
  454. +int main(argc, argv)
  455. int argc;
  456. char **argv;
  457. {
  458. diff -u tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
  459. --- tcp_wrappers_7.6.orig/scaffold.c 2017-11-13 09:29:21.000000000 +1100
  460. +++ tcp_wrappers_7.6/scaffold.c 2017-11-14 22:55:32.000000000 +1100
  461. @@ -5,7 +5,7 @@
  462. */
  463. #ifndef lint
  464. -static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 19:27:24";
  465. +static char sccsid[] __attribute__((__unused__)) = "@(#) scaffold.c 1.6 97/03/21 19:27:24";
  466. #endif
  467. /* System libraries. */
  468. diff -u tcp_wrappers_7.6.orig/shell_cmd.c tcp_wrappers_7.6/shell_cmd.c
  469. --- tcp_wrappers_7.6.orig/shell_cmd.c 1994-12-29 03:42:44.000000000 +1100
  470. +++ tcp_wrappers_7.6/shell_cmd.c 2017-11-14 22:55:45.000000000 +1100
  471. @@ -9,7 +9,7 @@
  472. */
  473. #ifndef lint
  474. -static char sccsid[] = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44";
  475. +static char sccsid[] __attribute__((__unused__)) = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44";
  476. #endif
  477. /* System libraries. */
  478. @@ -20,6 +20,9 @@
  479. #include <stdio.h>
  480. #include <syslog.h>
  481. #include <string.h>
  482. +#include <fcntl.h>
  483. +#include <sys/wait.h>
  484. +#include <unistd.h>
  485. extern void exit();
  486. diff -u tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c
  487. --- tcp_wrappers_7.6.orig/socket.c 2017-11-13 09:29:08.000000000 +1100
  488. +++ tcp_wrappers_7.6/socket.c 2017-11-14 22:55:57.000000000 +1100
  489. @@ -16,7 +16,7 @@
  490. */
  491. #ifndef lint
  492. -static char sccsid[] = "@(#) socket.c 1.15 97/03/21 19:27:24";
  493. +static char sccsid[] __attribute__((__unused__)) = "@(#) socket.c 1.15 97/03/21 19:27:24";
  494. #endif
  495. /* System libraries. */
  496. @@ -77,7 +77,7 @@
  497. static struct sockaddr_in client;
  498. static struct sockaddr_in server;
  499. #if !defined (__GLIBC__)
  500. - int len;
  501. + unsigned int len;
  502. #else /* __GLIBC__ */
  503. size_t len;
  504. #endif /* __GLIBC__ */
  505. @@ -229,7 +229,7 @@
  506. char buf[BUFSIZ];
  507. struct sockaddr_in sin;
  508. #if !defined(__GLIBC__)
  509. - int size = sizeof(sin);
  510. + unsigned int size = sizeof(sin);
  511. #else /* __GLIBC__ */
  512. size_t size = sizeof(sin);
  513. #endif /* __GLIBC__ */
  514. diff -u tcp_wrappers_7.6.orig/tcpd.c tcp_wrappers_7.6/tcpd.c
  515. --- tcp_wrappers_7.6.orig/tcpd.c 1996-02-12 03:01:33.000000000 +1100
  516. +++ tcp_wrappers_7.6/tcpd.c 2017-11-14 22:56:09.000000000 +1100
  517. @@ -11,7 +11,7 @@
  518. */
  519. #ifndef lint
  520. -static char sccsid[] = "@(#) tcpd.c 1.10 96/02/11 17:01:32";
  521. +static char sccsid[] __attribute__((__unused__)) = "@(#) tcpd.c 1.10 96/02/11 17:01:32";
  522. #endif
  523. /* System libraries. */
  524. @@ -24,6 +24,7 @@
  525. #include <stdio.h>
  526. #include <syslog.h>
  527. #include <string.h>
  528. +#include <unistd.h>
  529. #ifndef MAXPATHNAMELEN
  530. #define MAXPATHNAMELEN BUFSIZ
  531. @@ -38,10 +39,12 @@
  532. #include "patchlevel.h"
  533. #include "tcpd.h"
  534. +extern void fix_options(struct request_info *);
  535. +
  536. int allow_severity = SEVERITY; /* run-time adjustable */
  537. int deny_severity = LOG_WARNING; /* ditto */
  538. -main(argc, argv)
  539. +int main(argc, argv)
  540. int argc;
  541. char **argv;
  542. {
  543. diff -u tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
  544. --- tcp_wrappers_7.6.orig/tcpd.h 2017-11-13 09:29:25.000000000 +1100
  545. +++ tcp_wrappers_7.6/tcpd.h 2017-11-14 22:36:40.000000000 +1100
  546. @@ -182,10 +182,10 @@
  547. #ifdef __STDC__
  548. extern void tcpd_warn(char *, ...); /* report problem and proceed */
  549. -extern void tcpd_jump(char *, ...); /* report problem and jump */
  550. +extern void tcpd_jump(char *, ...) __attribute__((__noreturn__)); /* report problem and jump */
  551. #else
  552. extern void tcpd_warn();
  553. -extern void tcpd_jump();
  554. +extern void tcpd_jump() __attribute__((__noreturn__));
  555. #endif
  556. struct tcpd_context {
  557. diff -u tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
  558. --- tcp_wrappers_7.6.orig/tcpdchk.c 2017-11-13 09:29:08.000000000 +1100
  559. +++ tcp_wrappers_7.6/tcpdchk.c 2017-11-14 22:56:21.000000000 +1100
  560. @@ -15,7 +15,7 @@
  561. */
  562. #ifndef lint
  563. -static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
  564. +static char sccsid[] __attribute__((__unused__)) = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
  565. #endif
  566. /* System libraries. */
  567. @@ -30,6 +30,7 @@
  568. #include <errno.h>
  569. #include <netdb.h>
  570. #include <string.h>
  571. +#include <unistd.h>
  572. extern int errno;
  573. extern void exit();
  574. @@ -199,13 +200,15 @@
  575. char sv_list[BUFLEN]; /* becomes list of daemons */
  576. char *cl_list; /* becomes list of requests */
  577. char *sh_cmd; /* becomes optional shell command */
  578. +#ifndef PROCESS_OPTIONS
  579. char buf[BUFSIZ];
  580. +#endif
  581. int verdict;
  582. struct tcpd_context saved_context;
  583. saved_context = tcpd_context; /* stupid compilers */
  584. - if (fp = fopen(table, "r")) {
  585. + if ((fp = fopen(table, "r"))) {
  586. tcpd_context.file = table;
  587. tcpd_context.line = 0;
  588. while (xgets(sv_list, sizeof(sv_list), fp)) {
  589. @@ -331,7 +334,7 @@
  590. clients = 0;
  591. } else {
  592. clients++;
  593. - if (host = split_at(cp + 1, '@')) { /* user@host */
  594. + if ((host = split_at(cp + 1, '@'))) { /* user@host */
  595. check_user(cp);
  596. check_host(host);
  597. } else {
  598. @@ -446,7 +449,7 @@
  599. } else if (errno != ENOENT) {
  600. tcpd_warn("open %s: %m", pat);
  601. }
  602. - } else if (mask = split_at(pat, '/')) { /* network/netmask */
  603. + } else if ((mask = split_at(pat, '/'))) { /* network/netmask */
  604. if (dot_quad_addr(pat) == INADDR_NONE
  605. || dot_quad_addr(mask) == INADDR_NONE)
  606. tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
  607. diff -u tcp_wrappers_7.6.orig/tcpdmatch.c tcp_wrappers_7.6/tcpdmatch.c
  608. --- tcp_wrappers_7.6.orig/tcpdmatch.c 1996-02-12 03:01:36.000000000 +1100
  609. +++ tcp_wrappers_7.6/tcpdmatch.c 2017-11-14 22:56:40.000000000 +1100
  610. @@ -14,7 +14,7 @@
  611. */
  612. #ifndef lint
  613. -static char sccsid[] = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36";
  614. +static char sccsid[] __attribute__((__unused__)) = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36";
  615. #endif
  616. /* System libraries. */
  617. @@ -29,6 +29,8 @@
  618. #include <syslog.h>
  619. #include <setjmp.h>
  620. #include <string.h>
  621. +#include <stdlib.h>
  622. +#include <unistd.h>
  623. extern void exit();
  624. extern int optind;
  625. diff -u tcp_wrappers_7.6.orig/tli.c tcp_wrappers_7.6/tli.c
  626. --- tcp_wrappers_7.6.orig/tli.c 1997-03-22 05:27:26.000000000 +1100
  627. +++ tcp_wrappers_7.6/tli.c 2017-11-14 22:56:50.000000000 +1100
  628. @@ -15,7 +15,7 @@
  629. */
  630. #ifndef lint
  631. -static char sccsid[] = "@(#) tli.c 1.15 97/03/21 19:27:25";
  632. +static char sccsid[] __attribute__((__unused__)) = "@(#) tli.c 1.15 97/03/21 19:27:25";
  633. #endif
  634. #ifdef TLI
  635. diff -u tcp_wrappers_7.6.orig/try-from.c tcp_wrappers_7.6/try-from.c
  636. --- tcp_wrappers_7.6.orig/try-from.c 1994-12-29 03:42:55.000000000 +1100
  637. +++ tcp_wrappers_7.6/try-from.c 2017-11-14 22:56:59.000000000 +1100
  638. @@ -11,7 +11,7 @@
  639. */
  640. #ifndef lint
  641. -static char sccsid[] = "@(#) try-from.c 1.2 94/12/28 17:42:55";
  642. +static char sccsid[] __attribute__((__unused__)) = "@(#) try-from.c 1.2 94/12/28 17:42:55";
  643. #endif
  644. /* System libraries. */
  645. @@ -37,7 +37,7 @@
  646. int allow_severity = SEVERITY; /* run-time adjustable */
  647. int deny_severity = LOG_WARNING; /* ditto */
  648. -main(argc, argv)
  649. +int main(argc, argv)
  650. int argc;
  651. char **argv;
  652. {
  653. diff -u tcp_wrappers_7.6.orig/update.c tcp_wrappers_7.6/update.c
  654. --- tcp_wrappers_7.6.orig/update.c 1994-12-29 03:42:56.000000000 +1100
  655. +++ tcp_wrappers_7.6/update.c 2017-11-14 22:57:09.000000000 +1100
  656. @@ -14,7 +14,7 @@
  657. */
  658. #ifndef lint
  659. -static char sccsid[] = "@(#) update.c 1.1 94/12/28 17:42:56";
  660. +static char sccsid[] __attribute__((__unused__)) = "@(#) update.c 1.1 94/12/28 17:42:56";
  661. #endif
  662. /* System libraries */
  663. @@ -22,6 +22,7 @@
  664. #include <stdio.h>
  665. #include <syslog.h>
  666. #include <string.h>
  667. +#include <unistd.h>
  668. /* Local stuff. */