Sync from SUSE:SLFO:Main tcpd revision 012aecbeb932f29ddf87ffcba395d102

This commit is contained in:
Adrian Schröter 2024-10-03 18:01:32 +02:00
parent 627830b59e
commit 422202a93f
3 changed files with 160 additions and 36 deletions

View File

@ -0,0 +1,110 @@
--- a/hosts_access.c 2024-05-14 09:45:54.109391777 +0200
+++ b/hosts_access.c 2024-05-14 09:28:19.989639524 +0200
@@ -38,6 +38,7 @@ static char sccsid[] = "@(#) hosts_acces
#include <errno.h>
#include <setjmp.h>
#include <string.h>
+#include <stdlib.h>
extern char *fgets();
extern int errno;
@@ -88,6 +89,7 @@ static int client_match();
static int host_match();
static int string_match();
static int masked_match();
+static int match_pattern_ylo();
#ifdef INET6
static void ipv6_mask();
#endif
--- a/inetcf.c 2024-05-14 09:45:54.076058239 +0200
+++ b/inetcf.c 2024-05-14 09:39:27.373700870 +0200
@@ -14,12 +14,14 @@ static char sccsid[] = "@(#) inetcf.c 1.
#include <stdio.h>
#include <errno.h>
#include <string.h>
+#include <stdlib.h>
extern int errno;
extern void exit();
#include "tcpd.h"
#include "inetcf.h"
+#include "scaffold.h"
/*
* Network configuration files may live in unusual places. Here are some
--- a/misc.c 2024-05-14 09:45:54.102725070 +0200
+++ b/misc.c 2024-05-14 09:35:49.282373657 +0200
@@ -14,6 +14,8 @@ static char sccsic[] = "@(#) misc.c 1.2
#include <arpa/inet.h>
#include <stdio.h>
#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
#include "tcpd.h"
--- a/safe_finger.c 2024-05-14 09:45:54.069391531 +0200
+++ b/safe_finger.c 2024-05-14 09:45:21.879195309 +0200
@@ -52,7 +52,9 @@ int sig;
exit(0);
}
-main(argc, argv)
+static int pipe_stdin();
+
+int main(argc, argv)
int argc;
char **argv;
{
--- a/socket.c 2024-05-14 09:45:54.112725131 +0200
+++ b/socket.c 2024-05-14 09:34:34.351917685 +0200
@@ -200,7 +200,7 @@ struct host_info *host;
case AF_INET6:
ap = (char *)&((struct sockaddr_in6 *)sin)->sin6_addr;
if (IN6_IS_ADDR_V4MAPPED(ap)) {
- ap = &((struct in6_addr *) ap)->s6_addr32[3];
+ ap = (char *)&((struct in6_addr *) ap)->s6_addr32[3];
af = AF_INET;
}
break;
--- a/tcpd.c 2024-05-14 09:45:53.962724209 +0200
+++ b/tcpd.c 2024-05-14 09:15:43.001693796 +0200
@@ -42,7 +42,7 @@ static char sccsid[] = "@(#) tcpd.c 1.10
int allow_severity = SEVERITY; /* run-time adjustable */
int deny_severity = LOG_WARNING; /* ditto */
-main(argc, argv)
+int main(argc, argv)
int argc;
char **argv;
{
--- a/tcpd.h 2024-05-14 09:45:54.102725070 +0200
+++ b/tcpd.h 2024-05-14 09:43:00.575000561 +0200
@@ -89,6 +89,7 @@ extern char *xgets(char *, int, FILE *);
extern char *split_at(char *, int);
extern unsigned long dot_quad_addr(char *);
extern char *skip_ipv6_addrs(char *);
+extern unsigned long prefix_to_netmask(char *);
#else
extern int hosts_access(); /* access control */
extern void shell_cmd(); /* execute shell command */
@@ -100,6 +101,7 @@ extern char *xgets(); /* fgets() on st
extern char *split_at(); /* strchr() and split */
extern unsigned long dot_quad_addr(); /* restricted inet_addr() */
extern char *skip_ipv6_addrs();
+extern unsigned long prefix_to_netmask();
#endif
/* Global variables. */
--- a/try-from.c 1994-12-28 17:42:55.000000000 +0100
+++ b/try-from.c 2024-05-14 09:39:43.527132682 +0200
@@ -37,7 +37,7 @@ static char sccsid[] = "@(#) try-from.c
int allow_severity = SEVERITY; /* run-time adjustable */
int deny_severity = LOG_WARNING; /* ditto */
-main(argc, argv)
+int main(argc, argv)
int argc;
char **argv;
{

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Tue May 14 08:10:05 UTC 2024 - pgajdos@suse.com
- build with gcc14
- added patches
+ tcp_wrappers_7.6-gcc14.patch
-------------------------------------------------------------------
Thu Feb 29 12:32:07 UTC 2024 - pgajdos@suse.com
- Use %patch -P N instead of deprecated %patchN.
-------------------------------------------------------------------
Tue Oct 11 09:34:37 UTC 2022 - Danilo Spinella <danilo.spinella@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package tcpd
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -64,6 +64,7 @@ Patch31: tcp_wrappers_%{version}-ipv6-subnet.diff
Patch32: tcp_wrappers_%{version}-ipv6-host-match.patch
Patch33: tcp_wrappers_%{version}-ipv6-mapped-v4.patch
Patch34: tcp_wrappers_%{version}-ipv6.fix.fix3.diff
Patch35: tcp_wrappers_%{version}-gcc14.patch
BuildRequires: linux-kernel-headers
Provides: nkitb:%{_sbindir}/tcpd
# bug437293
@ -102,41 +103,42 @@ to compile and link programs against the TCP wrapper library.
%prep
%setup -q -n tcp_wrappers_%{version}
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%patch11
%patch12
%patch13
%patch14
%patch15
%patch16
%patch17
%patch18
%patch19
%patch20
%patch21
%patch22
%patch23
%patch24
%patch25
%patch26
%patch27
%patch28
%patch29
%patch30 -p1
%patch31
%patch32 -p1
%patch33 -p1
%patch34
%patch -P 0
%patch -P 1
%patch -P 2
%patch -P 3
%patch -P 4
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 8
%patch -P 9
%patch -P 10
%patch -P 11
%patch -P 12
%patch -P 13
%patch -P 14
%patch -P 15
%patch -P 16
%patch -P 17
%patch -P 18
%patch -P 19
%patch -P 20
%patch -P 21
%patch -P 22
%patch -P 23
%patch -P 24
%patch -P 25
%patch -P 26
%patch -P 27
%patch -P 28
%patch -P 29
%patch -P 30 -p1
%patch -P 31
%patch -P 32 -p1
%patch -P 33 -p1
%patch -P 34
%patch -P 35 -p1
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects