diff options
Diffstat (limited to 'meta/recipes-extended/tcp-wrappers')
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 @@ | |||
1 | From 9c97b5db237a793e0d1b6b0241570bdc6e35ee24 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 7 Aug 2022 17:42:24 -0700 | ||
4 | Subject: [PATCH] Fix implicit-function-declaration warnings | ||
5 | |||
6 | These are seen with clang-15+ | ||
7 | |||
8 | Upstream-Status: Inappropriate [upstream is dead] | ||
9 | Signed-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 | |||
19 | diff --git a/hosts_access.c b/hosts_access.c | ||
20 | index 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 */ | ||
45 | diff --git a/safe_finger.c b/safe_finger.c | ||
46 | index 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 | |||
57 | diff --git a/shell_cmd.c b/shell_cmd.c | ||
58 | index 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 | |||
75 | diff --git a/tcpd.c b/tcpd.c | ||
76 | index 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 | { | ||
88 | diff --git a/tcpdchk.c b/tcpdchk.c | ||
89 | index 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 | |||
100 | diff --git a/workarounds.c b/workarounds.c | ||
101 | index 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 | -- | ||
113 | 2.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 | 10 | Upstream-Status: Pending |
11 | 11 | Signed-off-by: farrah rashid <farrah.rashid@windriver.com> | |
12 | Signed-off-by: farrah rashid <farrah.rashid@windriver.com> | ||
13 | 12 | ||
14 | diff --git a/fix_options.c b/fix_options.c | 13 | diff --git a/fix_options.c b/fix_options.c |
15 | index 7473adf..fe2b442 100644 | 14 | index 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 | ||
7 | LICENSE = "BSD-1-Clause" | 7 | LICENSE = "BSD-1-Clause" |
8 | LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa" | 8 | LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa" |
9 | PR ="r10" | ||
10 | |||
11 | DEPENDS += "libnsl2" | ||
12 | 9 | ||
13 | PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc" | 10 | PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc" |
14 | FILES_libwrap = "${base_libdir}/lib*${SOLIBS}" | 11 | FILES:libwrap = "${base_libdir}/lib*${SOLIBS}" |
15 | FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5" | 12 | FILES:libwrap-doc = "${mandir}/man3 ${mandir}/man5" |
16 | FILES_libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}" | 13 | FILES:libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}" |
17 | FILES_libwrap-staticdev = "${libdir}/lib*.a" | 14 | FILES:libwrap-staticdev = "${libdir}/lib*.a" |
18 | FILES_${PN} = "${sbindir}" | 15 | FILES:${PN} = "${sbindir}" |
19 | FILES_${PN}-doc = "${mandir}/man8" | 16 | FILES:${PN}-doc = "${mandir}/man8" |
20 | 17 | ||
21 | SRC_URI = "http://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \ | 18 | SRC_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 | ||
55 | SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a" | 53 | SRC_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 | ||
80 | EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN" | 78 | EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN" |
81 | EXTRA_OEMAKE_NETGROUP_libc-musl = "-DUSE_GETDOMAIN" | 79 | EXTRA_OEMAKE_NETGROUP:libc-musl = "-DUSE_GETDOMAIN" |
82 | 80 | ||
83 | EXTRA_OEMAKE_append_libc-musl = " 'LIBS='" | 81 | EXTRA_OEMAKE:append:libc-musl = " 'LIBS='" |
84 | 82 | ||
85 | do_compile () { | 83 | do_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 | ||
136 | FILES_${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny" | 134 | FILES:${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny" |