cleanup some warnings (#977995)
This commit is contained in:
parent
36112122b4
commit
aeed0588f2
|
@ -1,28 +1,27 @@
|
|||
diff -up tcp_wrappers_7.6-ipv6.4/hosts_access.c.altformat tcp_wrappers_7.6-ipv6.4/hosts_access.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/hosts_access.c.altformat 2013-07-09 10:27:20.796653076 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/hosts_access.c 2013-07-09 14:11:52.014295459 +0200
|
||||
@@ -331,11 +331,16 @@ struct host_info *host;
|
||||
if ((cbr = strchr(tok, ']')))
|
||||
--- tcp_wrappers_7.6-ipv6.4/hosts_access.c.altformat 2013-08-15 18:46:30.398827866 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/hosts_access.c 2013-08-15 18:50:03.099748732 +0200
|
||||
@@ -326,11 +326,15 @@ struct host_info *host;
|
||||
if (cbr = strchr(tok, ']'))
|
||||
*cbr = '\0';
|
||||
|
||||
+ if (cbr == NULL) {
|
||||
+ tcpd_warn("bad IP6 address specification");
|
||||
+ return (NO);
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* A /nnn prefix specifies how many bits of the address we
|
||||
* need to check.
|
||||
*/
|
||||
- if ((slash = strchr(tok, '/'))) {
|
||||
- if (slash = strchr(tok, '/')) {
|
||||
+ if ((slash = strchr(tok, '/')) || (slash = strchr(cbr+1, '/'))) {
|
||||
*slash = '\0';
|
||||
mask = atoi(slash+1);
|
||||
if (mask < 0 || mask > IPV6_ABITS) {
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/tcpdchk.c.altformat tcp_wrappers_7.6-ipv6.4/tcpdchk.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/tcpdchk.c.altformat 2013-07-09 10:27:20.793653089 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/tcpdchk.c 2013-07-09 10:27:20.798653068 +0200
|
||||
@@ -434,6 +434,9 @@ char *pat;
|
||||
--- tcp_wrappers_7.6-ipv6.4/tcpdchk.c.altformat 1999-10-28 08:38:06.000000000 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/tcpdchk.c 2013-08-15 18:46:30.399827870 +0200
|
||||
@@ -430,6 +430,9 @@ char *pat;
|
||||
int err = 0;
|
||||
int mask = IPV6_ABITS;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
diff -up tcp_wrappers_7.6/clean_exit.c.warnings tcp_wrappers_7.6/clean_exit.c
|
||||
--- tcp_wrappers_7.6/clean_exit.c.warnings 1994-12-28 17:42:20.000000000 +0100
|
||||
+++ tcp_wrappers_7.6/clean_exit.c 2011-08-16 10:29:50.939543675 +0200
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/clean_exit.c.warnings tcp_wrappers_7.6-ipv6.4/clean_exit.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/clean_exit.c.warnings 1994-12-28 17:42:20.000000000 +0100
|
||||
+++ tcp_wrappers_7.6-ipv6.4/clean_exit.c 2013-08-15 18:51:57.533244197 +0200
|
||||
@@ -13,6 +13,7 @@ static char sccsid[] = "@(#) clean_exit.
|
||||
#endif
|
||||
|
||||
|
@ -9,9 +9,9 @@ diff -up tcp_wrappers_7.6/clean_exit.c.warnings tcp_wrappers_7.6/clean_exit.c
|
|||
|
||||
extern void exit();
|
||||
|
||||
diff -up tcp_wrappers_7.6/fakelog.c.warnings tcp_wrappers_7.6/fakelog.c
|
||||
--- tcp_wrappers_7.6/fakelog.c.warnings 1994-12-28 17:42:22.000000000 +0100
|
||||
+++ tcp_wrappers_7.6/fakelog.c 2011-08-16 10:29:51.035482124 +0200
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/fakelog.c.warnings tcp_wrappers_7.6-ipv6.4/fakelog.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/fakelog.c.warnings 1994-12-28 17:42:22.000000000 +0100
|
||||
+++ tcp_wrappers_7.6-ipv6.4/fakelog.c 2013-08-15 18:51:57.533244197 +0200
|
||||
@@ -17,6 +17,7 @@ static char sccsid[] = "@(#) fakelog.c 1
|
||||
|
||||
/* ARGSUSED */
|
||||
|
@ -44,9 +44,9 @@ diff -up tcp_wrappers_7.6/fakelog.c.warnings tcp_wrappers_7.6/fakelog.c
|
|||
closelog()
|
||||
{
|
||||
/* void */
|
||||
diff -up tcp_wrappers_7.6/fix_options.c.warnings tcp_wrappers_7.6/fix_options.c
|
||||
--- tcp_wrappers_7.6/fix_options.c.warnings 2011-08-16 10:29:44.033435020 +0200
|
||||
+++ tcp_wrappers_7.6/fix_options.c 2011-08-16 10:29:51.516543916 +0200
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/fix_options.c.warnings tcp_wrappers_7.6-ipv6.4/fix_options.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/fix_options.c.warnings 2013-08-15 18:51:57.446243821 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/fix_options.c 2013-08-15 18:51:57.534244202 +0200
|
||||
@@ -32,13 +32,15 @@ static char sccsid[] = "@(#) fix_options
|
||||
|
||||
/* fix_options - get rid of IP-level socket options */
|
||||
|
@ -73,9 +73,9 @@ diff -up tcp_wrappers_7.6/fix_options.c.warnings tcp_wrappers_7.6/fix_options.c
|
|||
|
||||
/*
|
||||
* check if this is AF_INET socket
|
||||
diff -up tcp_wrappers_7.6/hosts_access.c.warnings tcp_wrappers_7.6/hosts_access.c
|
||||
--- tcp_wrappers_7.6/hosts_access.c.warnings 2011-08-16 10:29:50.233418824 +0200
|
||||
+++ tcp_wrappers_7.6/hosts_access.c 2011-08-16 10:29:51.653475947 +0200
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/hosts_access.c.warnings tcp_wrappers_7.6-ipv6.4/hosts_access.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/hosts_access.c.warnings 2013-08-15 18:51:57.529244180 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/hosts_access.c 2013-08-15 18:51:57.535244206 +0200
|
||||
@@ -33,6 +33,9 @@ static char sccsid[] = "@(#) hosts_acces
|
||||
#include <errno.h>
|
||||
#include <setjmp.h>
|
||||
|
@ -86,7 +86,7 @@ diff -up tcp_wrappers_7.6/hosts_access.c.warnings tcp_wrappers_7.6/hosts_access.
|
|||
|
||||
extern char *fgets();
|
||||
extern int errno;
|
||||
@@ -58,6 +60,8 @@ extern int errno;
|
||||
@@ -49,6 +52,8 @@ extern int errno;
|
||||
|
||||
extern jmp_buf tcpd_buf;
|
||||
|
||||
|
@ -95,26 +95,9 @@ diff -up tcp_wrappers_7.6/hosts_access.c.warnings tcp_wrappers_7.6/hosts_access.
|
|||
/* Delimiters for lists of daemons or clients. */
|
||||
|
||||
static char sep[] = ", \t\r\n";
|
||||
@@ -323,14 +328,14 @@ struct host_info *host;
|
||||
hip = &host->sin->sg_sin6.sin6_addr;
|
||||
}
|
||||
|
||||
- if (cbr = strchr(tok, ']'))
|
||||
+ if ((cbr = strchr(tok, ']')))
|
||||
*cbr = '\0';
|
||||
|
||||
/*
|
||||
* A /nnn prefix specifies how many bits of the address we
|
||||
* need to check.
|
||||
*/
|
||||
- if (slash = strchr(tok, '/')) {
|
||||
+ if ((slash = strchr(tok, '/'))) {
|
||||
*slash = '\0';
|
||||
mask = atoi(slash+1);
|
||||
if (mask < 0 || mask > IPV6_ABITS) {
|
||||
diff -up tcp_wrappers_7.6/inetcf.c.warnings tcp_wrappers_7.6/inetcf.c
|
||||
--- tcp_wrappers_7.6/inetcf.c.warnings 2011-08-16 10:29:48.117418621 +0200
|
||||
+++ tcp_wrappers_7.6/inetcf.c 2011-08-16 10:29:51.752605633 +0200
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/inetcf.c.warnings tcp_wrappers_7.6-ipv6.4/inetcf.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/inetcf.c.warnings 2013-08-15 18:51:57.474243942 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/inetcf.c 2013-08-15 18:51:57.535244206 +0200
|
||||
@@ -42,6 +42,8 @@ char *inet_files[] = {
|
||||
static void inet_chk();
|
||||
static char *base_name();
|
||||
|
@ -124,9 +107,9 @@ diff -up tcp_wrappers_7.6/inetcf.c.warnings tcp_wrappers_7.6/inetcf.c
|
|||
/*
|
||||
* Structure with everything we know about a service.
|
||||
*/
|
||||
diff -up tcp_wrappers_7.6/options.c.warnings tcp_wrappers_7.6/options.c
|
||||
--- tcp_wrappers_7.6/options.c.warnings 2011-08-16 10:29:50.655606523 +0200
|
||||
+++ tcp_wrappers_7.6/options.c 2011-08-16 10:29:51.884484798 +0200
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/options.c.warnings tcp_wrappers_7.6-ipv6.4/options.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/options.c.warnings 2013-08-15 18:51:57.520244141 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/options.c 2013-08-15 18:51:57.536244211 +0200
|
||||
@@ -41,12 +41,14 @@ static char sccsid[] = "@(#) options.c 1
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
|
@ -184,14 +167,14 @@ diff -up tcp_wrappers_7.6/options.c.warnings tcp_wrappers_7.6/options.c
|
|||
if ((fp = fopen(path, "r")) != 0) {
|
||||
while ((ch = fgetc(fp)) == 0)
|
||||
- write(request->fd, "", 1);
|
||||
+ (void)write(request->fd, "", 1);
|
||||
+ if (write(request->fd, "", 1));
|
||||
ungetc(ch, fp);
|
||||
while (fgets(ibuf, sizeof(ibuf) - 1, fp)) {
|
||||
if (split_at(ibuf, '\n'))
|
||||
strcat(ibuf, "\r\n");
|
||||
percent_x(obuf, sizeof(obuf), ibuf, request);
|
||||
- write(request->fd, obuf, strlen(obuf));
|
||||
+ (void)write(request->fd, obuf, strlen(obuf));
|
||||
+ if(write(request->fd, obuf, strlen(obuf)));
|
||||
}
|
||||
fclose(fp);
|
||||
} else if (stat(value, &st) < 0) {
|
||||
|
@ -317,10 +300,10 @@ diff -up tcp_wrappers_7.6/options.c.warnings tcp_wrappers_7.6/options.c
|
|||
if (ch == ':') {
|
||||
if (*++src == 0)
|
||||
tcpd_warn("rule ends in \":\"");
|
||||
diff -up tcp_wrappers_7.6/percent_m.c.warnings tcp_wrappers_7.6/percent_m.c
|
||||
--- tcp_wrappers_7.6/percent_m.c.warnings 2011-08-16 10:29:47.751442576 +0200
|
||||
+++ tcp_wrappers_7.6/percent_m.c 2011-08-16 10:29:52.002543916 +0200
|
||||
@@ -27,7 +27,7 @@ char *ibuf;
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/percent_m.c.warnings tcp_wrappers_7.6-ipv6.4/percent_m.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/percent_m.c.warnings 2003-04-16 16:12:24.000000000 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/percent_m.c 2013-08-15 18:51:57.536244211 +0200
|
||||
@@ -29,7 +29,7 @@ char *ibuf;
|
||||
char *bp = obuf;
|
||||
char *cp = ibuf;
|
||||
|
||||
|
@ -329,9 +312,9 @@ diff -up tcp_wrappers_7.6/percent_m.c.warnings tcp_wrappers_7.6/percent_m.c
|
|||
if (*cp == '%' && cp[1] == 'm') {
|
||||
#ifdef USE_STRERROR
|
||||
strcpy(bp, strerror(errno));
|
||||
diff -up tcp_wrappers_7.6/percent_x.c.warnings tcp_wrappers_7.6/percent_x.c
|
||||
--- tcp_wrappers_7.6/percent_x.c.warnings 1994-12-28 17:42:38.000000000 +0100
|
||||
+++ tcp_wrappers_7.6/percent_x.c 2011-08-16 10:29:52.116485510 +0200
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/percent_x.c.warnings tcp_wrappers_7.6-ipv6.4/percent_x.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/percent_x.c.warnings 1994-12-28 17:42:38.000000000 +0100
|
||||
+++ tcp_wrappers_7.6-ipv6.4/percent_x.c 2013-08-15 18:51:57.537244215 +0200
|
||||
@@ -19,6 +19,7 @@ static char sccsid[] = "@(#) percent_x.c
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
|
@ -340,9 +323,9 @@ diff -up tcp_wrappers_7.6/percent_x.c.warnings tcp_wrappers_7.6/percent_x.c
|
|||
|
||||
extern void exit();
|
||||
|
||||
diff -up tcp_wrappers_7.6/rfc931.c.warnings tcp_wrappers_7.6/rfc931.c
|
||||
--- tcp_wrappers_7.6/rfc931.c.warnings 2011-08-16 10:29:48.741484651 +0200
|
||||
+++ tcp_wrappers_7.6/rfc931.c 2011-08-16 10:29:52.222484375 +0200
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/rfc931.c.warnings tcp_wrappers_7.6-ipv6.4/rfc931.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/rfc931.c.warnings 2013-08-15 18:51:57.484243985 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/rfc931.c 2013-08-15 18:51:57.537244215 +0200
|
||||
@@ -23,6 +23,7 @@ static char sccsid[] = "@(#) rfc931.c 1.
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
|
@ -351,7 +334,7 @@ diff -up tcp_wrappers_7.6/rfc931.c.warnings tcp_wrappers_7.6/rfc931.c
|
|||
|
||||
/* Local stuff. */
|
||||
|
||||
@@ -92,7 +93,7 @@ char *dest;
|
||||
@@ -81,7 +82,7 @@ char *dest;
|
||||
char *cp;
|
||||
char *result = unknown;
|
||||
FILE *fp;
|
||||
|
@ -360,7 +343,7 @@ diff -up tcp_wrappers_7.6/rfc931.c.warnings tcp_wrappers_7.6/rfc931.c
|
|||
struct sigaction nact, oact;
|
||||
|
||||
/*
|
||||
@@ -223,7 +224,7 @@ char *dest;
|
||||
@@ -165,7 +166,7 @@ char *dest;
|
||||
* protocol, not part of the data.
|
||||
*/
|
||||
|
||||
|
@ -369,9 +352,9 @@ diff -up tcp_wrappers_7.6/rfc931.c.warnings tcp_wrappers_7.6/rfc931.c
|
|||
*cp = 0;
|
||||
result = user;
|
||||
}
|
||||
diff -up tcp_wrappers_7.6/safe_finger.c.warnings tcp_wrappers_7.6/safe_finger.c
|
||||
--- tcp_wrappers_7.6/safe_finger.c.warnings 2011-08-16 10:29:50.766483063 +0200
|
||||
+++ tcp_wrappers_7.6/safe_finger.c 2011-08-16 10:29:52.341606268 +0200
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/safe_finger.c.warnings tcp_wrappers_7.6-ipv6.4/safe_finger.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/safe_finger.c.warnings 2013-08-15 18:51:57.521244146 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/safe_finger.c 2013-08-15 18:51:57.538244219 +0200
|
||||
@@ -24,8 +24,13 @@ static char sccsid[] = "@(#) safe_finger
|
||||
#include <sys/stat.h>
|
||||
#include <signal.h>
|
||||
|
@ -403,9 +386,31 @@ diff -up tcp_wrappers_7.6/safe_finger.c.warnings tcp_wrappers_7.6/safe_finger.c
|
|||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
diff -up tcp_wrappers_7.6/scaffold.c.warnings tcp_wrappers_7.6/scaffold.c
|
||||
--- tcp_wrappers_7.6/scaffold.c.warnings 2011-08-16 10:29:47.197478983 +0200
|
||||
+++ tcp_wrappers_7.6/scaffold.c 2011-08-16 10:29:52.508448914 +0200
|
||||
@@ -65,13 +73,17 @@ char **argv;
|
||||
*/
|
||||
if (getuid() == 0 || geteuid() == 0) {
|
||||
if ((pwd = getpwnam(UNPRIV_NAME)) && pwd->pw_uid > 0) {
|
||||
- setgid(pwd->pw_gid);
|
||||
+ if (setgid(pwd->pw_gid) != 0)
|
||||
+ return 1;
|
||||
initgroups(UNPRIV_NAME, pwd->pw_gid);
|
||||
- setuid(pwd->pw_uid);
|
||||
+ if (setuid(pwd->pw_uid))
|
||||
+ return 1;
|
||||
} else {
|
||||
- setgid(UNPRIV_UGID);
|
||||
+ if (setgid(UNPRIV_UGID))
|
||||
+ return 1;
|
||||
setgroups(0, NULL);
|
||||
- setuid(UNPRIV_UGID);
|
||||
+ if (setuid(UNPRIV_UGID))
|
||||
+ return 1;
|
||||
}
|
||||
}
|
||||
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/scaffold.c.warnings tcp_wrappers_7.6-ipv6.4/scaffold.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/scaffold.c.warnings 2013-08-15 18:51:57.457243868 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/scaffold.c 2013-08-15 18:51:57.538244219 +0200
|
||||
@@ -20,6 +20,8 @@ static char sccs_id[] = "@(#) scaffold.c
|
||||
#include <syslog.h>
|
||||
#include <setjmp.h>
|
||||
|
@ -415,10 +420,18 @@ diff -up tcp_wrappers_7.6/scaffold.c.warnings tcp_wrappers_7.6/scaffold.c
|
|||
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE (-1) /* XXX should be 0xffffffff */
|
||||
diff -up tcp_wrappers_7.6/socket.c.warnings tcp_wrappers_7.6/socket.c
|
||||
--- tcp_wrappers_7.6/socket.c.warnings 2011-08-16 10:29:48.319483715 +0200
|
||||
+++ tcp_wrappers_7.6/socket.c 2011-08-16 10:29:52.630463906 +0200
|
||||
@@ -84,7 +84,7 @@ struct request_info *request;
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/socket.c.warnings tcp_wrappers_7.6-ipv6.4/socket.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/socket.c.warnings 2013-08-15 18:51:57.479243964 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/socket.c 2013-08-15 18:52:32.346394921 +0200
|
||||
@@ -21,6 +21,7 @@ static char sccsid[] = "@(#) socket.c 1.
|
||||
|
||||
/* System libraries. */
|
||||
|
||||
+#include <arpa/inet.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -84,7 +85,7 @@ struct request_info *request;
|
||||
{
|
||||
static struct sockaddr_gen client;
|
||||
static struct sockaddr_gen server;
|
||||
|
@ -427,7 +440,16 @@ diff -up tcp_wrappers_7.6/socket.c.warnings tcp_wrappers_7.6/socket.c
|
|||
char buf[BUFSIZ];
|
||||
int fd = request->fd;
|
||||
|
||||
@@ -293,7 +293,7 @@ int fd;
|
||||
@@ -168,7 +169,7 @@ struct request_info *request;
|
||||
sock_methods(request);
|
||||
|
||||
memcpy(&client, res->ai_addr, res->ai_addrlen);
|
||||
- request->client->sin = (struct sockaddr *)&client;
|
||||
+ request->client->sin = (struct sockaddr_gen *)&client;
|
||||
freeaddrinfo(res);
|
||||
|
||||
request->client->name[0] = 0;
|
||||
@@ -293,7 +294,7 @@ int fd;
|
||||
{
|
||||
char buf[BUFSIZ];
|
||||
struct sockaddr_in sin;
|
||||
|
@ -436,33 +458,9 @@ diff -up tcp_wrappers_7.6/socket.c.warnings tcp_wrappers_7.6/socket.c
|
|||
|
||||
/*
|
||||
* Eat up the not-yet received datagram. Some systems insist on a
|
||||
diff -up tcp_wrappers_7.6/tcpd.c.warnings tcp_wrappers_7.6/tcpd.c
|
||||
--- tcp_wrappers_7.6/tcpd.c.warnings 2011-08-16 10:29:45.699419586 +0200
|
||||
+++ tcp_wrappers_7.6/tcpd.c 2011-08-16 10:29:52.746454541 +0200
|
||||
@@ -24,6 +24,7 @@ static char sccsid[] = "@(#) tcpd.c 1.10
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
#include <string.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
#ifndef MAXPATHNAMELEN
|
||||
#define MAXPATHNAMELEN BUFSIZ
|
||||
@@ -38,9 +39,12 @@ static char sccsid[] = "@(#) tcpd.c 1.10
|
||||
#include "patchlevel.h"
|
||||
#include "tcpd.h"
|
||||
|
||||
+void fix_options(struct request_info *);
|
||||
+
|
||||
int allow_severity = SEVERITY; /* run-time adjustable */
|
||||
int deny_severity = LOG_WARNING; /* ditto */
|
||||
|
||||
+int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
diff -up tcp_wrappers_7.6/tcpdchk.c.warnings tcp_wrappers_7.6/tcpdchk.c
|
||||
--- tcp_wrappers_7.6/tcpdchk.c.warnings 2011-08-16 10:29:45.552501988 +0200
|
||||
+++ tcp_wrappers_7.6/tcpdchk.c 2011-08-16 10:47:12.440605857 +0200
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/tcpdchk.c.warnings tcp_wrappers_7.6-ipv6.4/tcpdchk.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/tcpdchk.c.warnings 2013-08-15 18:51:57.529244180 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/tcpdchk.c 2013-08-15 18:51:57.540244228 +0200
|
||||
@@ -30,6 +30,8 @@ static char sccsid[] = "@(#) tcpdchk.c 1
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
|
@ -498,7 +496,7 @@ diff -up tcp_wrappers_7.6/tcpdchk.c.warnings tcp_wrappers_7.6/tcpdchk.c
|
|||
check_user(cp);
|
||||
check_host(host);
|
||||
} else {
|
||||
@@ -446,7 +450,7 @@ char *pat;
|
||||
@@ -449,7 +453,7 @@ char *pat;
|
||||
if (err)
|
||||
tcpd_warn("bad IP6 address specification: %s", pat);
|
||||
#endif
|
||||
|
@ -507,10 +505,38 @@ diff -up tcp_wrappers_7.6/tcpdchk.c.warnings tcp_wrappers_7.6/tcpdchk.c
|
|||
if (dot_quad_addr(pat) == INADDR_NONE
|
||||
|| dot_quad_addr(mask) == INADDR_NONE)
|
||||
tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
|
||||
diff -up tcp_wrappers_7.6/tcpdmatch.c.warnings tcp_wrappers_7.6/tcpdmatch.c
|
||||
--- tcp_wrappers_7.6/tcpdmatch.c.warnings 2011-08-16 10:29:49.531427106 +0200
|
||||
+++ tcp_wrappers_7.6/tcpdmatch.c 2011-08-16 10:29:52.968605853 +0200
|
||||
@@ -29,6 +29,7 @@ static char sccsid[] = "@(#) tcpdmatch.c
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/tcpd.c.warnings tcp_wrappers_7.6-ipv6.4/tcpd.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/tcpd.c.warnings 2013-08-15 18:51:57.450243838 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/tcpd.c 2013-08-15 18:51:57.540244228 +0200
|
||||
@@ -24,6 +24,7 @@ static char sccsid[] = "@(#) tcpd.c 1.10
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
#include <string.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
#ifndef MAXPATHNAMELEN
|
||||
#define MAXPATHNAMELEN BUFSIZ
|
||||
@@ -38,9 +39,12 @@ static char sccsid[] = "@(#) tcpd.c 1.10
|
||||
#include "patchlevel.h"
|
||||
#include "tcpd.h"
|
||||
|
||||
+void fix_options(struct request_info *);
|
||||
+
|
||||
int allow_severity = SEVERITY; /* run-time adjustable */
|
||||
int deny_severity = LOG_WARNING; /* ditto */
|
||||
|
||||
+int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/tcpdmatch.c.warnings tcp_wrappers_7.6-ipv6.4/tcpdmatch.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/tcpdmatch.c.warnings 2013-08-15 18:51:57.503244068 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/tcpdmatch.c 2013-08-15 18:51:57.541244232 +0200
|
||||
@@ -26,9 +26,11 @@ static char sccsid[] = "@(#) tcpdmatch.c
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
#include <setjmp.h>
|
||||
#include <string.h>
|
||||
|
@ -518,9 +544,9 @@ diff -up tcp_wrappers_7.6/tcpdmatch.c.warnings tcp_wrappers_7.6/tcpdmatch.c
|
|||
|
||||
extern void exit();
|
||||
extern int optind;
|
||||
diff -up tcp_wrappers_7.6/try-from.c.warnings tcp_wrappers_7.6/try-from.c
|
||||
--- tcp_wrappers_7.6/try-from.c.warnings 1994-12-28 17:42:55.000000000 +0100
|
||||
+++ tcp_wrappers_7.6/try-from.c 2011-08-16 10:29:53.095607440 +0200
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/try-from.c.warnings tcp_wrappers_7.6-ipv6.4/try-from.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/try-from.c.warnings 1994-12-28 17:42:55.000000000 +0100
|
||||
+++ tcp_wrappers_7.6-ipv6.4/try-from.c 2013-08-15 18:51:57.541244232 +0200
|
||||
@@ -37,6 +37,7 @@ static char sccsid[] = "@(#) try-from.c
|
||||
int allow_severity = SEVERITY; /* run-time adjustable */
|
||||
int deny_severity = LOG_WARNING; /* ditto */
|
||||
|
@ -529,9 +555,9 @@ diff -up tcp_wrappers_7.6/try-from.c.warnings tcp_wrappers_7.6/try-from.c
|
|||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
diff -up tcp_wrappers_7.6/update.c.warnings tcp_wrappers_7.6/update.c
|
||||
--- tcp_wrappers_7.6/update.c.warnings 2011-08-16 10:29:46.279421273 +0200
|
||||
+++ tcp_wrappers_7.6/update.c 2011-08-16 10:29:53.282606493 +0200
|
||||
diff -up tcp_wrappers_7.6-ipv6.4/update.c.warnings tcp_wrappers_7.6-ipv6.4/update.c
|
||||
--- tcp_wrappers_7.6-ipv6.4/update.c.warnings 1999-10-27 10:44:39.000000000 +0200
|
||||
+++ tcp_wrappers_7.6-ipv6.4/update.c 2013-08-15 18:51:57.541244232 +0200
|
||||
@@ -22,6 +22,7 @@ static char sccsid[] = "@(#) update.c 1.
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
|
|
|
@ -97,9 +97,9 @@ develop applications with tcp_wrappers support.
|
|||
%patch25 -p1 -b .relro
|
||||
%patch26 -p1 -b .xgets
|
||||
%patch27 -p1 -b .initgroups
|
||||
%patch28 -p1 -b .warnings
|
||||
%patch29 -p1 -b .uchart_fix
|
||||
%patch30 -p1 -b .altformat
|
||||
%patch28 -p1 -b .warnings
|
||||
|
||||
%build
|
||||
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC -DPIC -D_REENTRANT -DHAVE_STRERROR" LDFLAGS="-pie -z relro -z now" MAJOR=%{LIB_MAJOR} MINOR=%{LIB_MINOR} REL=%{LIB_REL} linux
|
||||
|
|
Loading…
Reference in New Issue