summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/tcp-wrappers
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/tcp-wrappers')
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch114
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch5
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb26
3 files changed, 128 insertions, 17 deletions
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch
new file mode 100644
index 0000000000..474703885d
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch
@@ -0,0 +1,114 @@
1From 9c97b5db237a793e0d1b6b0241570bdc6e35ee24 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 7 Aug 2022 17:42:24 -0700
4Subject: [PATCH] Fix implicit-function-declaration warnings
5
6These are seen with clang-15+
7
8Upstream-Status: Inappropriate [upstream is dead]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 hosts_access.c | 3 +++
12 safe_finger.c | 1 +
13 shell_cmd.c | 3 +++
14 tcpd.c | 2 +-
15 tcpdchk.c | 1 +
16 workarounds.c | 1 +
17 6 files changed, 10 insertions(+), 1 deletion(-)
18
19diff --git a/hosts_access.c b/hosts_access.c
20index 0133e5e..58697ea 100644
21--- a/hosts_access.c
22+++ b/hosts_access.c
23@@ -33,6 +33,12 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
24 #endif
25 #include <netinet/in.h>
26 #include <arpa/inet.h>
27+#ifdef USE_GETDOMAIN
28+/* defined in workarounds.c */
29+extern int yp_get_default_domain(char **ptr);
30+#else
31+# include <rpcsvc/ypclnt.h>
32+#endif /* USE_GETDOMAIN */
33 #include <stdio.h>
34 #include <stdlib.h>
35 #include <syslog.h>
36@@ -45,6 +46,8 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
37 #endif
38
39 extern int errno;
40+extern int match_pattern_ylo(const char *s, const char *pattern);
41+extern unsigned long cidr_mask_addr(char* str);
42
43 #ifndef INADDR_NONE
44 #define INADDR_NONE (-1) /* XXX should be 0xffffffff */
45diff --git a/safe_finger.c b/safe_finger.c
46index 23afab1..a6458fb 100644
47--- a/safe_finger.c
48+++ b/safe_finger.c
49@@ -34,6 +34,7 @@ static char sccsid[] = "@(#) safe_finger.c 1.4 94/12/28 17:42:41";
50 #include <syslog.h>
51
52 extern void exit();
53+extern int pipe_stdin(char **argv);
54
55 /* Local stuff */
56
57diff --git a/shell_cmd.c b/shell_cmd.c
58index 62d31bc..a566092 100644
59--- a/shell_cmd.c
60+++ b/shell_cmd.c
61@@ -16,10 +16,13 @@ static char sccsid[] = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44";
62
63 #include <sys/types.h>
64 #include <sys/param.h>
65+#include <sys/wait.h>
66+#include <fcntl.h>
67 #include <signal.h>
68 #include <stdio.h>
69 #include <syslog.h>
70 #include <string.h>
71+#include <unistd.h>
72
73 extern void exit();
74
75diff --git a/tcpd.c b/tcpd.c
76index dc9ff17..4353caa 100644
77--- a/tcpd.c
78+++ b/tcpd.c
79@@ -46,7 +46,7 @@ void fix_options(struct request_info *);
80 int allow_severity = SEVERITY; /* run-time adjustable */
81 int deny_severity = LOG_WARNING; /* ditto */
82
83-main(argc, argv)
84+void main(argc, argv)
85 int argc;
86 char **argv;
87 {
88diff --git a/tcpdchk.c b/tcpdchk.c
89index 5dca8bd..67c12ce 100644
90--- a/tcpdchk.c
91+++ b/tcpdchk.c
92@@ -38,6 +38,7 @@ static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
93
94 extern int errno;
95 extern void exit();
96+extern unsigned long cidr_mask_addr(char* str);
97 extern int optind;
98 extern char *optarg;
99
100diff --git a/workarounds.c b/workarounds.c
101index b22b378..6335049 100644
102--- a/workarounds.c
103+++ b/workarounds.c
104@@ -21,6 +21,7 @@ char sccsid[] = "@(#) workarounds.c 1.6 96/03/19 16:22:25";
105 #include <stdio.h>
106 #include <syslog.h>
107 #include <string.h>
108+#include <unistd.h>
109
110 extern int errno;
111
112--
1132.37.1
114
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
index 8e46df8e1e..cf4f993c1a 100644
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
@@ -7,9 +7,8 @@ Date: Tue Feb 12 09:53:50 2013 -0500
7 Added support for socklen_t type to len argument passed to socket related 7 Added support for socklen_t type to len argument passed to socket related
8 calls. This fixes a bug that causes tcp wrappers to fail when using sshd. 8 calls. This fixes a bug that causes tcp wrappers to fail when using sshd.
9 9
10 Upstream-Status: Pending 10Upstream-Status: Pending
11 11Signed-off-by: farrah rashid <farrah.rashid@windriver.com>
12 Signed-off-by: farrah rashid <farrah.rashid@windriver.com>
13 12
14diff --git a/fix_options.c b/fix_options.c 13diff --git a/fix_options.c b/fix_options.c
15index 7473adf..fe2b442 100644 14index 7473adf..fe2b442 100644
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
index e903b9db14..8cf927153f 100644
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -6,17 +6,14 @@ SECTION = "console/network"
6 6
7LICENSE = "BSD-1-Clause" 7LICENSE = "BSD-1-Clause"
8LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa" 8LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa"
9PR ="r10"
10
11DEPENDS += "libnsl2"
12 9
13PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc" 10PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc"
14FILES_libwrap = "${base_libdir}/lib*${SOLIBS}" 11FILES:libwrap = "${base_libdir}/lib*${SOLIBS}"
15FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5" 12FILES:libwrap-doc = "${mandir}/man3 ${mandir}/man5"
16FILES_libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}" 13FILES:libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}"
17FILES_libwrap-staticdev = "${libdir}/lib*.a" 14FILES:libwrap-staticdev = "${libdir}/lib*.a"
18FILES_${PN} = "${sbindir}" 15FILES:${PN} = "${sbindir}"
19FILES_${PN}-doc = "${mandir}/man8" 16FILES:${PN}-doc = "${mandir}/man8"
20 17
21SRC_URI = "http://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \ 18SRC_URI = "http://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
22 file://00_man_quoting.diff \ 19 file://00_man_quoting.diff \
@@ -50,6 +47,7 @@ SRC_URI = "http://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
50 file://fix_warnings.patch \ 47 file://fix_warnings.patch \
51 file://fix_warnings2.patch \ 48 file://fix_warnings2.patch \
52 file://0001-Remove-fgets-extern-declaration.patch \ 49 file://0001-Remove-fgets-extern-declaration.patch \
50 file://0001-Fix-implicit-function-declaration-warnings.patch \
53 " 51 "
54 52
55SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a" 53SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"
@@ -78,9 +76,9 @@ EXTRA_OEMAKE = "'CC=${CC}' \
78 'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'" 76 'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'"
79 77
80EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN" 78EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN"
81EXTRA_OEMAKE_NETGROUP_libc-musl = "-DUSE_GETDOMAIN" 79EXTRA_OEMAKE_NETGROUP:libc-musl = "-DUSE_GETDOMAIN"
82 80
83EXTRA_OEMAKE_append_libc-musl = " 'LIBS='" 81EXTRA_OEMAKE:append:libc-musl = " 'LIBS='"
84 82
85do_compile () { 83do_compile () {
86 oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \ 84 oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \
@@ -122,8 +120,8 @@ do_install () {
122 install -m 0644 $m.8 ${D}${mandir}/man8/ || exit 1 120 install -m 0644 $m.8 ${D}${mandir}/man8/ || exit 1
123 done 121 done
124 122
125 install -m 0644 ${WORKDIR}/try-from.8 ${D}${mandir}/man8/ 123 install -m 0644 ${UNPACKDIR}/try-from.8 ${D}${mandir}/man8/
126 install -m 0644 ${WORKDIR}/safe_finger.8 ${D}${mandir}/man8/ 124 install -m 0644 ${UNPACKDIR}/safe_finger.8 ${D}${mandir}/man8/
127 125
128 install -d ${D}${includedir} 126 install -d ${D}${includedir}
129 install -m 0644 tcpd.h ${D}${includedir}/ 127 install -m 0644 tcpd.h ${D}${includedir}/
@@ -133,4 +131,4 @@ do_install () {
133 touch ${D}${sysconfdir}/hosts.deny 131 touch ${D}${sysconfdir}/hosts.deny
134} 132}
135 133
136FILES_${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny" 134FILES:${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny"