diff options
Diffstat (limited to 'meta/recipes-extended/tcp-wrappers')
6 files changed, 402 insertions, 20 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 @@ +From 9c97b5db237a793e0d1b6b0241570bdc6e35ee24 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 7 Aug 2022 17:42:24 -0700 +Subject: [PATCH] Fix implicit-function-declaration warnings + +These are seen with clang-15+ + +Upstream-Status: Inappropriate [upstream is dead] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + hosts_access.c | 3 +++ + safe_finger.c | 1 + + shell_cmd.c | 3 +++ + tcpd.c | 2 +- + tcpdchk.c | 1 + + workarounds.c | 1 + + 6 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/hosts_access.c b/hosts_access.c +index 0133e5e..58697ea 100644 +--- a/hosts_access.c ++++ b/hosts_access.c +@@ -33,6 +33,12 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22"; + #endif + #include <netinet/in.h> + #include <arpa/inet.h> ++#ifdef USE_GETDOMAIN ++/* defined in workarounds.c */ ++extern int yp_get_default_domain(char **ptr); ++#else ++# include <rpcsvc/ypclnt.h> ++#endif /* USE_GETDOMAIN */ + #include <stdio.h> + #include <stdlib.h> + #include <syslog.h> +@@ -45,6 +46,8 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22"; + #endif + + extern int errno; ++extern int match_pattern_ylo(const char *s, const char *pattern); ++extern unsigned long cidr_mask_addr(char* str); + + #ifndef INADDR_NONE + #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ +diff --git a/safe_finger.c b/safe_finger.c +index 23afab1..a6458fb 100644 +--- a/safe_finger.c ++++ b/safe_finger.c +@@ -34,6 +34,7 @@ static char sccsid[] = "@(#) safe_finger.c 1.4 94/12/28 17:42:41"; + #include <syslog.h> + + extern void exit(); ++extern int pipe_stdin(char **argv); + + /* Local stuff */ + +diff --git a/shell_cmd.c b/shell_cmd.c +index 62d31bc..a566092 100644 +--- a/shell_cmd.c ++++ b/shell_cmd.c +@@ -16,10 +16,13 @@ static char sccsid[] = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44"; + + #include <sys/types.h> + #include <sys/param.h> ++#include <sys/wait.h> ++#include <fcntl.h> + #include <signal.h> + #include <stdio.h> + #include <syslog.h> + #include <string.h> ++#include <unistd.h> + + extern void exit(); + +diff --git a/tcpd.c b/tcpd.c +index dc9ff17..4353caa 100644 +--- a/tcpd.c ++++ b/tcpd.c +@@ -46,7 +46,7 @@ void fix_options(struct request_info *); + int allow_severity = SEVERITY; /* run-time adjustable */ + int deny_severity = LOG_WARNING; /* ditto */ + +-main(argc, argv) ++void main(argc, argv) + int argc; + char **argv; + { +diff --git a/tcpdchk.c b/tcpdchk.c +index 5dca8bd..67c12ce 100644 +--- a/tcpdchk.c ++++ b/tcpdchk.c +@@ -38,6 +38,7 @@ static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25"; + + extern int errno; + extern void exit(); ++extern unsigned long cidr_mask_addr(char* str); + extern int optind; + extern char *optarg; + +diff --git a/workarounds.c b/workarounds.c +index b22b378..6335049 100644 +--- a/workarounds.c ++++ b/workarounds.c +@@ -21,6 +21,7 @@ char sccsid[] = "@(#) workarounds.c 1.6 96/03/19 16:22:25"; + #include <stdio.h> + #include <syslog.h> + #include <string.h> ++#include <unistd.h> + + extern int errno; + +-- +2.37.1 + diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Remove-fgets-extern-declaration.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Remove-fgets-extern-declaration.patch new file mode 100644 index 0000000000..88c8d9cae7 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Remove-fgets-extern-declaration.patch @@ -0,0 +1,43 @@ +From 24d10919b4bc5e37a2d80b274d2cd2ee77b03549 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Jan 2020 14:25:47 -0800 +Subject: [PATCH] Remove fgets() extern declaration + +These sources already include <stdio.h> which should bring the correct +declaration + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + hosts_access.c | 1 - + misc.c | 2 -- + 2 files changed, 3 deletions(-) + +diff --git a/hosts_access.c b/hosts_access.c +index 329b35e..0133e5e 100644 +--- a/hosts_access.c ++++ b/hosts_access.c +@@ -44,7 +44,6 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22"; + #include <netdb.h> + #endif + +-extern char *fgets(); + extern int errno; + + #ifndef INADDR_NONE +diff --git a/misc.c b/misc.c +index 74ca319..9a5e73a 100644 +--- a/misc.c ++++ b/misc.c +@@ -18,8 +18,6 @@ static char sccsic[] = "@(#) misc.c 1.2 96/02/11 17:01:29"; + + #include "tcpd.h" + +-extern char *fgets(); +- + #ifndef INADDR_NONE + #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ + #endif +-- +2.24.1 + diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings.patch new file mode 100644 index 0000000000..965544cc0b --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings.patch @@ -0,0 +1,25 @@ +Compile warning fixes from Debian + +Signed-off-by: Adrian Bunk <bunk@stusta.de> +Upstream-Status: Inappropriate [upstream is dead] + +--- a/options.c ++++ b/options.c +@@ -41,6 +41,7 @@ static char sccsid[] = "@(#) options.c 1 + #include <netinet/in.h> + #include <netdb.h> + #include <stdio.h> ++#include <unistd.h> + #include <syslog.h> + #include <pwd.h> + #include <grp.h> +--- a/scaffold.c ++++ b/scaffold.c +@@ -17,6 +17,7 @@ static char sccs_id[] = "@(#) scaffold.c + #include <arpa/inet.h> + #include <netdb.h> + #include <stdio.h> ++#include <stdlib.h> + #include <syslog.h> + #include <setjmp.h> + #include <string.h> diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings2.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings2.patch new file mode 100644 index 0000000000..27157a2e6d --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/fix_warnings2.patch @@ -0,0 +1,200 @@ +Compile warning fixes from Debian + +Signed-off-by: Adrian Bunk <bunk@stusta.de> +Upstream-Status: Inappropriate [upstream is dead] + +--- a/clean_exit.c ++++ b/clean_exit.c +@@ -13,6 +13,7 @@ static char sccsid[] = "@(#) clean_exit. + #endif + + #include <stdio.h> ++#include <unistd.h> + + extern void exit(); + +--- a/hosts_access.c ++++ b/hosts_access.c +@@ -34,6 +34,7 @@ static char sccsid[] = "@(#) hosts_acces + #include <netinet/in.h> + #include <arpa/inet.h> + #include <stdio.h> ++#include <stdlib.h> + #include <syslog.h> + #include <ctype.h> + #include <errno.h> +--- a/misc.c ++++ b/misc.c +@@ -13,6 +13,7 @@ static char sccsic[] = "@(#) misc.c 1.2 + #include <netinet/in.h> + #include <arpa/inet.h> + #include <stdio.h> ++#include <stdlib.h> + #include <string.h> + + #include "tcpd.h" +--- a/options.c ++++ b/options.c +@@ -41,6 +41,7 @@ static char sccsid[] = "@(#) options.c 1 + #include <netinet/in.h> + #include <netdb.h> + #include <stdio.h> ++#include <stdlib.h> + #include <unistd.h> + #include <syslog.h> + #include <pwd.h> +--- a/percent_x.c ++++ b/percent_x.c +@@ -17,6 +17,7 @@ static char sccsid[] = "@(#) percent_x.c + /* System libraries. */ + + #include <stdio.h> ++#include <unistd.h> + #include <syslog.h> + #include <string.h> + +--- a/rfc931.c ++++ b/rfc931.c +@@ -16,6 +16,7 @@ static char sccsid[] = "@(#) rfc931.c 1. + /* System libraries. */ + + #include <stdio.h> ++#include <unistd.h> + #include <syslog.h> + #include <sys/types.h> + #include <sys/socket.h> +--- a/tcpd.c ++++ b/tcpd.c +@@ -22,6 +22,7 @@ static char sccsid[] = "@(#) tcpd.c 1.10 + #include <sys/socket.h> + #include <netinet/in.h> + #include <stdio.h> ++#include <unistd.h> + #include <syslog.h> + #include <string.h> + +--- a/update.c ++++ b/update.c +@@ -20,6 +20,7 @@ static char sccsid[] = "@(#) update.c 1. + /* System libraries */ + + #include <stdio.h> ++#include <unistd.h> + #include <syslog.h> + #include <string.h> + +--- a/fakelog.c ++++ b/fakelog.c +@@ -17,7 +17,7 @@ static char sccsid[] = "@(#) fakelog.c 1 + + /* ARGSUSED */ + +-openlog(name, logopt, facility) ++void openlog(name, logopt, facility) + char *name; + int logopt; + int facility; +@@ -27,7 +27,7 @@ int facility; + + /* vsyslog - format one record */ + +-vsyslog(severity, fmt, ap) ++void vsyslog(severity, fmt, ap) + int severity; + char *fmt; + va_list ap; +@@ -43,7 +43,7 @@ va_list ap; + + /* VARARGS */ + +-VARARGS(syslog, int, severity) ++void VARARGS(syslog, int, severity) + { + va_list ap; + char *fmt; +@@ -56,7 +56,7 @@ VARARGS(syslog, int, severity) + + /* closelog - dummy */ + +-closelog() ++void closelog() + { + /* void */ + } +--- a/safe_finger.c ++++ b/safe_finger.c +@@ -22,10 +22,15 @@ static char sccsid[] = "@(#) safe_finger + + #include <sys/types.h> + #include <sys/stat.h> ++#include <sys/wait.h> ++#include <fcntl.h> + #include <signal.h> + #include <stdio.h> ++#include <stdlib.h> ++#include <unistd.h> + #include <ctype.h> + #include <pwd.h> ++#include <grp.h> + #include <syslog.h> + + extern void exit(); +@@ -52,7 +59,7 @@ int sig; + exit(0); + } + +-main(argc, argv) ++int main(argc, argv) + int argc; + char **argv; + { +--- a/tcpdchk.c ++++ b/tcpdchk.c +@@ -28,6 +28,8 @@ static char sccsid[] = "@(#) tcpdchk.c 1 + #include <netinet/in.h> + #include <arpa/inet.h> + #include <stdio.h> ++#include <stdlib.h> ++#include <unistd.h> + #include <syslog.h> + #include <setjmp.h> + #include <errno.h> +--- a/tcpdmatch.c ++++ b/tcpdmatch.c +@@ -26,6 +26,7 @@ static char sccsid[] = "@(#) tcpdmatch.c + #include <arpa/inet.h> + #include <netdb.h> + #include <stdio.h> ++#include <unistd.h> + #include <syslog.h> + #include <setjmp.h> + #include <string.h> +--- a/try-from.c ++++ b/try-from.c +@@ -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; + { +--- a/inetcf.c ++++ b/inetcf.c +@@ -12,6 +12,7 @@ static char sccsid[] = "@(#) inetcf.c 1. + #include <sys/types.h> + #include <sys/stat.h> + #include <stdio.h> ++#include <stdlib.h> + #include <errno.h> + #include <string.h> + +@@ -20,6 +21,7 @@ extern void exit(); + + #include "tcpd.h" + #include "inetcf.h" ++#include "scaffold.h" + + /* + * Network configuration files may live in unusual places. Here are some 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 Added support for socklen_t type to len argument passed to socket related calls. This fixes a bug that causes tcp wrappers to fail when using sshd. - Upstream-Status: Pending - - Signed-off-by: farrah rashid <farrah.rashid@windriver.com> +Upstream-Status: Pending +Signed-off-by: farrah rashid <farrah.rashid@windriver.com> diff --git a/fix_options.c b/fix_options.c 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 0f50674653..8cf927153f 100644 --- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb @@ -4,21 +4,18 @@ DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \ services." SECTION = "console/network" -LICENSE = "BSD" +LICENSE = "BSD-1-Clause" LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa" -PR ="r10" - -DEPENDS += "libnsl2" PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc" -FILES_libwrap = "${base_libdir}/lib*${SOLIBS}" -FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5" -FILES_libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}" -FILES_libwrap-staticdev = "${libdir}/lib*.a" -FILES_${PN} = "${sbindir}" -FILES_${PN}-doc = "${mandir}/man8" - -SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \ +FILES:libwrap = "${base_libdir}/lib*${SOLIBS}" +FILES:libwrap-doc = "${mandir}/man3 ${mandir}/man5" +FILES:libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}" +FILES:libwrap-staticdev = "${libdir}/lib*.a" +FILES:${PN} = "${sbindir}" +FILES:${PN}-doc = "${mandir}/man8" + +SRC_URI = "http://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \ file://00_man_quoting.diff \ file://01_man_portability.patch \ file://05_wildcard_matching.patch \ @@ -47,6 +44,10 @@ SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \ file://makefile-fix-parallel.patch \ file://musl-decls.patch \ file://0001-Fix-build-with-clang.patch \ + file://fix_warnings.patch \ + file://fix_warnings2.patch \ + file://0001-Remove-fgets-extern-declaration.patch \ + file://0001-Fix-implicit-function-declaration-warnings.patch \ " SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a" @@ -75,9 +76,9 @@ EXTRA_OEMAKE = "'CC=${CC}' \ 'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'" EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN" -EXTRA_OEMAKE_NETGROUP_libc-musl = "-DUSE_GETDOMAIN" +EXTRA_OEMAKE_NETGROUP:libc-musl = "-DUSE_GETDOMAIN" -EXTRA_OEMAKE_append_libc-musl = " 'LIBS='" +EXTRA_OEMAKE:append:libc-musl = " 'LIBS='" do_compile () { oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \ @@ -119,8 +120,8 @@ do_install () { install -m 0644 $m.8 ${D}${mandir}/man8/ || exit 1 done - install -m 0644 ${WORKDIR}/try-from.8 ${D}${mandir}/man8/ - install -m 0644 ${WORKDIR}/safe_finger.8 ${D}${mandir}/man8/ + install -m 0644 ${UNPACKDIR}/try-from.8 ${D}${mandir}/man8/ + install -m 0644 ${UNPACKDIR}/safe_finger.8 ${D}${mandir}/man8/ install -d ${D}${includedir} install -m 0644 tcpd.h ${D}${includedir}/ @@ -130,4 +131,4 @@ do_install () { touch ${D}${sysconfdir}/hosts.deny } -FILES_${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny" +FILES:${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny" |