Signed-off-by: Armin Kuster <akuster...@gmail.com> --- ...1-ftp-include-sys-types.h-for-u_long.patch | 32 - .../netkit-ftp/Add_ARG_MAX_define.patch | 27 - .../netkit-ftp/netkit-ftp_0.17.bb | 50 - .../0001-rpcgen-Fix-printf-formats.patch | 53 - .../netkit-rpc/netkit-rpc/gcc4.patch | 39 - .../netkit-rpc/netkit-rpc_0.17.bb | 51 - .../CVE-2019-7282-and-CVE-2019-7283.patch | 35 - .../netkit-rsh/fix-host-variable.patch | 27 - .../netkit-rsh/fixup_wait3_api_change.patch | 34 - .../netkit-rsh-0.17-rexec-ipv6.patch | 30 - .../netkit-rsh/no_pam_build_fix.patch | 39 - .../netkit-rsh/netkit-rsh/rexec.pam | 10 - .../netkit-rsh/netkit-rsh/rexec.xinetd.netkit | 20 - .../netkit-rsh/netkit-rsh/rlogin.pam | 12 - .../netkit-rsh/rlogin.xinetd.netkit | 23 - .../rsh-redone_link_order_file.patch | 77 -- .../netkit-rsh/netkit-rsh/rsh.pam | 10 - .../netkit-rsh/netkit-rsh/rsh.xinetd.netkit | 21 - .../netkit-rsh/netkit-rsh_0.17.bb | 105 -- .../0001-Link-with-libtirpc.patch | 120 -- ...sd-Makefile-fix-parallel-build-issue.patch | 30 - .../netkit-rusers/netkit-rusers_0.17.bb | 72 - ...dd-missing-include-path-to-I-options.patch | 46 - ...002-Fix-build-issues-found-with-musl.patch | 72 - .../netkit-rwho/netkit-rwho/rwhod | 71 - .../netkit-rwho/netkit-rwho/rwhod.default | 2 - .../netkit-rwho/netkit-rwho_0.17.bb | 108 -- .../0001-Drop-using-register-keyword.patch | 457 ------- ...lnet-telnetd-Fix-deadlock-on-cleanup.patch | 116 -- ...net-telnetd-Fix-print-format-strings.patch | 68 - ....c-Fix-buffer-overflow-in-netoprintf.patch | 56 - ...time.h-form-time-and-strftime-protot.patch | 27 - .../netkit-telnet/files/CVE-2020-10188.patch | 112 -- .../netkit-telnet/files/CVE-2022-39028.patch | 53 - .../To-aviod-buffer-overflow-in-telnet.patch | 1217 ----------------- .../Warning-fix-in-the-step-of-install.patch | 41 - .../netkit-telnet/files/cross-compile.patch | 48 - .../netkit-telnet/files/telnet-xinetd | 14 - .../netkit-telnet/netkit-telnet_0.17.bb | 74 - .../0001-tftp-Include-missing-fcntl.h.patch | 27 - .../netkit-tftp/netkit-tftp/tftp.conf | 11 - .../netkit-tftp/netkit-tftp_0.17.bb | 59 - 42 files changed, 3596 deletions(-) delete mode 100644 meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/0001-ftp-include-sys-types.h-for-u_long.patch delete mode 100644 meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/Add_ARG_MAX_define.patch delete mode 100644 meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb delete mode 100644 meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch delete mode 100644 meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch delete mode 100644 meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fixup_wait3_api_change.patch delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit delete mode 100644 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb delete mode 100644 meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch delete mode 100644 meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch delete mode 100644 meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb delete mode 100644 meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch delete mode 100644 meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch delete mode 100755 meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod delete mode 100644 meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default delete mode 100644 meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb delete mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/0001-Drop-using-register-keyword.patch delete mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-deadlock-on-cleanup.patch delete mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch delete mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/0001-telnetd-utility.c-Fix-buffer-overflow-in-netoprintf.patch delete mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/0001-utility-Include-time.h-form-time-and-strftime-protot.patch delete mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/CVE-2020-10188.patch delete mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/CVE-2022-39028.patch delete mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/To-aviod-buffer-overflow-in-telnet.patch delete mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/Warning-fix-in-the-step-of-install.patch delete mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/cross-compile.patch delete mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/telnet-xinetd delete mode 100644 meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb delete mode 100644 meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch delete mode 100644 meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/tftp.conf delete mode 100644 meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb
diff --git a/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/0001-ftp-include-sys-types.h-for-u_long.patch b/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/0001-ftp-include-sys-types.h-for-u_long.patch deleted file mode 100644 index 2cd639ee92..0000000000 --- a/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/0001-ftp-include-sys-types.h-for-u_long.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 2ee0c51d81a0a08d64b64ab624074e5f7cd9615a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.k...@gmail.com> -Date: Sat, 15 Jul 2017 00:07:32 -0700 -Subject: [PATCH] ftp: include sys/types.h for u_long - -fixes -ftp.c:1091:2: error: unknown type name 'u_long'; did you mean 'long'? - u_long a1,a2,a3,a4,p1,p2; - ^~~~~~ - -Signed-off-by: Khem Raj <raj.k...@gmail.com> ---- -Upstream-Status: Pending - - ftp/ftp.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/ftp/ftp.c b/ftp/ftp.c -index 7a56af6..5dcb513 100644 ---- a/ftp/ftp.c -+++ b/ftp/ftp.c -@@ -43,6 +43,7 @@ char ftp_rcsid[] = - #include <sys/socket.h> - #include <sys/time.h> - #include <sys/file.h> -+#include <sys/types.h> - - #include <netinet/in.h> - #include <netinet/ip.h> --- -2.13.3 - diff --git a/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/Add_ARG_MAX_define.patch b/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/Add_ARG_MAX_define.patch deleted file mode 100644 index 5db004865f..0000000000 --- a/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp/Add_ARG_MAX_define.patch +++ /dev/null @@ -1,27 +0,0 @@ -This adds ARG_MAX define to be _SC_ARG_MAX - -Upstream-Status: Inappropriate [Most distros have their own verion for this fix] - -Signed-off-by: Armin Kuster <akuster...@gmail.com> - -Index: netkit-ftp-0.17/ftp/glob.c -=================================================================== ---- netkit-ftp-0.17.orig/ftp/glob.c -+++ netkit-ftp-0.17/ftp/glob.c -@@ -50,6 +50,7 @@ char glob_rcsid[] = - #include <stdio.h> - #include <stdlib.h> - #include <string.h> -+#include <unistd.h> - - #include "ftp_var.h" /* for protos only */ - #include "glob.h" -@@ -57,6 +58,9 @@ char glob_rcsid[] = - #define QUOTE 0200 - #define TRIM 0177 - #define eq(a,b) (strcmp(a, b)==0) -+#ifndef ARG_MAX -+#define ARG_MAX (sysconf(_SC_ARG_MAX)) -+#endif - #define GAVSIZ (ARG_MAX/6) - #define isdir(d) ((d.st_mode & S_IFMT) == S_IFDIR) diff --git a/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb b/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb deleted file mode 100644 index 31fdd9e4d8..0000000000 --- a/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb +++ /dev/null @@ -1,50 +0,0 @@ -DESCRIPTION = "netkit-ft includes the ftp client." -SECTION = "net" -HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit" -LICENSE = "BSD-4-Clause" - -LIC_FILES_CHKSUM = "file://ftp/ftp.c;beginline=2;endline=3;md5=2d40a75a50d83b8f6317b3f53db72bfa" - -SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-ftp/netkit-ftp_${PV}.orig.tar.gz;name=archive \ - ${DEBIAN_MIRROR}/main/n/netkit-ftp/netkit-ftp_${PV}-34.debian.tar.xz;name=patch34 \ - file://Add_ARG_MAX_define.patch \ - file://0001-ftp-include-sys-types.h-for-u_long.patch \ - " -SRC_URI[archive.sha256sum] = "61c913299b81a4671ff089aac821329f7db9bc111aa812993dd585798b700349" -SRC_URI[patch34.sha256sum] = "716b984bc6926ed98345fa4e68adcee2efcf08d0f7315d6be8ad6de76f255748" - -inherit autotools-brokensep update-alternatives - -CLEANBROKEN = "1" - -do_configure () { - ./configure --prefix=${prefix} - echo "LDFLAGS=${LDFLAGS}" >> MCONFIG -} - -BINMODE = "0755" -MANMODE = "0644" - -do_install () { - install -d ${D}${bindir} - install -d ${D}${mandir}/man1 - install -d ${D}${mandir}/man5 - - install -m${BINMODE} ${S}/ftp/ftp ${D}${bindir} - ln -sf ftp ${D}${bindir}/pftp - install -m${MANMODE} ${S}/ftp/ftp.1 ${D}${mandir}/man1 - ln -sf ftp.1 ${D}${mandir}/man1/pftp.1 - install -m${MANMODE} ${S}/ftp/netrc.5 ${D}${mandir}/man5 -} - -PACKAGES = "${PN} ${PN}-doc ${BPN}-dbg" -FILES:${PN} = "${bindir}/*" -FILES:${PN}-doc = "${mandir}" -FILES:${PN}-dbg = "${prefix}/src/debug \ - ${bindir}/.debug" - -RDEPENDS:${PN} = "readline" - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE:${PN} = "ftp" -ALTERNATIVE_LINK_NAME[ftp] = "${bindir}/ftp" diff --git a/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch b/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch deleted file mode 100644 index 508db6aadf..0000000000 --- a/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 439e3e35f7fcbff1abb782de4b19b31e43ae3449 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.k...@gmail.com> -Date: Tue, 27 Jun 2017 09:59:19 -0700 -Subject: [PATCH] rpcgen: Fix printf formats - -Fixes build with hardening flags - -Signed-off-by: Khem Raj <raj.k...@gmail.com> ---- -Upstream-Status: Pending - - rpcgen/rpc_hout.c | 2 +- - rpcgen/rpc_tblout.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/rpcgen/rpc_hout.c b/rpcgen/rpc_hout.c -index 0ef52df..09a7b57 100644 ---- a/rpcgen/rpc_hout.c -+++ b/rpcgen/rpc_hout.c -@@ -474,7 +474,7 @@ pdeclaration(const char *name, declaration *dec, int tab, - break; - } - } -- f_print(fout, separator ); -+ f_print(fout, "%s", separator ); - } - - static int -diff --git a/rpcgen/rpc_tblout.c b/rpcgen/rpc_tblout.c -index d64bfde..fd62a52 100644 ---- a/rpcgen/rpc_tblout.c -+++ b/rpcgen/rpc_tblout.c -@@ -99,7 +99,7 @@ write_table(const definition *def) - } - else { - expected = 1; -- f_print(fout, null_entry); -+ f_print(fout, "%s", null_entry); - } - for (proc = vp->procs; proc != NULL; proc = proc->next) { - current = atoi(proc->proc_num); -@@ -139,7 +139,7 @@ write_table(const definition *def) - } - - /* print the table trailer */ -- f_print(fout, tbl_end); -+ f_print(fout, "%s", tbl_end); - f_print(fout, tbl_nproc, progvers, progvers, progvers); - } - } --- -2.13.2 - diff --git a/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch b/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch deleted file mode 100644 index 83bcc4b490..0000000000 --- a/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch +++ /dev/null @@ -1,39 +0,0 @@ -This fixes an issue when building with gcc 4.x - -https://github.com/openembedded/openembedded/tree/master/recipes/netkit-rpc/netkit-rpc - -Upstream-Status: Backport - -Signed-off-by: Armin Kuster <akuster...@gmail.com> - ---- netkit-rpc-0.17/rpcgen/rpc_cout.c~gcc4 -+++ netkit-rpc-0.17/rpcgen/rpc_cout.c -@@ -101,8 +101,6 @@ - case DEF_TYPEDEF: - emit_typedef(def); - break; -- default: -- /* can't happen */ - } - print_trailer(); - } -@@ -664,9 +662,6 @@ - decl->name,decl->array_max); - emit_single_in_line(decl,flag,REL_VECTOR); - f_print(fout,"\t\t }\n\t\t };\n"); -- -- default: -- /* ?... do nothing I guess */ - } - } - ---- netkit-rpc-0.17/rpcgen/rpc_hout.c~gcc4 -+++ netkit-rpc-0.17/rpcgen/rpc_hout.c -@@ -106,8 +106,6 @@ - f_print(fout, "\n"); - pprogramdef(def); - break; -- default: -- /* ?... shouldn't happen I guess */ - } - } diff --git a/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb b/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb deleted file mode 100644 index cb05645ee8..0000000000 --- a/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb +++ /dev/null @@ -1,51 +0,0 @@ -DESCRIPTION = "netkit-rpc includes rpcinfo and rpcgen." -HOMEPAGE = "http://ftp.linux.org.uk/pub/linux/Networking/netkit" -SECTION = "net" -LICENSE = "SPL-1.0" -LIC_FILES_CHKSUM = "file://rpcinfo/rpcinfo.c;beginline=2;endline=3;md5=3e6339e3ce266e1122c5ba293e04bc89" - -DEPENDS += "libtirpc" -SRC_URI = "http://sources.openembedded.org/${BPN}-${PV}.tar.gz \ - file://gcc4.patch \ - file://0001-rpcgen-Fix-printf-formats.patch \ - " -SRC_URI[md5sum] = "67212720482ea1aea9182a98653a9642" -SRC_URI[sha256sum] = "421d63b414162237a72867061f1bd3e3752a0d962cd5d30b5e933ddad8a14d3b" - -inherit update-alternatives - -CFLAGS += "-I${STAGING_INCDIR}/tirpc" -LIBS += "-ltirpc" - -do_configure () { - ./configure --prefix=${prefix} - echo "LDFLAGS=${LDFLAGS}" > MCONFIG - echo "CC=${CC}" >> MCONFIG - echo "LD=${LD}" >> MCONFIG - echo "CFLAGS=${CFLAGS}" >> MCONFIG - echo "LDFLAGS=${LDFLAGS}" >> MCONFIG - echo "LIBS=${LIBS}" >> MCONFIG -} - -do_compile () { - oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' -} - -do_install () { - install -d ${D}${bindir} - install -d ${D}${mandir}/man1 - install -d ${D}${mandir}/man8 - - # remove strip flag - sed -i 's/install -s/install/' rpcinfo/Makefile - sed -i 's/install -s/install/' rpcgen/Makefile - - oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \ - 'DAEMONMODE=0755' 'MANMODE=0644' \ - 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \ - 'MANDIR=${mandir}' install -} -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE:${PN} = "rpcinfo" -ALTERNATIVE_LINK_NAME[rpcinfo] = "${bindir}/rpcinfo" diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch deleted file mode 100644 index 285667b869..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a7831a16c3e0e1463d5eb08a58af152cb75ca976 Mon Sep 17 00:00:00 2001 -From: Yi Zhao <yi.z...@windriver.com> -Date: Mon, 15 Apr 2019 06:05:58 +0000 -Subject: [PATCH] Fix CVE-2019-7282 and CVE-2019-7283 - -Description: Fix CVE-2018-20685 and CVE-2019-6111 -Bug-Debian: https://bugs.debian.org/920486 -Origin: https://github.com/openssh/openssh-portable/commit/6010c0303a422a9c5fa8860c061bf7105eb7f8b2#diff-9f340c228413d5a9a9206ea2ed2bc624R1114 - -Upstream-Status: Backport [Debian] -[https://sources.debian.org/src/netkit-rsh/0.17-20/debian/patches/fix-CVE-2018-20685-and-CVE-2019-6111.patch] - -CVE: CVE-2019-7282 CVE-2019-7283 - -Signed-off-by: Yi Zhao <yi.z...@windriver.com> ---- - rcp/rcp.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/rcp/rcp.c b/rcp/rcp.c -index ca61c18..77d8ff8 100644 ---- a/rcp/rcp.c -+++ b/rcp/rcp.c -@@ -740,6 +740,11 @@ sink(int argc, char *argv[]) - size = size * 10 + (*cp++ - '0'); - if (*cp++ != ' ') - SCREWUP("size not delimited"); -+ if (*cp == '\0' || strchr(cp, '/') != NULL || -+ strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { -+ error("error: unexpected filename: %s", cp); -+ exit(1); -+ } - if (targisdir) { - static char *namebuf; - static int cursize; diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch deleted file mode 100644 index 1d3631d47d..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch +++ /dev/null @@ -1,27 +0,0 @@ -fix host variable when rsh is renamed to other. - -Upstream-Status: Pending - -If rsh is renamed to other, like rsh.netkit, host variable is assigned to -rsh.netkit, which is wrong. - -Signed-off-by: Roy.Li <rongqing...@windriver.com> ---- - rsh/rsh.c | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/rsh/rsh.c b/rsh/rsh.c -index ac594f9..11f533e 100644 ---- a/rsh/rsh.c -+++ b/rsh/rsh.c -@@ -100,7 +100,6 @@ main(int argc, char *argv[]) - #else - if (!strcmp(p, "rsh")) asrsh = 1; - #endif -- else host = p; - - /* handle "rsh host flags" */ - if (!host && argc > 2 && argv[1][0] != '-') { --- -1.7.5.4 - diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fixup_wait3_api_change.patch b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fixup_wait3_api_change.patch deleted file mode 100644 index c6e2e60624..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fixup_wait3_api_change.patch +++ /dev/null @@ -1,34 +0,0 @@ -Fix build issue do to Deprecate union wait and remove support from wait functions [BZ #19613] - -| rlogin.c: In function 'catch_child': -| rlogin.c:463:13: error: storage size of 'status' isn't known -| union wait status; - -https://sourceware.org/ml/libc-alpha/2016-02/msg00342.html - -Upstream-Status: Inappropriate [ no upstream maintaner ] - -Signed-off-by: Armin Kuster <akus...@mvista.com> - -Index: netkit-rsh-0.17/rlogin/rlogin.c -=================================================================== ---- netkit-rsh-0.17.orig/rlogin/rlogin.c -+++ netkit-rsh-0.17/rlogin/rlogin.c -@@ -460,7 +460,7 @@ writeroob(int ignore) - void - catch_child(int ignore) - { -- union wait status; -+ int status; - int pid; - - (void)ignore; -@@ -471,7 +471,7 @@ catch_child(int ignore) - return; - /* if the child (reader) dies, just quit */ - if (pid < 0 || (pid == childpid && !WIFSTOPPED(status))) -- done((int)(status.w_termsig | status.w_retcode)); -+ done((int)(WTERMSIG(status) | WEXITSTATUS(status))); - } - /* NOTREACHED */ - } diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch deleted file mode 100644 index 7afd70859f..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch +++ /dev/null @@ -1,30 +0,0 @@ -make rexec support ipv6 - -Upstream-Status: Pending - -rexec equals rexec_af(... ,AF_INET) which only support ipv4, -use rexec_af(..., AF_UNSPEC) to support both ipv6 and ipv4. - -Signed-off-by: Roy.Li <rongqing...@windriver.com> ---- - rexec/rexec.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/rexec/rexec.c b/rexec/rexec.c -index 0913c02..9c8f769 100644 ---- a/rexec/rexec.c -+++ b/rexec/rexec.c -@@ -214,8 +214,8 @@ int main(int argc, char *argv[]) - passwd = getpass("Password: "); - } - -- if ( (sock = rexec(&host, port_exec, user_name, passwd, command, -- p_to_aux_sock)) < 0 ) -+ if ( (sock = rexec_af(&host, port_exec, user_name, passwd, command, -+ p_to_aux_sock, AF_UNSPEC)) < 0 ) - { - fprintf(stderr,"%s: Error in rexec system call: ",argv[0]); - perror(NULL); --- -1.7.4.1 - diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch deleted file mode 100644 index fdd535be1b..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch +++ /dev/null @@ -1,39 +0,0 @@ -netkit-rsh: -Allow to build with no PAM enabled. - -Upstream-Status: Inappropriate [ no upstream maintaner ] - -Signed-off-by: Armin Kuster <akuster...@gmail.com> - -Index: netkit-rsh-0.17/rshd/rshd.c -=================================================================== ---- netkit-rsh-0.17.orig/rshd/rshd.c -+++ netkit-rsh-0.17/rshd/rshd.c -@@ -110,9 +110,11 @@ extern char **environ; - static void error(const char *fmt, ...); - static void doit(struct sockaddr *fromp, socklen_t fromlen); - static char *getstr(char *, size_t, const char *); -+#ifdef USE_PAM - static int err_conv( - int, const struct pam_message **, struct pam_response **, void * - ); -+#endif /* USE_PAM */ - - extern int _check_rhosts_file; - -@@ -256,6 +258,7 @@ static void stderr_parent(int sock, int - } - - -+#ifdef USE_PAM - static int err_conv( - int num_msg, const struct pam_message **msg, - struct pam_response **resp, void *appdata_ptr -@@ -266,6 +269,7 @@ static int err_conv( - (void) appdata_ptr; - return PAM_CONV_ERR; - } -+#endif - - static struct passwd *doauth(const char *remuser, - const char *hostname, diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam deleted file mode 100644 index 94e5dda50b..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam +++ /dev/null @@ -1,10 +0,0 @@ -#%PAM-1.0 -# For root login to succeed here with pam_securetty, "rexec" must be -# listed in /etc/securetty. -auth required pam_nologin.so -auth required pam_env.so -auth include common-auth -account include common-account -session optional pam_keyinit.so force revoke -session include common-session -session required pam_loginuid.so diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit deleted file mode 100644 index 7354360ae7..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit +++ /dev/null @@ -1,20 +0,0 @@ -# default: off -# description: -# Rexecd is the server for the rexec program. The server provides remote -# execution facilities with authentication based on user names and -# passwords. -# -service exec -{ - socket_type = stream - protocol = tcp - flags = NAMEINARGS - wait = no - user = root - group = root - log_on_success += USERID - log_on_failure += USERID - server = /usr/sbin/tcpd - server_args = /usr/sbin/in.rexecd - disable = yes -} diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam deleted file mode 100644 index b30f139cb7..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam +++ /dev/null @@ -1,12 +0,0 @@ -#%PAM-1.0 -# For root login to succeed here with pam_securetty, "rlogin" must be -# listed in /etc/securetty. -auth required pam_nologin.so -auth required pam_securetty.so -auth required pam_env.so -auth include common-auth -account include common-account -password include common-password -session optional pam_keyinit.so force revoke -session include common-session -session required pam_loginuid.so diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit deleted file mode 100644 index 70493e603b..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit +++ /dev/null @@ -1,23 +0,0 @@ -# default: off -# description: -# Rlogind is a server for the rlogin program. The server provides remote -# execution with authentication based on privileged port numbers from trusted -# host -# -service login -{ - socket_type = stream - protocol = tcp - flags = NAMEINARGS - wait = no - user = root - group = root - log_on_success += USERID - log_on_failure += USERID - server = /usr/sbin/tcpd - server_args = /usr/sbin/in.rlogind -a - disable = yes -} - - - diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch deleted file mode 100644 index ab0b9b64bc..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch +++ /dev/null @@ -1,77 +0,0 @@ -This fixes a build issue caused by linking order. - -Upstream-Status: Inappropriate -Most distos have there own verison of this fix. This was derived by -* Fix link order to list libraries after the objects that require them -(LP: #771080). - --- Colin Watson <cjwat...@ubuntu.com> Tue, 13 Sep 2011 10:07:08 +0100 - - -Signed-off-by: Armin Kuster <akuster...@gmail.com> - -Index: netkit-rsh-0.17/rsh/Makefile -=================================================================== ---- netkit-rsh-0.17.orig/rsh/Makefile -+++ netkit-rsh-0.17/rsh/Makefile -@@ -6,7 +6,7 @@ include ../MRULES - OBJS = rsh.o - - rsh: $(OBJS) -- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ -+ $(CC) $^ -o $@ $(LDFLAGS) $(LIBS) - - install: rsh - install -o root -m$(SUIDMODE) rsh $(INSTALLROOT)$(BINDIR) -Index: netkit-rsh-0.17/rshd/Makefile -=================================================================== ---- netkit-rsh-0.17.orig/rshd/Makefile -+++ netkit-rsh-0.17/rshd/Makefile -@@ -11,7 +11,7 @@ LIBS += -ldl -lpam - endif - - rshd: $(OBJS) -- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ -+ $(CC) $^ -o $@ $(LDFLAGS) $(LIBS) - - install: rshd - install -m$(DAEMONMODE) rshd $(INSTALLROOT)$(SBINDIR)/in.rshd -Index: netkit-rsh-0.17/rlogin/Makefile -=================================================================== ---- netkit-rsh-0.17.orig/rlogin/Makefile -+++ netkit-rsh-0.17/rlogin/Makefile -@@ -7,7 +7,7 @@ PROG=rlogin - OBJS=rlogin.o - - $(PROG): $(OBJS) -- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ -+ $(CC) $^ -o $@ $(LDFLAGS) $(LIBS) - - install: $(PROG) - install -o root -m$(SUIDMODE) $(PROG) $(INSTALLROOT)$(BINDIR) -Index: netkit-rsh-0.17/rlogind/Makefile -=================================================================== ---- netkit-rsh-0.17.orig/rlogind/Makefile -+++ netkit-rsh-0.17/rlogind/Makefile -@@ -13,7 +13,7 @@ LIBS += -ldl -lpam -lpam_misc - endif - - rlogind: $(OBJS) -- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ -+ $(CC) $^ -o $@ $(LDFLAGS) $(LIBS) - - rlogind.o: pathnames.h logwtmp.h rlogind.h ../version.h - logwtmp.o: logwtmp.h -Index: netkit-rsh-0.17/rexecd/Makefile -=================================================================== ---- netkit-rsh-0.17.orig/rexecd/Makefile -+++ netkit-rsh-0.17/rexecd/Makefile -@@ -24,7 +24,7 @@ endif - CFLAGS += -DRESTRICT_FTP=1 - - rexecd: rexecd.o -- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ -+ $(CC) $^ -o $@ $(LDFLAGS) $(LIBS) - - install: rexecd - install -m$(DAEMONMODE) rexecd $(INSTALLROOT)$(SBINDIR)/in.rexecd diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam deleted file mode 100644 index 072327a76e..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam +++ /dev/null @@ -1,10 +0,0 @@ -#%PAM-1.0 -# For root login to succeed here with pam_securetty, "rsh" must be -# listed in /etc/securetty. -auth required pam_nologin.so -auth required pam_securetty.so -auth required pam_env.so -account include common-account -session optional pam_keyinit.so force revoke -session include common-session -session required pam_loginuid.so diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit deleted file mode 100644 index a842eb974f..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit +++ /dev/null @@ -1,21 +0,0 @@ -# default: off -# description: -# The rshd server is a server for the rcmd(3) routine and, -# consequently, for the rsh(1) program. The server provides -# remote execution facilities with authentication based on -# privileged port numbers from trusted hosts. -# -service shell -{ - socket_type = stream - protocol = tcp - flags = NAMEINARGS - wait = no - user = root - group = root - log_on_success += USERID - log_on_failure += USERID - server = /usr/sbin/tcpd - server_args = /usr/sbin/in.rshd -aL - disable = yes -} diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb deleted file mode 100644 index 5ea553e871..0000000000 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb +++ /dev/null @@ -1,105 +0,0 @@ -DESCRIPTION = "netkit-rsh includes the rsh daemon and client." -SECTION = "net" -HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit" -LICENSE = "BSD-4-Clause" -DEPENDS = "xinetd libgcrypt virtual/crypt" - -LIC_FILES_CHKSUM = "file://rsh/rsh.c;endline=32;md5=487b3c637bdc181d32b2a8543d41b606" - -SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}.orig.tar.gz;name=archive \ - ${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}-15.diff.gz;name=patch15 \ - file://rsh-redone_link_order_file.patch \ - file://no_pam_build_fix.patch \ - file://rexec.xinetd.netkit \ - file://rlogin.xinetd.netkit \ - file://rsh.xinetd.netkit \ - file://netkit-rsh-0.17-rexec-ipv6.patch \ - file://fix-host-variable.patch \ - file://fixup_wait3_api_change.patch \ - file://CVE-2019-7282-and-CVE-2019-7283.patch \ -" - -SRC_URI[archive.md5sum] = "65f5f28e2fe22d9ad8b17bb9a10df096" -SRC_URI[archive.sha256sum] = "edcac7fa18015f0bc04e573f3f54ae3b638d71335df1ad7dae692779914ad669" -SRC_URI[patch15.md5sum] = "655efc0d541b03ca5de0ae506c805ea3" -SRC_URI[patch15.sha256sum] = "2bc071c438e8b0ed42a0bd2db2d8b681b27a1e9b1798694d9874733293bc2aa9" - -# Other support files -PAM_SRC_URI = "file://rexec.pam \ - file://rlogin.pam \ - file://rsh.pam \ -" -SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" - -inherit pkgconfig update-alternatives - -CFLAGS += " -D_GNU_SOURCE -Wno-deprecated-declarations" -LDFLAGS += " -L${STAGING_LIBDIR} -lutil -lcrypt" - -PACKAGECONFIG ??= "" -PACKAGECONFIG:append = " ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" -PACKAGECONFIG[pam] = " , --without-pam, libpam, libpam" - -COMPATIBLE_HOST:libc-musl = 'null' - -do_configure () { - ./configure --prefix=${prefix} --exec-prefix=${exec_prefix} - echo "INSTALLROOT=${D}" > MCONFIG - - if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then - echo "USE_PAM=1" >> MCONFIG - fi - - # didn't want to patch these next changes - sed -i 's/netkit-//' ${S}/rsh/pathnames.h - sed -i 's/netkit-//' ${S}/rcp/pathnames.h -} - -do_install () { - install -d ${D}${bindir} - install -d ${D}${sbindir} - install -d ${D}${mandir}/man1 - install -d ${D}${mandir}/man8 - install -d ${D}${sysconfdir}/xinetd.d - - oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \ - 'DAEMONMODE=0755' 'MANMODE=0644' \ - 'SUIDMODE=4755' \ - 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \ - 'MANDIR=${mandir}' install - - if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then - install -d ${D}${sysconfdir}/pam.d - install -m 0644 debian/hosts.equiv ${D}/${sysconfdir} - install -m 0644 ${WORKDIR}/rexec.pam ${D}/${sysconfdir}/pam.d/rexec - install -m 0644 ${WORKDIR}/rlogin.pam ${D}/${sysconfdir}/pam.d/rlogin - install -m 0644 ${WORKDIR}/rsh.pam ${D}/${sysconfdir}/pam.d/rsh - fi - cp ${WORKDIR}/rexec.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rexec - cp ${WORKDIR}/rlogin.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rlogin - cp ${WORKDIR}/rsh.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rsh -} - -PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg" - -FILES:${PN}-client = "${bindir}/*" -FILES:${PN}-server = "${sbindir}/* ${sysconfdir}" -FILES:${PN}-doc = "${mandir}" -FILES:${PN}-dbg = "${prefix}/src/debug \ - ${sbindir}/.debug ${bindir}/.debug" - -ALTERNATIVE_PRIORITY = "80" -ALTERNATIVE:${PN}-client = "rcp rexec rlogin rsh" -ALTERNATIVE:${PN}-server = "rshd rexecd rlogind" -ALTERNATIVE_LINK_NAME[server] = "${bindir}/rshd" -ALTERNATIVE_TARGET[rshd] = "${sbindir}/in.rshd" -ALTERNATIVE_LINK_NAME[rexecd] = "${bindir}/rexecd" -ALTERNATIVE_TARGET[rexecd] = "${sbindir}/in.rexecd" -ALTERNATIVE_LINK_NAME[rlogind] = "${bindir}/rlogind" -ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind" - -RCONFLICTS:${PN}-server += "inetutils-rshd" -RPROVIDES:${PN}-server = "rshd" - -RDEPENDS:${PN}-server = "xinetd" -RDEPENDS:${PN}-server += "tcp-wrappers" diff --git a/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch b/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch deleted file mode 100644 index 3655a57162..0000000000 --- a/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 5746b68ba9dda87586b3ac88fe84031cbc0015f7 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.k...@gmail.com> -Date: Fri, 11 May 2018 12:20:03 -0700 -Subject: [PATCH] Link with libtirpc - -Signed-off-by: Khem Raj <raj.k...@gmail.com> ---- -Upstream-Status: Pending - - configure | 2 +- - rpc.rusersd/rusers_proc.c | 7 +------ - rpc.rusersd/rusersd.c | 6 +----- - rup/rup.c | 2 +- - 4 files changed, 4 insertions(+), 13 deletions(-) - ---- a/configure -+++ b/configure -@@ -92,7 +92,6 @@ else - echo -n 'Checking if C compiler works... ' - if ( - $CC __conftest.c -o __conftest || exit 1 -- ./__conftest || exit 1 - ) >/dev/null 2>&1; then - echo 'yes' - else -@@ -146,8 +145,7 @@ else - - fi - --LDFLAGS= --LIBS= -+LIBS="$LIBS -ltirpc" - - rm -f __conftest* - -@@ -172,13 +170,11 @@ int main() { - EOF - if ( - $CC $CFLAGS __conftest.c -o __conftest || exit 1 -- ./__conftest || exit 1 - ) >/dev/null 2>&1; then - echo 'yes' - else - if ( - $CC $CFLAGS -D__USE_BSD_SIGNAL __conftest.c -o __conftest || exit 1 -- ./__conftest || exit 1 - ) >/dev/null 2>&1; then - echo '-D__USE_BSD_SIGNAL' - CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL" -@@ -231,7 +227,6 @@ if ( - else - if ( - $CC $CFLAGS -D_GNU_SOURCE __conftest.c -o __conftest || exit 1 -- ./__conftest || exit 1 - ) >/dev/null 2>&1; then - echo '-D_GNU_SOURCE' - CFLAGS="$CFLAGS -D_GNU_SOURCE" -@@ -262,20 +257,17 @@ int main() { - EOF - if ( - $CC $CFLAGS __conftest.c $LIBBSD -o __conftest || exit 1 -- ./__conftest || exit 1 - ) >/dev/null 2>&1; then - echo 'ok' - else - if ( - $CC $CFLAGS __conftest.c -lsnprintf $LIBBSD -o __conftest || exit 1 -- ./__conftest || exit 1 - ) >/dev/null 2>&1; then - echo '-lsnprintf' - LIBS="$LIBS -lsnprintf" - else - if ( - $CC $CFLAGS __conftest.c -ldb $LIBBSD -o __conftest || exit 1 -- ./__conftest || exit 1 - ) >/dev/null 2>&1; then - echo '-ldb' - LIBS="$LIBS -ldb" ---- a/rpc.rusersd/rusers_proc.c -+++ b/rpc.rusersd/rusers_proc.c -@@ -57,12 +57,7 @@ char rp_rcsid[] = - #define RUT_TIME ut_time - #endif - --/* Glibc strikes again */ --#ifdef __GLIBC__ -- #include <rpcsvc/rusers.h> --#else -- #include "rusers.h" --#endif -+#include "rusers.h" - - void rusers_service(struct svc_req *rqstp, SVCXPRT *transp); - ---- a/rpc.rusersd/rusersd.c -+++ b/rpc.rusersd/rusersd.c -@@ -38,11 +38,7 @@ char rusersd_rcsid[] = - #include <rpc/pmap_clnt.h> - #include <unistd.h> - #include <grp.h> --#ifdef __GLIBC__ -- #include <rpcsvc/rusers.h> --#else -- #include "rusers.h" --#endif -+#include "rusers.h" - - #include "../version.h" - ---- a/rup/rup.c -+++ b/rup/rup.c -@@ -48,7 +48,7 @@ char rcsid[] = "$Id: rup.c,v 1.8 2000/07 - - #undef FSHIFT /* Use protocol's shift and scale values */ - #undef FSCALE --#include <rpcsvc/rstat.h> -+#include "rstat.h" - - #include "../version.h" - diff --git a/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch b/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch deleted file mode 100644 index d85178d714..0000000000 --- a/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch +++ /dev/null @@ -1,30 +0,0 @@ -From c23cc112a480f90950de5cf1de09b1a7e732bf21 Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.y...@windriver.com> -Date: Mon, 15 Dec 2014 18:31:13 -0800 -Subject: [PATCH] rpc.rusersd/Makefile: fix parallel build issue - -Fixed: -rusers.x: No such file or directory -Makefile:44: recipe for target 'rusers_xdr.c' failed - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <liezhi.y...@windriver.com> ---- - rpc.rusersd/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/rpc.rusersd/Makefile b/rpc.rusersd/Makefile -index 792f528..65a424a 100644 ---- a/rpc.rusersd/Makefile -+++ b/rpc.rusersd/Makefile -@@ -40,5 +40,5 @@ rusers.x: - rusers.h: $(RUSERSX) rusers.x - $(RPCGEN) -h -o rusers.h rusers.x - --rusers_xdr.c: $(RUSERSX) -+rusers_xdr.c: $(RUSERSX) rusers.x - $(RPCGEN) -c -C -o rusers_xdr.c rusers.x --- -1.7.9.5 - diff --git a/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb b/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb deleted file mode 100644 index c45cbcd925..0000000000 --- a/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb +++ /dev/null @@ -1,72 +0,0 @@ -DESCRIPTION = "netkit-rusers includes rusers - Displays who is logged in to machines on local network \ - rusersd - Logged in users server" -HOMEPAGE = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit" -SECTION = "net" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://rusers/rusers.c;beginline=2;endline=3;md5=f4fc634a4ce8c569911196b72b10770e" -DEPENDS = " tcp-wrappers libtirpc rpcbind rpcsvc-proto rpcsvc-proto-native" - -SRC_URI = "http://http.debian.net/debian/pool/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz;name=archive \ - http://http.debian.net/debian/pool/main/n/${BPN}/${BPN}_${PV}-8.diff.gz;name=patch8 \ - file://rpc.rusersd-Makefile-fix-parallel-build-issue.patch \ - file://0001-Link-with-libtirpc.patch \ -" - -SRC_URI[archive.md5sum] = "dc99a80b9fde2ab427c874f88f1c1602" -SRC_URI[archive.sha256sum] = "f00138651865ad2dcfec5dedda0cda403cb80c4ab68efcc3bbccafe198c24b6d" -SRC_URI[patch8.md5sum] = "1ff498113e0f920d92088092e5570bdc" -SRC_URI[patch8.sha256sum] = "14882dbdda4e37baa84d55b54b46c7e063a20fc9e04d1be1a2807643cd0f3067" - -CFLAGS += "-I${STAGING_INCDIR}/tirpc" - -EXTRA_OEMAKE = "RUSERSX=${STAGING_INCDIR}/rpcsvc/rusers.x" - -do_configure () { - ./configure --prefix=${prefix} --installroot=${D} --with-c-compiler="${CC}" -} - -do_install () { - install -d ${D}${bindir} - install -d ${D}${sbindir} - install -d ${D}${mandir}/man1 - install -d ${D}${mandir}/man8 - install -d ${D}${sysconfdir}/xinetd.d - - sed -i 's/install -s/install/' rusers/Makefile - sed -i 's/install -s/install/' rup/Makefile - sed -i 's/install -s/install/' rpc.rusersd/Makefile - - oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \ - 'DAEMONMODE=0755' 'MANMODE=0644' \ - 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \ - 'MANDIR=${mandir}' install - - # create the xinetd config file - cat >rusersd.conf <<EOF - service rusersd - { - disable = yes - type = RPC - rpc_version = 1-2 - socket_type = dgram - protocol = udp - wait = yes - user = root - server = ${sbindir}/rpc.rusersd - } -EOF - install rusersd.conf ${D}/${sysconfdir}/xinetd.d/rusersd -} - -PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg" -FILES:${PN}-client = "${bindir}/*" -FILES:${PN}-server = "${sbindir}/* ${sysconfdir}" -FILES:${PN}-doc = "${mandir}" -FILES:${PN}-dbg = "${prefix}/src/debug \ - ${bindir}/.debug ${sbindir}/.debug" - -RDEPENDS:${PN}-server += "tcp-wrappers xinetd rpcbind" - -# http://errors.yoctoproject.org/Errors/Details/186962/ -COMPATIBLE_HOST:libc-musl = 'null' -SKIP_RECIPE[netkit-rusers] ?= "Fails to build rup.c:51:10: fatal error: rstat.h: No such file or directory" diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch deleted file mode 100644 index b1325b3173..0000000000 --- a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 55ab6f1389261edff5f4c942bc3b0d8e695856d7 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.k...@gmail.com> -Date: Wed, 30 Aug 2017 18:11:33 -0700 -Subject: [PATCH 1/2] Add missing include path to -I options - -Fixes errors like -| rwho.c:52:10: fatal error: 'protocols/rwhod.h' file not found -| #include <protocols/rwhod.h> -| ^~~~~~~~~~~~~~~~~~~ - -Signed-off-by: Khem Raj <raj.k...@gmail.com> ---- -Upstream-Status: Pending - - rwho/Makefile | 1 + - rwhod/Makefile | 2 ++ - 2 files changed, 3 insertions(+) - -diff --git a/rwho/Makefile b/rwho/Makefile -index 6f86388..67b28d4 100644 ---- a/rwho/Makefile -+++ b/rwho/Makefile -@@ -6,6 +6,7 @@ include ../MRULES - rwho: rwho.o - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ - -+CFLAGS += -I../include - rwho.o: ../version.h - - install: rwho -diff --git a/rwhod/Makefile b/rwhod/Makefile -index 772b641..9034218 100644 ---- a/rwhod/Makefile -+++ b/rwhod/Makefile -@@ -7,6 +7,8 @@ ifneq ($(USE_GLIBC),1) - CFLAGS += -D_GNU_SOURCE - endif - -+CFLAGS += -I../include -+ - OBJS = rwhod.o - - rwhod: $(OBJS) --- -2.14.1 - diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch deleted file mode 100644 index 349a1351fe..0000000000 --- a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 2108213242638fa355f662382f55495d91301858 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.k...@gmail.com> -Date: Wed, 30 Aug 2017 18:13:17 -0700 -Subject: [PATCH 2/2] Fix build issues found with musl - -Signed-off-by: Khem Raj <raj.k...@gmail.com> ---- -Upstream-Status: Pending - - ruptime/ruptime.c | 1 + - rwho/rwho.c | 1 + - rwhod/rwhod.c | 5 +++-- - 3 files changed, 5 insertions(+), 2 deletions(-) - ---- a/ruptime/ruptime.c -+++ b/ruptime/ruptime.c -@@ -53,6 +53,7 @@ char ruptime_rcsid[] = - #include <string.h> - #include <errno.h> - #include <time.h> -+#include <fcntl.h> - - struct hs { - char hs_hostname[MAXHOSTNAMELEN]; ---- a/rwho/rwho.c -+++ b/rwho/rwho.c -@@ -49,6 +49,7 @@ char rcsid[] = "$Id: rwho.c,v 1.7 1999/0 - #include <assert.h> - #include <stdio.h> - #include <time.h> -+#include <fcntl.h> - #include <protocols/rwhod.h> - - #include "../version.h" ---- a/rwhod/rwhod.c -+++ b/rwhod/rwhod.c -@@ -76,6 +76,7 @@ char rcsid[] = - #include <grp.h> - #include <time.h> - #include <stdint.h> -+#include <fcntl.h> - - #include "../version.h" - -@@ -102,7 +103,7 @@ struct nlist nl[] = { - static void broadcaster(void); - static int configure(int s); - static int verify(const char *name); --#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2) -+#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)) - static int getloadavg(double ptr[3], int n); - #endif - -@@ -549,7 +550,7 @@ sendpacket(struct whod *wd) - } - } - --#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2) -+#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)) - /* - * Taken from: - * ---- a/include/protocols/rwhod.h -+++ b/include/protocols/rwhod.h -@@ -37,6 +37,7 @@ - #ifndef _RWHOD_H_ - #define _RWHOD_H_ - -+#include <stdint.h> - /* - * rwho protocol packet format. - */ diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod deleted file mode 100755 index f6419032e8..0000000000 --- a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh - -### BEGIN INIT INFO -# Provides: rwhod -# Required-Start: $network $remote_fs $syslog -# Required-Stop: $network $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Server for rwho and ruptime services -### END INIT INFO - -PATH=/sbin:/bin:/usr/bin:/usr/sbin - -DAEMON=/usr/sbin/rwhod -PIDFILE=/var/run/rwhod.pid -CONF_FILE="/etc/default/rwhod" -DESC="Who daemon " -# default options. Change them in /etc/default/rwhod -RWHOD_OPTIONS="-b" - -# rwhod init.d script for ntpdc from ntp.isc.org -test -f $DAEMON || exit 0 - -# Source function library. -. /etc/init.d/functions - -[ -r $CONF_FILE ] && . $CONF_FILE - -startdaemon(){ - echo -n "Starting $DESC" " rwhod " - start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON -- $RWHOD_OPTIONS - echo "done" -} -stopdaemon(){ - echo -n "Stopping $DESC" " rwhod " - start-stop-daemon --stop --quiet --oknodo --exec $DAEMON - echo "done" -} - -case "$1" in - start) - startdaemon - ;; - stop) - stopdaemon - ;; - force-reload) - stopdaemon - startdaemon - ;; - restart) - stopdaemon - sleep 1 - startdaemon - ;; - reload) - stopdaemon - sleep 1 - startdaemon - ;; - status) - status /usr/sbin/rwhod; - exit $? - ;; - *) - echo "Usage: rwhod { start | stop | status | restart | reload }" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default deleted file mode 100644 index 62d3a942d0..0000000000 --- a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default +++ /dev/null @@ -1,2 +0,0 @@ -#Options for the rwhod daemon. -RWHOD_OPTIONS="-b" diff --git a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb deleted file mode 100644 index 51168f958e..0000000000 --- a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb +++ /dev/null @@ -1,108 +0,0 @@ -DESCRIPTION = "netkit-rwho includes, ruptime rwho and rwhod (Daemon to maintain data for rwho/ruptime)" -HOMEPAGE = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit" -SECTION = "net" -LICENSE = "BSD-4-Clause" -LIC_FILES_CHKSUM = "file://rwho/rwho.c;beginline=2;endline=3;md5=5a85f13c0142d72fc378e00f15da5b9e" - -SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}.orig.tar.gz;name=archive \ - ${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}-13.debian.tar.gz;subdir=${BP};name=patch13 \ - file://rwhod \ - file://rwhod.default \ - file://0001-Add-missing-include-path-to-I-options.patch \ - file://0002-Fix-build-issues-found-with-musl.patch \ - " -SRC_URI[archive.md5sum] = "0f71620d45d472f89134ba0d74242e75" -SRC_URI[archive.sha256sum] = "0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7" -SRC_URI[patch13.md5sum] = "82ed5a3c6b0bbf00b36508b9787963b9" -SRC_URI[patch13.sha256sum] = "53aefa27d98b565bf756db57120c03bd224a238e45699d92076420272a6eba8e" - -inherit autotools-brokensep useradd update-rc.d update-alternatives - -CFLAGS += " -D_GNU_SOURCE" - -# Unlike other Debian packages, net-tools *.diff.gz contains another series of -# patches maintained by quilt. So manually apply them before applying other local -# patches. Also remove all temp files before leaving, because do_patch() will pop -# up all previously applied patches in the start -do_patch[depends] += "quilt-native:do_populate_sysroot" -netkit_do_patch() { - cd ${S} - # it's important that we only pop the existing patches when they've - # been applied, otherwise quilt will climb the directory tree - # and reverse out some completely different set of patches - if [ -d ${S}/patches ]; then - # whilst this is the default directory, doing it like this - # defeats the directory climbing that quilt will otherwise - # do; note the directory must exist to defeat this, hence - # the test inside which we operate - QUILT_PATCHES=${S}/patches quilt pop -a - fi - if [ -d ${S}/.pc-${BPN} ]; then - rm -rf ${S}/.pc - mv ${S}/.pc-${BPN} ${S}/.pc - QUILT_PATCHES=${S}/debian/patches quilt pop -a - rm -rf ${S}/.pc ${S}/debian - fi - QUILT_PATCHES=${S}/debian/patches quilt push -a - mv ${S}/.pc ${S}/.pc-${BPN} -} - -do_unpack[cleandirs] += "${S}" - -python do_patch() { - bb.build.exec_func('netkit_do_patch', d) - bb.build.exec_func('patch_do_patch', d) -} - -do_configure () { - ./configure --prefix=${prefix} - echo "LDFLAGS=${LDFLAGS}" >> MCONFIG -} - -do_install () { - # rwho & ruptime - install -d ${D}${bindir} - install -d ${D}${mandir}/man1 - #rwhod - install -d ${D}${sbindir} - install -d ${D}${mandir}/man8 - install -d ${D}${sysconfdir}/init.d - install -d ${D}${sysconfdir}/default - sed -i 's/install -s/install/' rwho/Makefile - sed -i 's/install -s/install/' ruptime/Makefile - sed -i 's/install -s/install/' rwhod/Makefile - oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \ - 'DAEMONMODE=0755' 'MANMODE=0644' \ - 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \ - 'MANDIR=${mandir}' install - - install -m 0644 ${WORKDIR}/rwhod.default ${D}${sysconfdir}/default/rwhod - install -m 755 ${WORKDIR}/rwhod ${D}${sysconfdir}/init.d - - mkdir -p -m 755 ${D}${localstatedir}/spool/rwho - chown -R rwhod ${D}${localstatedir}/spool/rwho -} -pkg_postinst_ontarget:${PN}-server() { - ${sysconfdir}/init.d/rwhod start -} - -pkg_postrm:${PN}-server() { - ${sysconfdir}/init.d/rwhod stop -} - -INITSCRIPT_NAME = "rwhod" -INITSCRIPT_PARAM = "defaults 85 15" - -USERADD_PACKAGES = "${PN}-server" -GROUPADD_PARAM:${PN}-server = "--system rwhod" -USERADD_PARAM:${PN}-server = "--system -g rwhod --home-dir ${localstatedir}/spool/rwho \ - --no-create-home --shell /bin/false rwhod" - -INSANE_SKIP:${PN} = "already-stripped" - -PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg" -FILES:${PN}-client = "${bindir}/*" -FILES:${PN}-server = "${sbindir}/* ${localstatedir} ${sysconfdir}/default/* ${sysconfdir}/init.d/*" -FILES:${PN}-doc = "${mandir}" -FILES:${PN}-dbg = "${prefix}/src/debug \ - ${bindir}/.debug ${sbindir}/.debug" diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/0001-Drop-using-register-keyword.patch b/meta-networking/recipes-netkit/netkit-telnet/files/0001-Drop-using-register-keyword.patch deleted file mode 100644 index f508711d34..0000000000 --- a/meta-networking/recipes-netkit/netkit-telnet/files/0001-Drop-using-register-keyword.patch +++ /dev/null @@ -1,457 +0,0 @@ -From af89f36fbeb5f6a078b349eed8fc4ad6fbfdf5d1 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.k...@gmail.com> -Date: Mon, 16 Jan 2023 15:26:12 -0800 -Subject: [PATCH] Drop using register keyword - -Its gone since c++17 - -Fixes -error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] -| register char c; -| ^~~~~~~~~ - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.k...@gmail.com> ---- - telnet/commands.cc | 14 +++++++------- - telnet/defines.h | 1 + - telnet/sys_bsd.cc | 2 +- - telnet/telnet.cc | 18 +++++++++--------- - telnet/terminal.cc | 4 ++-- - telnet/tn3270.cc | 4 ++-- - telnet/tn3270.o | Bin 4008 -> 4008 bytes - telnet/utilities.cc | 6 +++--- - telnetd/setproctitle.c | 6 +++--- - telnetd/slc.c | 4 ++-- - telnetd/state.c | 12 ++++++------ - telnetd/sys_term.c | 4 ++-- - telnetd/telnetd.c | 4 ++-- - telnetd/termstat.c | 4 ++-- - telnetd/utility.c | 16 ++++++++-------- - 15 files changed, 50 insertions(+), 49 deletions(-) - ---- a/telnet/commands.cc -+++ b/telnet/commands.cc -@@ -192,8 +192,8 @@ static int margc; - static const char *margv[20]; - - static void makeargv(void) { -- register char *cp, *cp2, c; -- register const char **argp = margv; -+ char *cp, *cp2, c; -+ const char **argp = margv; - - margc = 0; - cp = line; -@@ -204,7 +204,7 @@ static void makeargv(void) { - cp++; - } - while ((c = *cp)!=0) { -- register int inquote = 0; -+ int inquote = 0; - while (isspace(c)) - c = *++cp; - if (c == '\0') -@@ -281,7 +281,7 @@ static const char *control(cc_t c) - * was to assign "c" to an unsigned int variable... - * Arggg.... - */ -- register unsigned int uic = (unsigned int)c; -+ unsigned int uic = (unsigned int)c; - - if (uic == 0x7f) - return ("^?"); -@@ -479,7 +479,7 @@ int send_tncmd(int (*func)(int, int), co - long opt; - - if (isprefix(name, "help") || isprefix(name, "?")) { -- register int col, len; -+ int col, len; - - printf("Usage: send %s <option>\n", cmd); - printf("Valid options are:\n\t"); -@@ -2212,8 +2212,8 @@ static unsigned long sourceroute(char *a - static char lsr[44]; - char *cp, *cp2, *lsrp, *lsrep; - struct in_addr sin_addr; -- register struct hostent *host = 0; -- register char c; -+ struct hostent *host = 0; -+ char c; - - /* - * Verify the arguments, and make sure we have ---- a/telnet/defines.h -+++ b/telnet/defines.h -@@ -52,3 +52,4 @@ - #define CONTROL(x) ((x)&0x1f) /* CTRL(x) is not portable */ - - #define MODE_OUT8 0x8000 /* binary mode sans -opost */ -+ ---- a/telnet/sys_bsd.cc -+++ b/telnet/sys_bsd.cc -@@ -285,7 +285,7 @@ void sys_telnet_init(void) { - int process_rings(int netin, int netout, int netex, int ttyin, int ttyout, - int poll /* If 0, then block until something to do */) - { -- register int c, maxfd; -+ int c, maxfd; - /* One wants to be a bit careful about setting returnValue - * to one, since a one implies we did some useful work, - * and therefore probably won't be called to block next ---- a/telnet/telnet.cc -+++ b/telnet/telnet.cc -@@ -864,7 +864,7 @@ struct spc { - static int slc_mode = SLC_EXPORT; - - void slc_init(void) { -- register struct spc *spcp; -+ struct spc *spcp; - - localchars = 1; - for (spcp = spc_data; spcp < &spc_data[NSLC+1]; spcp++) { -@@ -944,7 +944,7 @@ void slc_import(int def) { - } - - void slc_export(void) { -- register struct spc *spcp; -+ struct spc *spcp; - - TerminalDefaultChars(); - -@@ -966,8 +966,8 @@ void slc_export(void) { - } - - void slc(unsigned char *cp, int len) { -- register struct spc *spcp; -- register int func,level; -+ struct spc *spcp; -+ int func,level; - - slc_start_reply(); - -@@ -1032,7 +1032,7 @@ void slc(unsigned char *cp, int len) { - } - - void slc_check(void) { -- register struct spc *spcp; -+ struct spc *spcp; - - slc_start_reply(); - for (spcp = &spc_data[1]; spcp < &spc_data[NSLC+1]; spcp++) { -@@ -1080,7 +1080,7 @@ void slc_add_reply(int func, int flags, - } - - void slc_end_reply(void) { -- register int len; -+ int len; - - *slc_replyp++ = IAC; - *slc_replyp++ = SE; -@@ -1200,7 +1200,7 @@ void env_opt_add(const char *ep) { - tp = opt_replyp + (vp ? strlen(vp) * 2 : 0) + strlen(ep) * 2 + 6; - if (tp > opt_replyend) - { -- register int len; -+ int len; - len = ((tp - opt_reply) + OPT_REPLY_SIZE - 1) & ~(OPT_REPLY_SIZE - 1); - opt_replyend = opt_reply + len; - opt_reply = (unsigned char *)realloc(opt_reply, len); -@@ -1236,7 +1236,7 @@ void env_opt_add(const char *ep) { - } - - void env_opt_end(int emptyok) { -- register int len; -+ int len; - - len = opt_replyp - opt_reply + 2; - if (emptyok || len > 6) { -@@ -1874,7 +1874,7 @@ static unsigned char *nextitem(unsigned - - static void netclear(void) { - #if 0 /* XXX */ -- register char *thisitem, *next; -+ char *thisitem, *next; - char *good; - #define wewant(p) ((nfrontp > p) && (*p == IAC) && \ - (p[1] != EC) && (p[1] != EL)) ---- a/telnet/terminal.cc -+++ b/telnet/terminal.cc -@@ -569,8 +569,8 @@ struct termspeeds { - }; - - void TerminalSpeeds(long *ispeed, long *ospeed) { -- register struct termspeeds *tp; -- register long in, out; -+ struct termspeeds *tp; -+ long in, out; - - out = cfgetospeed(&old_tc); - in = cfgetispeed(&old_tc); ---- a/telnet/tn3270.cc -+++ b/telnet/tn3270.cc -@@ -103,7 +103,7 @@ void init_3270(void) { - * done: is this the last of a logical block - */ - int DataToNetwork(char *buffer, int count, int done) { -- register int loop, c; -+ int loop, c; - int origCount; - - origCount = count; -@@ -179,7 +179,7 @@ void outputPurge(void) { - * count: how much to send - */ - int DataToTerminal(char *buffer, int count) { -- register int c; -+ int c; - int origCount; - - origCount = count; ---- a/telnet/utilities.cc -+++ b/telnet/utilities.cc -@@ -252,7 +252,7 @@ void optionstatus(void) { - /* pointer: where suboption data sits */ - /* length: length of suboption data */ - void printsub(int direction, unsigned char *pointer, int length) { -- register int i = 0; -+ int i = 0; - - extern int want_status_response; - -@@ -262,7 +262,7 @@ void printsub(int direction, unsigned ch - fprintf(NetTrace, "%s IAC SB ", - (direction == '<')? "RCVD":"SENT"); - if (length >= 3) { -- register int j; -+ int j; - - i = pointer[length-2]; - j = pointer[length-1]; -@@ -577,7 +577,7 @@ void printsub(int direction, unsigned ch - fprintf(NetTrace, "INFO "); - env_common: - { -- register int noquote = 2; -+ int noquote = 2; - for (i = 2; i < length; i++ ) { - switch (pointer[i]) { - case ENV_VAR: ---- a/telnetd/setproctitle.c -+++ b/telnetd/setproctitle.c -@@ -76,7 +76,7 @@ static char Argv0[128]; /* program nam - void - initsetproctitle(int argc, char **argv, char **envp) - { -- register int i; -+ int i; - char *tmp; - - /* -@@ -111,8 +111,8 @@ initsetproctitle(int argc, char **argv, - void - setproctitle(const char *fmt, ...) - { -- register char *p; -- register int i=0; -+ char *p; -+ int i=0; - static char buf[2048]; - va_list ap; - ---- a/telnetd/slc.c -+++ b/telnetd/slc.c -@@ -196,7 +196,7 @@ int end_slc(unsigned char **bufp) { - * Figure out what to do about the client's slc - */ - void process_slc(unsigned char func, unsigned char flag, cc_t val) { -- register int hislevel, mylevel, ack; -+ int hislevel, mylevel, ack; - - /* - * Ensure that we know something about this function -@@ -260,7 +260,7 @@ void process_slc(unsigned char func, uns - * Compare client's request with what we are capable of supporting. - */ - void change_slc(char func, char flag, cc_t val) { -- register int hislevel, mylevel; -+ int hislevel, mylevel; - - hislevel = flag & SLC_LEVELBITS; - mylevel = slctab[func].defset.flag & SLC_LEVELBITS; ---- a/telnetd/state.c -+++ b/telnetd/state.c -@@ -79,7 +79,7 @@ unsigned char subbuffer[512], *subpointe - #define TS_DONT 8 /* dont " */ - - void telrcv(void) { -- register int c; -+ int c; - static int state = TS_DATA; - - while (ncc > 0) { -@@ -1081,7 +1081,7 @@ void suboption(void) { - - #ifdef LINEMODE - case TELOPT_LINEMODE: { -- register int request; -+ int request; - - if (his_state_is_wont(TELOPT_LINEMODE)) /* Ignore if option disabled */ - break; -@@ -1158,8 +1158,8 @@ void suboption(void) { - } /* end of case TELOPT_XDISPLOC */ - - case TELOPT_ENVIRON: { -- register int c; -- register char *cp, *varp, *valp; -+ int c; -+ char *cp, *varp, *valp; - - if (SB_EOF()) - return; -@@ -1299,8 +1299,8 @@ static void doclientstat(void) { - - void send_status(void) { - unsigned char statusbuf[256]; -- register unsigned char *ncp; -- register unsigned char i; -+ unsigned char *ncp; -+ unsigned char i; - - ncp = statusbuf; - ---- a/telnetd/sys_term.c -+++ b/telnetd/sys_term.c -@@ -413,7 +413,7 @@ extern int def_tspeed, def_rspeed; - - static int getptyslave(void) { - #if 0 -- register int t = -1; -+ int t = -1; - - # ifdef LINEMODE - int waslm; -@@ -505,7 +505,7 @@ static int getptyslave(void) { - * making sure that we have a clean tty. - */ - static int cleanopen(char *lyne) { -- register int t; -+ int t; - - /* - * Make sure that other people can't open the ---- a/telnetd/telnetd.c -+++ b/telnetd/telnetd.c -@@ -93,7 +93,7 @@ main(int argc, char *argv[], char *env[] - struct sockaddr_in from; - int on = 1; - socklen_t fromlen; -- register int ch; -+ int ch; - - #if defined(HAS_IPPROTO_IP) && defined(IP_TOS) - int tos = -1; -@@ -837,7 +837,7 @@ void telnet(int f, int p) - - #ifdef TIOCNOTTY - { -- register int t; -+ int t; - t = open(_PATH_TTY, O_RDWR); - if (t >= 0) { - (void) ioctl(t, TIOCNOTTY, (char *)0); ---- a/telnetd/termstat.c -+++ b/telnetd/termstat.c -@@ -347,7 +347,7 @@ done: - * at a time, and if using kludge linemode, then only linemode may be - * affected. - */ --void clientstat(register int code, register int parm1, register int parm2) -+void clientstat(int code, register int parm1, register int parm2) - { - /* - * Get a copy of terminal characteristics. -@@ -419,7 +419,7 @@ void clientstat(register int code, regis - - case LM_MODE: - { -- register int ack, changed; -+ int ack, changed; - - /* - * Client has sent along a mode mask. If it agrees with ---- a/telnetd/utility.c -+++ b/telnetd/utility.c -@@ -189,7 +189,7 @@ nextitem(char *current, const char *endp - return current+3 <= endp ? current+3 : NULL; - case SB: /* loop forever looking for the SE */ - { -- register char *look = current+2; -+ char *look = current+2; - - while (look < endp) { - if ((*look++&0xff) == IAC) { -@@ -224,7 +224,7 @@ nextitem(char *current, const char *endp - */ - void netclear(void) - { -- register char *thisitem, *next; -+ char *thisitem, *next; - char *good; - #define wewant(p) ((nfrontp > p) && ((*p&0xff) == IAC) && \ - (nfrontp > p+1 && (((*(p+1)&0xff) != EC) && ((*(p+1)&0xff) != EL)))) -@@ -354,7 +354,7 @@ netflush(void) - * ptr - A pointer to a character string to write - * len - How many bytes to write - */ --void writenet(register unsigned char *ptr, register int len) -+void writenet(unsigned char *ptr, register int len) - { - /* flush buffer if no room for new data) */ - if ((&netobuf[BUFSIZ] - nfrontp) < len) { -@@ -589,7 +589,7 @@ printoption(const char *fmt, int option) - void - printsub(char direction, unsigned char *pointer, int length) - { -- register int i = -1; -+ int i = -1; - #ifdef AUTHENTICATE - char buf[512]; - #endif -@@ -601,7 +601,7 @@ printsub(char direction, unsigned char * - netoprintf("td: %s suboption ", - direction == '<' ? "recv" : "send"); - if (length >= 3) { -- register int j; -+ int j; - - i = pointer[length-2]; - j = pointer[length-1]; -@@ -817,7 +817,7 @@ printsub(char direction, unsigned char * - - case TELOPT_STATUS: { - const char *cp; -- register int j, k; -+ int j, k; - - netoprintf("STATUS"); - -@@ -914,7 +914,7 @@ printsub(char direction, unsigned char * - netoprintf("INFO "); - env_common: - { -- register int noquote = 2; -+ int noquote = 2; - for (i = 2; i < length; i++ ) { - switch (pointer[i]) { - case ENV_VAR: -@@ -1125,7 +1125,7 @@ printsub(char direction, unsigned char * - void - printdata(const char *tag, const char *ptr, int cnt) - { -- register int i; -+ int i; - char xbuf[30]; - - while (cnt) { diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-deadlock-on-cleanup.patch b/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-deadlock-on-cleanup.patch deleted file mode 100644 index afcc66dada..0000000000 --- a/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-deadlock-on-cleanup.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 06ed6a6bf25a22902846097d6b6c97e070c2c326 Mon Sep 17 00:00:00 2001 -From: Seiichi Ishitsuka <ishitsuka...@ncos.nec.co.jp> -Date: Fri, 1 Jun 2018 14:27:35 +0900 -Subject: [PATCH] telnetd: Fix deadlock on cleanup - -The cleanup function in telnetd is called both directly and on SIGCHLD -signals. This, unfortunately, triggered a deadlock in eglibc 2.9 while -running on a 2.6.31.11 kernel. - -What we were seeing is hangs like these: - - (gdb) bt - #0 0xb7702424 in __kernel_vsyscall () - #1 0xb7658e61 in __lll_lock_wait_private () from ./lib/libc.so.6 - #2 0xb767e7b5 in _L_lock_15 () from ./lib/libc.so.6 - #3 0xb767e6e0 in utmpname () from ./lib/libc.so.6 - #4 0xb76bcde7 in logout () from ./lib/libutil.so.1 - #5 0x0804c827 in cleanup () - #6 <signal handler called> - #7 0xb7702424 in __kernel_vsyscall () - #8 0xb7641003 in __fcntl_nocancel () from ./lib/libc.so.6 - #9 0xb767e0c3 in getutline_r_file () from ./lib/libc.so.6 - #10 0xb767d675 in getutline_r () from ./lib/libc.so.6 - #11 0xb76bce42 in logout () from ./lib/libutil.so.1 - #12 0x0804c827 in cleanup () - #13 0x0804a0b5 in telnet () - #14 0x0804a9c3 in main () - -and what has happened here is that the user closes the telnet session -via the escape character. This causes telnetd to call cleanup in frame -the SIGCHLD signal is delivered while telnetd is executing cleanup. - -Telnetd then calls the signal handler for SIGCHLD, which is cleanup(). -Ouch. The actual deadlock is in libc. getutline_r in frame #10 gets the -__libc_utmp_lock lock, and utmpname above does the same thing in frame - -The fix registers the SIGCHLD handler as cleanup_sighandler, and makes -cleanup disable the SIGCHLD signal before calling cleanup_sighandler. - -Signed-off-by: Simon Kagstrom <simon.kagst...@netinsight.net> - -The patch was imported from the Ubuntu netkit-telnet package. -(https://bugs.launchpad.net/ubuntu/+source/netkit-telnet/+bug/507455) - -A previous patch declaring attributes of functions, but it is not used -in upstream. - -Signed-off-by: Seiichi Ishitsuka <ishitsuka...@ncos.nec.co.jp> ---- -Upstream-Status: Pending - - telnetd/ext.h | 1 + - telnetd/sys_term.c | 17 ++++++++++++++++- - telnetd/telnetd.c | 2 +- - 3 files changed, 18 insertions(+), 2 deletions(-) - -diff --git a/telnetd/ext.h b/telnetd/ext.h -index b98d6ec..08f9d07 100644 ---- a/telnetd/ext.h -+++ b/telnetd/ext.h -@@ -97,6 +97,7 @@ void add_slc(int, int, int); - void check_slc(void); - void change_slc(int, int, int); - void cleanup(int); -+void cleanup_sighandler(int); - void clientstat(int, int, int); - void copy_termbuf(char *, int); - void deferslc(void); -diff --git a/telnetd/sys_term.c b/telnetd/sys_term.c -index 5b4aa84..c4fb0f7 100644 ---- a/telnetd/sys_term.c -+++ b/telnetd/sys_term.c -@@ -719,7 +719,7 @@ static void addarg(struct argv_stuff *avs, const char *val) { - * This is the routine to call when we are all through, to - * clean up anything that needs to be cleaned up. - */ --void cleanup(int sig) { -+void cleanup_sighandler(int sig) { - char *p; - (void)sig; - -@@ -742,3 +742,18 @@ void cleanup(int sig) { - shutdown(net, 2); - exit(0); - } -+ -+void cleanup(int sig) { -+ sigset_t mask, oldmask; -+ -+ /* Set up the mask of signals to temporarily block. */ -+ sigemptyset (&mask); -+ sigaddset (&mask, SIGCHLD); -+ -+ /* Block SIGCHLD while running cleanup */ -+ sigprocmask (SIG_BLOCK, &mask, &oldmask); -+ -+ cleanup_sighandler(sig); -+ /* Technically not needed since cleanup_sighandler exits */ -+ sigprocmask (SIG_UNBLOCK, &mask, NULL); -+} -diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c -index 9ace838..788919c 100644 ---- a/telnetd/telnetd.c -+++ b/telnetd/telnetd.c -@@ -833,7 +833,7 @@ void telnet(int f, int p) - signal(SIGTTOU, SIG_IGN); - #endif - -- signal(SIGCHLD, cleanup); -+ signal(SIGCHLD, cleanup_sighandler); - - #ifdef TIOCNOTTY - { --- -2.7.4 - diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch b/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch deleted file mode 100644 index 755b882b67..0000000000 --- a/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 7a3095d1e9b7c73f9dca56250f433bcfc7cb660e Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.k...@gmail.com> -Date: Tue, 27 Jun 2017 10:15:34 -0700 -Subject: [PATCH] telnet/telnetd: Fix print format strings - -Fixes build with hardening flags - -Signed-off-by: Khem Raj <raj.k...@gmail.com> ---- -Upstream-Status: Pending - - telnet/utilities.cc | 6 +++--- - telnetd/utility.c | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/telnet/utilities.cc b/telnet/utilities.cc -index 66839ab..36f0731 100644 ---- a/telnet/utilities.cc -+++ b/telnet/utilities.cc -@@ -583,17 +583,17 @@ void printsub(int direction, unsigned char *pointer, int length) { - case ENV_VAR: - if (pointer[1] == TELQUAL_SEND) - goto def_case; -- fprintf(NetTrace, "\" VAR " + noquote); -+ fprintf(NetTrace, "%s", "\" VAR " + noquote); - noquote = 2; - break; - - case ENV_VALUE: -- fprintf(NetTrace, "\" VALUE " + noquote); -+ fprintf(NetTrace, "%s", "\" VALUE " + noquote); - noquote = 2; - break; - - case ENV_ESC: -- fprintf(NetTrace, "\" ESC " + noquote); -+ fprintf(NetTrace, "%s", "\" ESC " + noquote); - noquote = 2; - break; - -diff --git a/telnetd/utility.c b/telnetd/utility.c -index 29b7da1..75314cb 100644 ---- a/telnetd/utility.c -+++ b/telnetd/utility.c -@@ -909,17 +909,17 @@ printsub(char direction, unsigned char *pointer, int length) - case ENV_VAR: - if (pointer[1] == TELQUAL_SEND) - goto def_case; -- netoprintf("\" VAR " + noquote); -+ netoprintf("%s", "\" VAR " + noquote); - noquote = 2; - break; - - case ENV_VALUE: -- netoprintf("\" VALUE " + noquote); -+ netoprintf("%s", "\" VALUE " + noquote); - noquote = 2; - break; - - case ENV_ESC: -- netoprintf("\" ESC " + noquote); -+ netoprintf("%s", "\" ESC " + noquote); - noquote = 2; - break; - --- -2.13.2 - diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnetd-utility.c-Fix-buffer-overflow-in-netoprintf.patch b/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnetd-utility.c-Fix-buffer-overflow-in-netoprintf.patch deleted file mode 100644 index 8f983e40ab..0000000000 --- a/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnetd-utility.c-Fix-buffer-overflow-in-netoprintf.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 9c81c8e5bc7782e8ae12c078615abc3c896059f2 Mon Sep 17 00:00:00 2001 -From: Julius Hemanth Pitti <jpi...@cisco.com> -Date: Tue, 14 Jul 2020 22:34:19 -0700 -Subject: [PATCH] telnetd/utility.c: Fix buffer overflow in netoprintf - -As per man page of vsnprintf, when formated -string size is greater than "size"(2nd argument), -then vsnprintf returns size of formated string, -not "size"(2nd argument). - -netoprintf() was not handling a case where -return value of vsnprintf is greater than -"size"(2nd argument), results in buffer overflow -while adjusting "nfrontp" pointer to point -beyond "netobuf" buffer. - -Here is one such case where "nfrontp" -crossed boundaries of "netobuf", and -pointing to another global variable. - -(gdb) p &netobuf[8255] -$5 = 0x55c93afe8b1f <netobuf+8255> "" -(gdb) p nfrontp -$6 = 0x55c93afe8c20 <terminaltype> "\377" -(gdb) p &terminaltype -$7 = (char **) 0x55c93afe8c20 <terminaltype> -(gdb) - -This resulted in crash of telnetd service -with segmentation fault. - -Though this is DoS security bug, I couldn't -find any CVE ID for this. - -Upstream-Status: Pending - -Signed-off-by: Julius Hemanth Pitti <jpi...@cisco.com> ---- - telnetd/utility.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/telnetd/utility.c b/telnetd/utility.c -index b9a46a6..4811f14 100644 ---- a/telnetd/utility.c -+++ b/telnetd/utility.c -@@ -66,7 +66,7 @@ netoprintf(const char *fmt, ...) - len = vsnprintf(nfrontp, maxsize, fmt, ap); - va_end(ap); - -- if (len<0 || len==maxsize) { -+ if (len<0 || len>=maxsize) { - /* didn't fit */ - netflush(); - } --- -2.19.1 diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/0001-utility-Include-time.h-form-time-and-strftime-protot.patch b/meta-networking/recipes-netkit/netkit-telnet/files/0001-utility-Include-time.h-form-time-and-strftime-protot.patch deleted file mode 100644 index a5e634caab..0000000000 --- a/meta-networking/recipes-netkit/netkit-telnet/files/0001-utility-Include-time.h-form-time-and-strftime-protot.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 23b068e695881be0e8205ecccadf775fc3d5889d Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.k...@gmail.com> -Date: Tue, 6 Sep 2022 21:25:50 -0700 -Subject: [PATCH] utility: Include time.h form time() and strftime() prototypes - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.k...@gmail.com> ---- - telnetd/utility.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/telnetd/utility.c b/telnetd/utility.c -index 4811f14..b539777 100644 ---- a/telnetd/utility.c -+++ b/telnetd/utility.c -@@ -40,6 +40,7 @@ char util_rcsid[] = - #define PRINTOPTIONS - - #include <stdarg.h> -+#include <time.h> /* for time() anf strftime() */ - #include <sys/utsname.h> - - #ifdef AUTHENTICATE --- -2.37.3 - diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/CVE-2020-10188.patch b/meta-networking/recipes-netkit/netkit-telnet/files/CVE-2020-10188.patch deleted file mode 100644 index d21c602746..0000000000 --- a/meta-networking/recipes-netkit/netkit-telnet/files/CVE-2020-10188.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 6ab007dbb1958371abff2eaaad2b26da89b3c74e Mon Sep 17 00:00:00 2001 -From: Yi Zhao <yi.z...@windriver.com> -Date: Fri, 24 Apr 2020 09:43:44 +0800 -Subject: [PATCH] telnetd/utility.c: fix CVE-2020-10188 - -Upstream-Status: Backport -[Fedora: https://src.fedoraproject.org/rpms/telnet/raw/master/f/telnet-0.17-overflow-exploit.patch] - -CVE: CVE-2020-10188 - -Signed-off-by: Yi Zhao <yi.z...@windriver.com> ---- - telnetd/utility.c | 32 +++++++++++++++++++++----------- - 1 file changed, 21 insertions(+), 11 deletions(-) - -diff --git a/telnetd/utility.c b/telnetd/utility.c -index 75314cb..b9a46a6 100644 ---- a/telnetd/utility.c -+++ b/telnetd/utility.c -@@ -169,31 +169,38 @@ void ptyflush(void) - */ - static - char * --nextitem(char *current) -+nextitem(char *current, const char *endp) - { -+ if (current >= endp) { -+ return NULL; -+ } - if ((*current&0xff) != IAC) { - return current+1; - } -+ if (current+1 >= endp) { -+ return NULL; -+ } - switch (*(current+1)&0xff) { - case DO: - case DONT: - case WILL: - case WONT: -- return current+3; -+ return current+3 <= endp ? current+3 : NULL; - case SB: /* loop forever looking for the SE */ - { - register char *look = current+2; - -- for (;;) { -+ while (look < endp) { - if ((*look++&0xff) == IAC) { -- if ((*look++&0xff) == SE) { -+ if (look < endp && (*look++&0xff) == SE) { - return look; - } - } - } -+ return NULL; - } - default: -- return current+2; -+ return current+2 <= endp ? current+2 : NULL; - } - } /* end of nextitem */ - -@@ -219,7 +226,7 @@ void netclear(void) - register char *thisitem, *next; - char *good; - #define wewant(p) ((nfrontp > p) && ((*p&0xff) == IAC) && \ -- ((*(p+1)&0xff) != EC) && ((*(p+1)&0xff) != EL)) -+ (nfrontp > p+1 && (((*(p+1)&0xff) != EC) && ((*(p+1)&0xff) != EL)))) - - #if defined(ENCRYPT) - thisitem = nclearto > netobuf ? nclearto : netobuf; -@@ -227,7 +234,7 @@ void netclear(void) - thisitem = netobuf; - #endif - -- while ((next = nextitem(thisitem)) <= nbackp) { -+ while ((next = nextitem(thisitem, nbackp)) != NULL && next <= nbackp) { - thisitem = next; - } - -@@ -239,20 +246,23 @@ void netclear(void) - good = netobuf; /* where the good bytes go */ - #endif - -- while (nfrontp > thisitem) { -+ while (thisitem != NULL && nfrontp > thisitem) { - if (wewant(thisitem)) { - int length; - - next = thisitem; - do { -- next = nextitem(next); -- } while (wewant(next) && (nfrontp > next)); -+ next = nextitem(next, nfrontp); -+ } while (next != NULL && wewant(next) && (nfrontp > next)); -+ if (next == NULL) { -+ next = nfrontp; -+ } - length = next-thisitem; - bcopy(thisitem, good, length); - good += length; - thisitem = next; - } else { -- thisitem = nextitem(thisitem); -+ thisitem = nextitem(thisitem, nfrontp); - } - } - --- -2.7.4 - diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/CVE-2022-39028.patch b/meta-networking/recipes-netkit/netkit-telnet/files/CVE-2022-39028.patch deleted file mode 100644 index e8c3f1d84b..0000000000 --- a/meta-networking/recipes-netkit/netkit-telnet/files/CVE-2022-39028.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 4133a888aa256312186962ab70d4a36eed5920c1 Mon Sep 17 00:00:00 2001 -From: Brooks Davis <bro...@freebsd.org> -Date: Mon, 26 Sep 2022 18:56:51 +0100 -Subject: [PATCH] telnetd: fix two-byte input crash - -Move initialization of the slc table earlier so it doesn't get -accessed before that happens. - -For details on the issue, see: -https://pierrekim.github.io/blog/2022-08-24-2-byte-dos-freebsd-netbsd-telnetd-netkit-telnetd-inetutils-telnetd-kerberos-telnetd.html - -Reviewed by: cy -Obtained from: NetBSD via cy -Differential Revision: https://reviews.freebsd.org/D36680 - -CVE: CVE-2022-39028 -Upstream-Status: Backport [https://cgit.freebsd.org/src/commit/?id=6914ffef4e23] - -(cherry picked from commit 6914ffef4e2318ca1d0ead28eafb6f06055ce0f8) -Signed-off-by: Sanjay Chitroda <sanjay.chitr...@einfochips.com> - ---- - telnetd/telnetd.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c -index f36f505..efa0fe1 100644 ---- a/telnetd/telnetd.c -+++ b/telnetd/telnetd.c -@@ -615,6 +615,11 @@ doit(struct sockaddr_in *who) - int level; - char user_name[256]; - -+ /* -+ * Initialize the slc mapping table. -+ */ -+ get_slc_defaults(); -+ - /* - * Find an available pty to use. - */ -@@ -698,11 +703,6 @@ void telnet(int f, int p) - char *HE; - const char *IM; - -- /* -- * Initialize the slc mapping table. -- */ -- get_slc_defaults(); -- - /* - * Do some tests where it is desireable to wait for a response. - * Rather than doing them slowly, one at a time, do them all diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/To-aviod-buffer-overflow-in-telnet.patch b/meta-networking/recipes-netkit/netkit-telnet/files/To-aviod-buffer-overflow-in-telnet.patch deleted file mode 100644 index 34a6479790..0000000000 --- a/meta-networking/recipes-netkit/netkit-telnet/files/To-aviod-buffer-overflow-in-telnet.patch +++ /dev/null @@ -1,1217 +0,0 @@ -From f09a6460a62aacb87bb8683d16aa3ce55848bf7e Mon Sep 17 00:00:00 2001 -From: Li xin <lixin.f...@cn.fujitsu.com> -Date: Fri, 28 Nov 2014 07:06:24 +0900 -Subject: [PATCH 1/2] To aviod buffer overflow in telnet - -This patch is from Fedora. - -Upstream-Status: Pending - -Signed-off-by: Li Xin <lixin.f...@cn.fujitsu.com> ---- - telnet/Makefile | 4 +- - telnet/commands.cc | 270 +++++++++++++++++++++++++++++++++++----------------- - telnet/defines.h | 2 + - telnet/externs.h | 7 +- - telnet/main.cc | 65 ++++++++++--- - telnet/netlink.cc | 78 +++++++++------ - telnet/netlink.h | 7 +- - telnet/network.cc | 1 + - telnet/proto.h | 2 +- - telnet/ring.cc | 2 +- - telnet/ring.h | 2 +- - telnet/sys_bsd.cc | 11 +++ - telnet/telnet.1 | 37 +++++-- - telnet/telnet.cc | 45 +++++---- - telnet/terminal.cc | 17 +++- - telnet/utilities.cc | 2 + - 16 files changed, 380 insertions(+), 172 deletions(-) - -diff --git a/telnet/Makefile b/telnet/Makefile -index cef866f..39249e1 100644 ---- a/telnet/Makefile -+++ b/telnet/Makefile -@@ -7,7 +7,7 @@ include ../MRULES - - # -DAUTHENTICATE - CXXFLAGS += -DUSE_TERMIO -DKLUDGELINEMODE --LIBS += $(LIBTERMCAP) -+LIBS = $(LIBTERMCAP) - - SRCS = commands.cc main.cc network.cc ring.cc sys_bsd.cc telnet.cc \ - terminal.cc tn3270.cc utilities.cc genget.cc environ.cc netlink.cc -@@ -22,7 +22,7 @@ depend: - $(CXX) $(CXXFLAGS) -MM $(SRCS) >depend.mk - - install: telnet -- install -s -m$(BINMODE) telnet $(INSTALLROOT)$(BINDIR) -+ install -m$(BINMODE) telnet $(INSTALLROOT)$(BINDIR) - install -m$(MANMODE) telnet.1 $(INSTALLROOT)$(MANDIR)/man1 - - clean: -diff --git a/telnet/commands.cc b/telnet/commands.cc -index d92bccd..02c593e 100644 ---- a/telnet/commands.cc -+++ b/telnet/commands.cc -@@ -86,10 +86,6 @@ char cmd_rcsid[] = - - #define HELPINDENT ((int) sizeof ("connect")) - --#ifndef MAXHOSTNAMELEN --#define MAXHOSTNAMELEN 64 --#endif MAXHOSTNAMELEN -- - #if defined(HAS_IPPROTO_IP) && defined(IP_TOS) - int tos = -1; - #endif /* defined(HAS_IPPROTO_IP) && defined(IP_TOS) */ -@@ -98,7 +94,7 @@ static unsigned long sourceroute(char *arg, char **cpp, int *lenp); - - - char *hostname; --static char _hostname[MAXHOSTNAMELEN]; -+static char *_hostname; - - //typedef int (*intrtn_t)(int argc, const char *argv[]); - -@@ -161,7 +157,7 @@ class command_entry { - assert(argc>=1); - if (nargs>=0 && argc!=nargs+1) { - fprintf(stderr, "Wrong number of arguments for command.\n"); -- fprintf(stderr, "Try %s ? for help\n", argv[0]); -+ fprintf(stderr, "Try ? %s for help\n", argv[0]); - return 0; /* is this right? */ - } - if (nargs==-2) { -@@ -480,6 +476,7 @@ static int send_wontcmd(const char *name, const char *) { - int send_tncmd(int (*func)(int, int), const char *cmd, const char *name) { - char **cpp; - extern char *telopts[]; -+ long opt; - - if (isprefix(name, "help") || isprefix(name, "?")) { - register int col, len; -@@ -506,16 +503,23 @@ int send_tncmd(int (*func)(int, int), const char *cmd, const char *name) { - name, cmd); - return 0; - } -+ -+ opt = cpp - telopts; - if (cpp == 0) { -- fprintf(stderr, "'%s': unknown argument ('send %s ?' for help).\n", -+ char *end; -+ -+ opt = strtol(name, &end, 10); -+ if (*end || opt < 0 || opt > 255) { -+ fprintf(stderr, "'%s': unknown argument ('send %s ?' for help).\n", - name, cmd); -- return 0; -+ return 0; -+ } - } - if (!connected) { - printf("?Need to be connected first.\n"); - return 0; - } -- (*func)(cpp - telopts, 1); -+ (*func)(opt, 1); - return 1; - } - -@@ -689,9 +693,9 @@ static struct togglelist Togglelist[] = { - "print encryption debugging information" }, - #endif - -- { "skiprc", "don't read ~/.telnetrc file", -+ { "skiprc", "don't read the telnetrc files", - NULL, &skiprc, -- "read ~/.telnetrc file" }, -+ "read the telnetrc files" }, - { "binary", - "sending and receiving of binary data", - togbinary, NULL, -@@ -1615,15 +1619,20 @@ void ayt_status(int) { - #endif - - int tn(int argc, const char *argv[]) { -- register struct hostent *host = 0; - struct sockaddr_in sn; -- struct servent *sp = 0; - char *srp = NULL; - int srlen; -- -- const char *cmd, *volatile user = 0; -+ int family = 0; -+ const char *cmd, *volatile user = 0, *srchostp = 0; - const char *portp = NULL; - char *hostp = NULL; -+ char *resolv_hostp; -+ struct addrinfo hints; -+ struct addrinfo *hostaddr = 0; -+ int res; -+ char name[NI_MAXHOST]; -+ char service[NI_MAXSERV]; -+ struct addrinfo *tmpaddr; - - /* clear the socket address prior to use */ - memset(&sn, 0, sizeof(sn)); -@@ -1632,6 +1641,10 @@ int tn(int argc, const char *argv[]) { - printf("?Already connected to %s\n", hostname); - return 0; - } -+ if (_hostname) { -+ delete[] _hostname; -+ _hostname = 0; -+ } - if (argc < 2) { - (void) strcpy(line, "open "); - printf("(to) "); -@@ -1657,11 +1670,33 @@ int tn(int argc, const char *argv[]) { - --argc; - continue; - } -+ if (strcmp(*argv, "-b") == 0) { -+ --argc; ++argv; -+ if (argc == 0) -+ goto usage; -+ srchostp = *argv++; -+ --argc; -+ continue; -+ } - if (strcmp(*argv, "-a") == 0) { - --argc; ++argv; - autologin = 1; - continue; - } -+ if (strcmp(*argv, "-6") == 0) { -+ --argc; ++argv; -+#ifdef AF_INET6 -+ family = AF_INET6; -+#else -+ puts("IPv6 unsupported"); -+#endif -+ continue; -+ } -+ if (strcmp(*argv, "-4") == 0) { -+ --argc; ++argv; -+ family = AF_INET; -+ continue; -+ } - if (hostp == 0) { - /* this leaks memory - FIXME */ - hostp = strdup(*argv++); -@@ -1680,6 +1715,8 @@ int tn(int argc, const char *argv[]) { - if (hostp == 0) - goto usage; - -+ resolv_hostp = hostp; -+ - #if defined(IP_OPTIONS) && defined(HAS_IPPROTO_IP) - if (hostp[0] == '@' || hostp[0] == '!') { - if ((hostname = strrchr(hostp, ':')) == NULL) -@@ -1696,78 +1733,122 @@ int tn(int argc, const char *argv[]) { - } else { - sn.sin_addr.s_addr = temp; - sn.sin_family = AF_INET; -+ /* -+ * For source route we just make sure to get the IP given -+ * on the command line when looking up the port. -+ */ -+ resolv_hostp = inet_ntoa(sn.sin_addr); - } - } -- else { --#endif -- if (inet_aton(hostp, &sn.sin_addr)) { -- sn.sin_family = AF_INET; -- strcpy(_hostname, hostp); -- hostname = _hostname; -- } -- else { -- host = gethostbyname(hostp); -- if (host) { -- sn.sin_family = host->h_addrtype; -- if (host->h_length > (int)sizeof(sn.sin_addr)) { -- host->h_length = sizeof(sn.sin_addr); -- } --#if defined(h_addr) /* In 4.3, this is a #define */ -- memcpy((caddr_t)&sn.sin_addr, -- host->h_addr_list[0], host->h_length); --#else /* defined(h_addr) */ -- memcpy((caddr_t)&sn.sin_addr, host->h_addr, host->h_length); --#endif /* defined(h_addr) */ -- strncpy(_hostname, host->h_name, sizeof(_hostname)); -- _hostname[sizeof(_hostname)-1] = '\0'; -- hostname = _hostname; -- } else { -- herror(hostp); -- return 0; -- } -- } --#if defined(IP_OPTIONS) && defined(HAS_IPPROTO_IP) -- } - #endif -+ -+ /* User port or the default name of telnet. */ - if (portp) { - if (*portp == '-') { - portp++; - telnetport = 1; -- } else -+ } else { - telnetport = 0; -- sn.sin_port = atoi(portp); -- if (sn.sin_port == 0) { -- sp = getservbyname(portp, "tcp"); -- if (sp) -- sn.sin_port = sp->s_port; -- else { -- printf("%s: bad port number\n", portp); -- return 0; -+ if (*portp >='0' && *portp<='9') { -+ char *end; -+ long int p; -+ -+ p=strtol(portp, &end, 10); -+ if (ERANGE==errno && (LONG_MIN==p || LONG_MAX==p)) { -+ fprintf(stderr, "telnet: port %s overflows\n", portp); -+ return 0; -+ } else if (p<=0 || p>=65536) { -+ fprintf(stderr, "telnet: port %s out of range\n", portp); -+ return 0; -+ } - } -- } -- else { -- sn.sin_port = htons(sn.sin_port); - } -- } -+ } - else { -- if (sp == 0) { -- sp = getservbyname("telnet", "tcp"); -- if (sp == 0) { -- fprintf(stderr, "telnet: tcp/telnet: unknown service\n"); -- return 0; -- } -- sn.sin_port = sp->s_port; -- } -+ portp = "telnet"; - telnetport = 1; - } -- printf("Trying %s...\n", inet_ntoa(sn.sin_addr)); -+ -+ /* We only understand SOCK_STREAM sockets. */ -+ memset(&hints, 0, sizeof(hints)); -+ hints.ai_socktype = SOCK_STREAM; -+ hints.ai_flags = AI_NUMERICHOST; -+ hints.ai_family = family; -+ -+ if (srchostp) { -+ res = getaddrinfo(srchostp, "0", &hints, &hostaddr); -+ if (res) { -+ fprintf(stderr, "telnet: could not resolve %s: %s\n", srchostp, -+ gai_strerror(res)); -+ return 0; -+ } -+ hints.ai_family = hostaddr->ai_family; -+ res = nlink.bind(hostaddr); -+ freeaddrinfo(hostaddr); -+ if (res < 0) -+ return 0; -+ } -+ -+ /* Resolve both the host and service simultaneously. */ -+ res = getaddrinfo(resolv_hostp, portp, &hints, &hostaddr); -+ if (res == EAI_NONAME) { -+ hints.ai_flags = AI_CANONNAME; -+ res = getaddrinfo(resolv_hostp, portp, &hints, &hostaddr); -+ } else if (hostaddr) { -+ hostaddr->ai_canonname = 0; -+ } -+ if (res || !hostaddr) { -+ fprintf(stderr, "telnet: could not resolve %s/%s: %s\n", resolv_hostp, portp, gai_strerror(res)); -+ return 0; -+ } -+ -+ /* Try to connect to every listed round robin IP. */ -+ tmpaddr = hostaddr; -+ errno = 0; - do { -- int x = nlink.connect(debug, host, &sn, srp, srlen, tos); -- if (!x) return 0; -- else if (x==1) continue; -+ int x; -+ -+ if (!tmpaddr) { -+ if (errno) -+ perror("telnet: Unable to connect to remote host"); -+ else -+ fputs("telnet: Unable to connect to remote host: " -+ "Bad port number\n", stderr); -+err: -+ freeaddrinfo(hostaddr); -+ return 0; -+ } -+ -+ if (tmpaddr->ai_family == AF_UNIX) { -+nextaddr: -+ tmpaddr = tmpaddr->ai_next; -+ continue; -+ } -+ -+ getnameinfo(tmpaddr->ai_addr, tmpaddr->ai_addrlen, -+ name, sizeof(name), service, sizeof(service), -+ NI_NUMERICHOST | NI_NUMERICSERV); -+ -+ printf("Trying %s...\n", name); -+ x = nlink.connect(debug, tmpaddr, srp, srlen, tos); -+ if (!x) -+ goto err; -+ else if (x==1) -+ goto nextaddr; -+ - connected++; - } while (connected == 0); -- cmdrc(hostp, hostname); -+ if (tmpaddr->ai_canonname == 0) { -+ hostname = new char[strlen(hostp)+1]; -+ strcpy(hostname, hostp); -+ } -+ else { -+ hostname = new char[strlen(tmpaddr->ai_canonname)+1]; -+ strcpy(hostname, tmpaddr->ai_canonname); -+ } -+ -+ cmdrc(hostp, hostname, portp); -+ freeaddrinfo(hostaddr); - if (autologin && user == NULL) { - struct passwd *pw; - -@@ -2013,30 +2094,21 @@ static int help(command_table *tab, int argc, const char *argv[]) { - return 0; - } - --static char *rcname = 0; --static char rcbuf[128]; -- --void cmdrc(const char *m1, const char *m2) { -+static void readrc(const char *m1, const char *m2, const char *port, -+ const char *rcname) -+{ - FILE *rcfile; - int gotmachine = 0; - int l1 = strlen(m1); - int l2 = strlen(m2); -- char m1save[64]; -- -- if (skiprc) return; -+ int lport = strlen(port); -+ char m1save[l1 + 1]; -+ char portsave[lport + 1]; - - strcpy(m1save, m1); - m1 = m1save; -- -- if (rcname == 0) { -- rcname = getenv("HOME"); -- if (rcname) -- strcpy(rcbuf, rcname); -- else -- rcbuf[0] = '\0'; -- strcat(rcbuf, "/.telnetrc"); -- rcname = rcbuf; -- } -+ strcpy(portsave, port); -+ port = portsave; - - rcfile = fopen(rcname, "r"); - if (!rcfile) return; -@@ -2061,6 +2133,13 @@ void cmdrc(const char *m1, const char *m2) { - strncpy(line, &line[7], sizeof(line) - 7); - else - continue; -+ -+ if (line[0] == ':') { -+ if (!strncasecmp(&line[1], port, lport)) -+ continue; -+ strncpy(line, &line[lport + 1], sizeof(line) - lport - 1); -+ } -+ - if (line[0] != ' ' && line[0] != '\t' && line[0] != '\n') - continue; - gotmachine = 1; -@@ -2073,6 +2152,21 @@ void cmdrc(const char *m1, const char *m2) { - fclose(rcfile); - } - -+void cmdrc(const char *m1, const char *m2, const char *port) { -+ char *rcname = NULL; -+ -+ if (skiprc) return; -+ -+ readrc(m1, m2, port, "/etc/telnetrc"); -+ if (asprintf (&rcname, "%s/.telnetrc", getenv ("HOME")) == -1) -+ { -+ perror ("asprintf"); -+ return; -+ } -+ readrc(m1, m2, port, rcname); -+ free (rcname); -+} -+ - #if defined(IP_OPTIONS) && defined(HAS_IPPROTO_IP) - - /* -diff --git a/telnet/defines.h b/telnet/defines.h -index 2784400..d5edc46 100644 ---- a/telnet/defines.h -+++ b/telnet/defines.h -@@ -50,3 +50,5 @@ - #define MODE_COMMAND_LINE(m) ((m)==-1) - - #define CONTROL(x) ((x)&0x1f) /* CTRL(x) is not portable */ -+ -+#define MODE_OUT8 0x8000 /* binary mode sans -opost */ -diff --git a/telnet/externs.h b/telnet/externs.h -index 955df79..0730e8a 100644 ---- a/telnet/externs.h -+++ b/telnet/externs.h -@@ -48,9 +48,7 @@ - typedef unsigned char cc_t; - #endif - --#ifdef __linux__ - #include <unistd.h> /* get _POSIX_VDISABLE */ --#endif - - #ifndef _POSIX_VDISABLE - #error "Please fix externs.h to define _POSIX_VDISABLE" -@@ -60,7 +58,8 @@ typedef unsigned char cc_t; - - extern int autologin; /* Autologin enabled */ - extern int skiprc; /* Don't process the ~/.telnetrc file */ --extern int eight; /* use eight bit mode (binary in and/or out */ -+extern int eight; /* use eight bit mode (binary in and/or out) */ -+extern int binary; /* use binary option (in and/or out) */ - extern int flushout; /* flush output */ - extern int connected; /* Are we connected to the other side? */ - extern int globalmode; /* Mode tty should be in */ -@@ -225,6 +224,8 @@ cc_t *tcval(int); - - //#if 0 - extern struct termios new_tc; -+extern struct termios old_tc; -+ - - #define termEofChar new_tc.c_cc[VEOF] - #define termEraseChar new_tc.c_cc[VERASE] -diff --git a/telnet/main.cc b/telnet/main.cc -index b67f2ce..b626e54 100644 ---- a/telnet/main.cc -+++ b/telnet/main.cc -@@ -45,7 +45,10 @@ char main_rcsid[] = - - #include <sys/types.h> - #include <getopt.h> -+#include <stdlib.h> - #include <string.h> -+#include <netdb.h> -+#include <errno.h> - - #include "ring.h" - #include "externs.h" -@@ -80,12 +83,13 @@ tninit(void) - void usage(void) { - fprintf(stderr, "Usage: %s %s%s%s%s\n", - prompt, -- " [-8] [-E] [-L] [-a] [-d] [-e char] [-l user] [-n tracefile]", -- "\n\t", -+ "[-4] [-6] [-8] [-E] [-L] [-a] [-d] [-e char] [-l user]", -+ "\n\t[-n tracefile] [ -b addr ]", - #ifdef TN3270 -+ "\n\t" - "[-noasynch] [-noasynctty] [-noasyncnet] [-r] [-t transcom]\n\t", - #else -- "[-r] ", -+ " [-r] ", - #endif - "[host-name [port]]" - ); -@@ -102,7 +106,8 @@ main(int argc, char *argv[]) - extern char *optarg; - extern int optind; - int ch; -- char *user; -+ char *user, *srcaddr; -+ int family; - - tninit(); /* Clear out things */ - #if defined(CRAY) && !defined(__STDC__) -@@ -110,21 +115,38 @@ main(int argc, char *argv[]) - #endif - - TerminalSaveState(); -+ if ((old_tc.c_cflag & (CSIZE|PARENB)) != CS8) -+ eight = 0; - - if ((prompt = strrchr(argv[0], '/'))!=NULL) - ++prompt; - else - prompt = argv[0]; - -- user = NULL; -+ user = srcaddr = NULL; -+ family = 0; - - rlogin = (strncmp(prompt, "rlog", 4) == 0) ? '~' : _POSIX_VDISABLE; - autologin = -1; - -- while ((ch = getopt(argc, argv, "8EKLS:X:ade:k:l:n:rt:x")) != EOF) { -+ while ((ch = getopt(argc, argv, -+ "4678EKLS:X:ab:de:k:l:n:rt:x")) != EOF) { - switch(ch) { -+ case '4': -+ family = AF_INET; -+ break; -+ case '6': -+#ifdef AF_INET6 -+ family = AF_INET6; -+#else -+ fputs("IPv6 unsupported\n", stderr); -+#endif -+ break; -+ case '7': -+ eight = 0; /* 7-bit ouput and input */ -+ break; - case '8': -- eight = 3; /* binary output and input */ -+ binary = 3; /* binary output and input */ - break; - case 'E': - rlogin = escapechar = _POSIX_VDISABLE; -@@ -133,23 +155,26 @@ main(int argc, char *argv[]) - //autologin = 0; - break; - case 'L': -- eight |= 2; /* binary output only */ -+ binary |= 2; /* binary output only */ - break; - case 'S': - { --#ifdef HAS_GETTOS - extern int tos; -+ int num; - -- if ((tos = parsetos(optarg, "tcp")) < 0) -+#ifdef HAS_GETTOS -+ if ((num = parsetos(optarg, "tcp")) < 0) { -+#else -+ errno = 0; -+ num = strtol(optarg, 0, 0); -+ if (errno) { -+#endif - fprintf(stderr, "%s%s%s%s\n", - prompt, ": Bad TOS argument '", - optarg, - "; will try to use default TOS"); --#else -- fprintf(stderr, -- "%s: Warning: -S ignored, no parsetos() support.\n", -- prompt); --#endif -+ } else -+ tos = num; - } - break; - case 'X': -@@ -210,6 +235,9 @@ main(int argc, char *argv[]) - "%s: -x ignored, no encryption support.\n", - prompt); - break; -+ case 'b': -+ srcaddr = optarg; -+ break; - case '?': - default: - usage(); -@@ -233,6 +261,13 @@ main(int argc, char *argv[]) - *argp++ = "-l"; - *argp++ = user; - } -+ if (srcaddr) { -+ *argp++ = "-b"; -+ *argp++ = srcaddr; -+ } -+ if (family) { -+ *argp++ = family == AF_INET ? "-4" : "-6"; -+ } - *argp++ = argv[0]; /* host */ - if (argc > 1) - *argp++ = argv[1]; /* port */ -diff --git a/telnet/netlink.cc b/telnet/netlink.cc -index f439cff..f839747 100644 ---- a/telnet/netlink.cc -+++ b/telnet/netlink.cc -@@ -79,22 +79,61 @@ void netlink::close(int doshutdown) { - shutdown(net, 2); - } - ::close(net); -+ net = -1; - } - --int netlink::connect(int debug, struct hostent *host, -- struct sockaddr_in *sn, -- char *srcroute, int srlen, int tos) -+int netlink::bind(struct addrinfo *addr) - { -- int on=1; -+ int res; -+ -+ res = socket(addr->ai_family); -+ if (res < 2) { -+ if (res == 1) -+ perror("telnet: socket"); -+ return -1; -+ } -+ -+ if (::bind(net, addr->ai_addr, addr->ai_addrlen) < 0) { -+ perror("telnet: bind"); -+ return -1; -+ } -+ -+ return 0; -+} -+ -+int netlink::socket(int family) -+{ -+ if (this->family != family) -+ close(0); - -- net = socket(AF_INET, SOCK_STREAM, 0); - if (net < 0) { -- perror("telnet: socket"); -- return 0; -+ this->family = family; -+ net = ::socket(family, SOCK_STREAM, 0); -+ if (net < 0) { -+ if (errno == EAFNOSUPPORT) -+ return 1; -+ perror("telnet: socket"); -+ return 0; -+ } - } - -+ return 2; -+} -+ -+int netlink::connect(int debug, struct addrinfo *addr, -+ char *srcroute, int srlen, int tos) -+{ -+ int on=1; -+ int res; -+ -+ res = socket(addr->ai_family); -+ if (res < 2) -+ return res; -+ - #if defined(IP_OPTIONS) && defined(HAS_IPPROTO_IP) - if (srcroute) { -+ if (addr->ai_family != AF_INET) -+ fputs("Source route is only supported for IPv4\n", stderr); - if (setsockopt(net, IPPROTO_IP, IP_OPTIONS, srcroute, srlen) < 0) - perror("setsockopt (IP_OPTIONS)"); - } -@@ -108,7 +147,7 @@ int netlink::connect(int debug, struct hostent *host, - #endif - if (tos < 0) tos = 020; /* Low Delay bit */ - if (tos && (setsockopt(net, IPPROTO_IP, IP_TOS, &tos, sizeof(int)) < 0) -- && (errno != ENOPROTOOPT)) -+ && (errno != ENOPROTOOPT) && (errno != EOPNOTSUPP)) - perror("telnet: setsockopt (IP_TOS) (ignored)"); - #endif /* defined(IPPROTO_IP) && defined(IP_TOS) */ - -@@ -116,27 +155,8 @@ int netlink::connect(int debug, struct hostent *host, - perror("setsockopt (SO_DEBUG)"); - } - -- if (::connect(net, (struct sockaddr *)sn, sizeof(*sn)) < 0) { --#if defined(h_addr) /* In 4.3, this is a #define */ -- if (host && host->h_addr_list[1]) { -- int oerrno = errno; -- -- fprintf(stderr, "telnet: connect to address %s: ", -- inet_ntoa(sn->sin_addr)); -- errno = oerrno; -- perror(NULL); -- host->h_addr_list++; -- if (host->h_length > (int)sizeof(sn->sin_addr)) { -- host->h_length = sizeof(sn->sin_addr); -- } -- memcpy(&sn->sin_addr, host->h_addr_list[0], host->h_length); -- close(net); -- return 1; -- } --#endif /* defined(h_addr) */ -- -- perror("telnet: Unable to connect to remote host"); -- return 0; -+ if (::connect(net, addr->ai_addr, addr->ai_addrlen) < 0) { -+ return 1; - } - return 2; - } -diff --git a/telnet/netlink.h b/telnet/netlink.h -index 9852b30..0ac8a08 100644 ---- a/telnet/netlink.h -+++ b/telnet/netlink.h -@@ -1,13 +1,16 @@ - - class netlink { -+ private: -+ int family; - protected: - int net; - public: - netlink(); - ~netlink(); - -- int connect(int debug, struct hostent *host, -- struct sockaddr_in *sin, -+ int bind(struct addrinfo *hostaddr); -+ int socket(int family); -+ int connect(int debug, struct addrinfo *hostaddr, - char *srcroute, int srlen, - int tos); - void close(int doshutdown); -diff --git a/telnet/network.cc b/telnet/network.cc -index 6a2c374..0dcf3e2 100644 ---- a/telnet/network.cc -+++ b/telnet/network.cc -@@ -40,6 +40,7 @@ char net_rcsid[] = - #include <sys/types.h> - #include <sys/socket.h> - #include <sys/time.h> -+#include <stdlib.h> - #include <errno.h> - #include <arpa/telnet.h> - -diff --git a/telnet/proto.h b/telnet/proto.h -index 8be4a39..92f2419 100644 ---- a/telnet/proto.h -+++ b/telnet/proto.h -@@ -13,7 +13,7 @@ int TerminalWindowSize(long *rows, long *cols); - void auth_encrypt_user(char *); - void auth_name(unsigned char *, int); - void auth_printsub(unsigned char *, int, unsigned char *, int); --void cmdrc(const char *m1, const char *m2); -+void cmdrc(const char *, const char *, const char *); - void env_init(void); - int getconnmode(void); - void init_network(void); -diff --git a/telnet/ring.cc b/telnet/ring.cc -index be57396..772c6c5 100644 ---- a/telnet/ring.cc -+++ b/telnet/ring.cc -@@ -165,7 +165,7 @@ int ringbuf::flush() { - - /////////////////////////////////////////////////// supply ////////////// - --void ringbuf::printf(const char *format, ...) { -+void ringbuf::xprintf(const char *format, ...) { - char xbuf[256]; - va_list ap; - va_start(ap, format); -diff --git a/telnet/ring.h b/telnet/ring.h -index 15d3f3f..049377e 100644 ---- a/telnet/ring.h -+++ b/telnet/ring.h -@@ -83,7 +83,7 @@ class ringbuf { - // manual supply - void putch(char c) { write(&c, 1); } - void write(const char *buffer, int ct); -- void printf(const char *format, ...); -+ void xprintf(const char *format, ...); - int empty_count() { return size - count; } - - // automatic supply -diff --git a/telnet/sys_bsd.cc b/telnet/sys_bsd.cc -index 93fba7e..a8c9aab 100644 ---- a/telnet/sys_bsd.cc -+++ b/telnet/sys_bsd.cc -@@ -189,18 +189,25 @@ void NetSetPgrp(int fd) { - * Various signal handling routines. - */ - -+#if 0 - static void deadpeer(int /*sig*/) { - setcommandmode(); - siglongjmp(peerdied, -1); - } -+#endif - - static void intr(int /*sig*/) { - if (localchars) { - intp(); - } - else { -+#if 0 - setcommandmode(); - siglongjmp(toplevel, -1); -+#else -+ signal(SIGINT, SIG_DFL); -+ raise(SIGINT); -+#endif - } - } - -@@ -214,6 +221,8 @@ static void intr2(int /*sig*/) { - sendabort(); - return; - } -+ signal(SIGQUIT, SIG_DFL); -+ raise(SIGQUIT); - } - - #ifdef SIGWINCH -@@ -238,7 +247,9 @@ void ayt(int sig) { - void sys_telnet_init(void) { - signal(SIGINT, intr); - signal(SIGQUIT, intr2); -+#if 0 - signal(SIGPIPE, deadpeer); -+#endif - #ifdef SIGWINCH - signal(SIGWINCH, sendwin); - #endif -diff --git a/telnet/telnet.1 b/telnet/telnet.1 -index 54a47fb..8365e42 100644 ---- a/telnet/telnet.1 -+++ b/telnet/telnet.1 -@@ -42,8 +42,9 @@ - protocol - .Sh SYNOPSIS - .Nm telnet --.Op Fl 8ELadr -+.Op Fl 468ELadr - .Op Fl S Ar tos -+.Op Fl b Ar address - .Op Fl e Ar escapechar - .Op Fl l Ar user - .Op Fl n Ar tracefile -@@ -68,6 +69,10 @@ command implicitly; see the description below. - .Pp - Options: - .Bl -tag -width indent -+.It Fl 4 -+Force IPv4 address resolution. -+.It Fl 6 -+Force IPv6 address resolution. - .It Fl 8 - Request 8-bit operation. This causes an attempt to negotiate the - .Dv TELNET BINARY -@@ -89,6 +94,8 @@ of the - option if supported by the remote system. The username is retrieved - via - .Xr getlogin 3 . -+.It Fl b Ar address -+Use bind(2) on the local socket to bind it to a specific local address. - .It Fl d - Sets the initial value of the - .Ic debug -@@ -474,17 +481,29 @@ protocol without making a mess. Protocol negotiation can be forced by - placing a dash before the port number. - .Pp - After establishing a connection, any commands associated with the --remote host in the user's -+remote host in -+.Pa /etc/telnetrc -+and the user's - .Pa .telnetrc --file are executed. -+file are executed, in that order. - .Pp --The format of the .telnetrc file is as follows: Lines beginning with a -+The format of the telnetrc files is as follows: Lines beginning with a - #, and blank lines, are ignored. The rest of the file should consist - of hostnames and sequences of - .Nm telnet - commands to use with that host. Commands should be one per line, - indented by whitespace; lines beginning without whitespace are --interpreted as hostnames. Upon connecting to a particular host, the -+interpreted as hostnames. Lines beginning with the special hostname -+.Ql DEFAULT -+will apply to all hosts. Hostnames including -+.Ql DEFAULT -+may be followed immediately by a colon and a port number or string. -+If a port is specified it must match exactly with what is specified -+on the command line. If no port was specified on the command line, -+then the value -+.Ql telnet -+is used. -+Upon connecting to a particular host, the - commands associated with that host are executed. - .It Ic quit - Close any open session and exit -@@ -1184,9 +1203,7 @@ escape sequences are preceded by a '*' to aid in locating them. - When the skiprc toggle is - .Dv TRUE , - .Tn telnet --does not read the --.Pa \&.telnetrc --file. The initial value for this toggle is -+does not read the telnetrc files. The initial value for this toggle is - .Dv FALSE. - .It Ic termdata - Toggles the display of all terminal data (in hexadecimal format). -@@ -1239,7 +1256,9 @@ to the other side via the - .Dv TELNET ENVIRON - option. - .Sh FILES --.Bl -tag -width ~/.telnetrc -compact -+.Bl -tag -width /etc/telnetrc -compact -+.It Pa /etc/telnetrc -+global telnet startup values - .It Pa ~/.telnetrc - user customized telnet startup values - .El -diff --git a/telnet/telnet.cc b/telnet/telnet.cc -index 4fc3b1f..7eca811 100644 ---- a/telnet/telnet.cc -+++ b/telnet/telnet.cc -@@ -88,7 +88,8 @@ char do_dont_resp[256]; - char will_wont_resp[256]; - - int --eight = 0, -+ eight = 3, -+ binary = 0, - autologin = 0, /* Autologin anyone? */ - skiprc = 0, - connected, -@@ -639,14 +640,14 @@ static const char *gettermname(void) { - if (resettermname) { - resettermname = 0; - tname = env_getvalue("TERM", 0); -- if (!tname || my_setupterm(tname, 1, &err)) { -+ if (!tname /* || my_setupterm(tname, 1, &err) */) { - termbuf[0] = 0; - tname = "UNKNOWN"; - } - mklist(termbuf, tname, termtypes); - next = 0; - } -- if (next==termtypes.num()) next = 0; -+ if (next==termtypes.num()-1) next = 0; - return termtypes[next++]; - } - /* -@@ -681,7 +682,7 @@ static void suboption(void) { - } - #endif /* TN3270 */ - name = gettermname(); -- netoring.printf("%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE, -+ netoring.xprintf("%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE, - TELQUAL_IS, name, IAC, SE); - } - break; -@@ -693,7 +694,7 @@ static void suboption(void) { - if (SB_GET() == TELQUAL_SEND) { - long oospeed, iispeed; - TerminalSpeeds(&iispeed, &oospeed); -- netoring.printf("%c%c%c%c%ld,%ld%c%c", IAC, SB, TELOPT_TSPEED, -+ netoring.xprintf("%c%c%c%c%ld,%ld%c%c", IAC, SB, TELOPT_TSPEED, - TELQUAL_IS, oospeed, iispeed, IAC, SE); - } - break; -@@ -780,7 +781,7 @@ static void suboption(void) { - send_wont(TELOPT_XDISPLOC, 1); - break; - } -- netoring.printf("%c%c%c%c%s%c%c", IAC, SB, TELOPT_XDISPLOC, -+ netoring.xprintf("%c%c%c%c%s%c%c", IAC, SB, TELOPT_XDISPLOC, - TELQUAL_IS, dp, IAC, SE); - } - break; -@@ -798,7 +799,7 @@ void lm_will(unsigned char *cmd, int len) { - return; - } - -- netoring.printf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, -+ netoring.xprintf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, - DONT, cmd[0], IAC, SE); - } - -@@ -815,7 +816,7 @@ void lm_do(unsigned char *cmd, int len) { - /*@*/ printf("lm_do: no command!!!\n"); /* Should not happen... */ - return; - } -- netoring.printf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, -+ netoring.xprintf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, - WONT, cmd[0], IAC, SE); - } - -@@ -838,7 +839,7 @@ void lm_mode(unsigned char *cmd, int len, int init) { - k |= MODE_ACK; - } - -- netoring.printf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, LM_MODE, -+ netoring.xprintf("%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, LM_MODE, - k, IAC, SE); - - setconnmode(0); /* set changed mode */ -@@ -933,11 +934,11 @@ void slc_mode_import(int def) { - - void slc_import(int def) { - if (def) { -- netoring.printf("%c%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, -+ netoring.xprintf("%c%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, - LM_SLC, 0, SLC_DEFAULT, 0, IAC, SE); - } - else { -- netoring.printf("%c%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, -+ netoring.xprintf("%c%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_LINEMODE, - LM_SLC, 0, SLC_VARIABLE, 0, IAC, SE); - } - } -@@ -1050,6 +1051,7 @@ void slc_check(void) { - - - unsigned char slc_reply[128]; -+unsigned char const * const slc_reply_eom = &slc_reply[sizeof(slc_reply)]; - unsigned char *slc_replyp; - - void slc_start_reply(void) { -@@ -1061,6 +1063,14 @@ void slc_start_reply(void) { - } - - void slc_add_reply(int func, int flags, int value) { -+ /* A sequence of up to 6 bytes my be written for this member of the SLC -+ * suboption list by this function. The end of negotiation command, -+ * which is written by slc_end_reply(), will require 2 additional -+ * bytes. Do not proceed unless there is sufficient space for these -+ * items. -+ */ -+ if (&slc_replyp[6+2] > slc_reply_eom) -+ return; - if ((*slc_replyp++ = func) == IAC) - *slc_replyp++ = IAC; - if ((*slc_replyp++ = flags) == IAC) -@@ -1142,6 +1152,7 @@ void env_opt(unsigned char *buf, int len) { - } - } - -+/* OPT_REPLY_SIZE must be a multiple of 2. */ - #define OPT_REPLY_SIZE 256 - unsigned char *opt_reply; - unsigned char *opt_replyp; -@@ -1173,6 +1184,7 @@ void env_opt_start_info(void) { - - void env_opt_add(const char *ep) { - const char *vp; -+ const unsigned char *tp; - unsigned char c; - - if (opt_reply == NULL) /*XXX*/ -@@ -1185,11 +1197,12 @@ void env_opt_add(const char *ep) { - return; - } - vp = env_getvalue(ep, 1); -- if (opt_replyp + (vp ? strlen(vp) : 0) + strlen(ep) + 6 > opt_replyend) -+ tp = opt_replyp + (vp ? strlen(vp) * 2 : 0) + strlen(ep) * 2 + 6; -+ if (tp > opt_replyend) - { - register int len; -- opt_replyend += OPT_REPLY_SIZE; -- len = opt_replyend - opt_reply; -+ len = ((tp - opt_reply) + OPT_REPLY_SIZE - 1) & ~(OPT_REPLY_SIZE - 1); -+ opt_replyend = opt_reply + len; - opt_reply = (unsigned char *)realloc(opt_reply, len); - if (opt_reply == NULL) { - /*@*/ printf("env_opt_add: realloc() failed!!!\n"); -@@ -1740,8 +1753,8 @@ void telnet(const char * /*user*/) { - send_do(TELOPT_STATUS, 1); - if (env_getvalue("DISPLAY", 0)) - send_will(TELOPT_XDISPLOC, 1); -- if (eight) -- tel_enter_binary(eight); -+ if (binary) -+ tel_enter_binary(binary); - } - #endif /* !defined(TN3270) */ - -diff --git a/telnet/terminal.cc b/telnet/terminal.cc -index 9eb47ae..764f18f 100644 ---- a/telnet/terminal.cc -+++ b/telnet/terminal.cc -@@ -45,6 +45,8 @@ char terminal_rcsid[] = - #include <signal.h> - #include <errno.h> - #include <stdio.h> -+#include <string.h> -+#include <stdlib.h> - - #include "ring.h" - #include "defines.h" -@@ -155,9 +157,11 @@ int getconnmode(void) { - if (localflow) - mode |= MODE_FLOW; - -- if (my_want_state_is_will(TELOPT_BINARY)) -+ if ((eight & 1) || my_want_state_is_will(TELOPT_BINARY)) - mode |= MODE_INBIN; - -+ if (eight & 2) -+ mode |= MODE_OUT8; - if (his_want_state_is_will(TELOPT_BINARY)) - mode |= MODE_OUTBIN; - -@@ -449,10 +453,13 @@ void TerminalNewMode(int f) - // breaks SunOS. - tmp_tc.c_iflag |= ISTRIP; - } -- if (f & MODE_OUTBIN) { -+ if (f & (MODE_OUTBIN|MODE_OUT8)) { - tmp_tc.c_cflag &= ~(CSIZE|PARENB); - tmp_tc.c_cflag |= CS8; -- tmp_tc.c_oflag &= ~OPOST; -+ if (f & MODE_OUTBIN) -+ tmp_tc.c_oflag &= ~OPOST; -+ else -+ tmp_tc.c_oflag |= OPOST; - } else { - tmp_tc.c_cflag &= ~(CSIZE|PARENB); - tmp_tc.c_cflag |= old_tc.c_cflag & (CSIZE|PARENB); -@@ -468,7 +475,7 @@ void TerminalNewMode(int f) - - #ifdef SIGINFO - signal(SIGINFO, ayt); --#endif SIGINFO -+#endif /* SIGINFO */ - - #if defined(NOKERNINFO) - tmp_tc.c_lflag |= NOKERNINFO; -@@ -504,7 +511,7 @@ void TerminalNewMode(int f) - - #ifdef SIGINFO - signal(SIGINFO, ayt_status); --#endif SIGINFO -+#endif /* SIGINFO */ - - #ifdef SIGTSTP - signal(SIGTSTP, SIG_DFL); -diff --git a/telnet/utilities.cc b/telnet/utilities.cc -index 0448f0a..66839ab 100644 ---- a/telnet/utilities.cc -+++ b/telnet/utilities.cc -@@ -47,6 +47,8 @@ char util_rcsid[] = - #include <sys/socket.h> - #include <unistd.h> - #include <ctype.h> -+#include <string.h> -+#include <stdlib.h> - - #include "ring.h" - #include "defines.h" --- -1.8.4.2 - diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/Warning-fix-in-the-step-of-install.patch b/meta-networking/recipes-netkit/netkit-telnet/files/Warning-fix-in-the-step-of-install.patch deleted file mode 100644 index 9ac75439da..0000000000 --- a/meta-networking/recipes-netkit/netkit-telnet/files/Warning-fix-in-the-step-of-install.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 31362e4c0d02b4a2b952ad0dd32acfb573c442f3 Mon Sep 17 00:00:00 2001 -From: Li xin <lixin.f...@cn.fujitsu.com> -Date: Fri, 28 Nov 2014 07:17:40 +0900 -Subject: [PATCH 2/2] WARNING Fix and modify "CFLAGS" - -WARNING: QA Issue: File '/usr/sbin/in.telnetd' from netkit-telnet was -already stripped, this will prevent future debugging! [already-stripped] - -Upstream-Status: Pending - -Signed-off-by: Li Xin <lixin.f...@cn.fujitsu.com> ---- - telnetd/Makefile | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/telnetd/Makefile b/telnetd/Makefile -index 72650b4..a4cf9fa 100644 ---- a/telnetd/Makefile -+++ b/telnetd/Makefile -@@ -9,7 +9,8 @@ include ../MRULES - # take out -DPARANOID_TTYS. - - CFLAGS += '-DISSUE_FILE="/etc/issue.net"' -DPARANOID_TTYS \ -- -DNO_REVOKE -DKLUDGELINEMODE -DDIAGNOSTICS -+ -DNO_REVOKE -DKLUDGELINEMODE -DDIAGNOSTICS \ -+ -DLOGIN_WRAPPER=\"/${libdir}/telnetlogin\" - # LIBS += $(LIBTERMCAP) - - OBJS = telnetd.o state.o termstat.o slc.o sys_term.o utility.o \ -@@ -27,7 +28,7 @@ $(OBJS): defs.h ext.h pathnames.h telnetd.h logwtmp.h logout.h setproctitle.h - telnetd.o: ../version.h - - install: telnetd -- install -s -m$(DAEMONMODE) telnetd $(INSTALLROOT)$(SBINDIR)/in.telnetd -+ install -m$(DAEMONMODE) telnetd $(INSTALLROOT)$(SBINDIR)/in.telnetd - install -m$(MANMODE) issue.net.5 $(INSTALLROOT)$(MANDIR)/man5/ - install -m$(MANMODE) telnetd.8 $(INSTALLROOT)$(MANDIR)/man8/in.telnetd.8 - ln -sf in.telnetd.8 $(INSTALLROOT)$(MANDIR)/man8/telnetd.8 --- -1.8.4.2 - diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/cross-compile.patch b/meta-networking/recipes-netkit/netkit-telnet/files/cross-compile.patch deleted file mode 100644 index b3fe36b7bb..0000000000 --- a/meta-networking/recipes-netkit/netkit-telnet/files/cross-compile.patch +++ /dev/null @@ -1,48 +0,0 @@ -To support the cross-compile - -Upstream-Status: Pending - -make the configure to support the cross-compile, by only to compile the -target, and not to run it - -Roy Li <rongqing...@windriver.com> -Index: netkit-telnet-0.17/configure -=================================================================== ---- netkit-telnet-0.17.orig/configure 2008-11-23 22:01:26.000000000 +0100 -+++ netkit-telnet-0.17/configure 2008-11-23 22:05:00.000000000 +0100 -@@ -94,7 +94,7 @@ - echo -n 'Checking if C compiler works... ' - if ( - $CC __conftest.c -o __conftest || exit 1 -- ./__conftest || exit 1 -+ # Idiots belong shot! ./__conftest || exit 1 - ) >/dev/null 2>&1; then - echo 'yes' - else -@@ -141,7 +141,7 @@ - echo -n 'Checking if C++ compiler works... ' - if ( - $CXX __conftest.cc -o __conftest || exit 1 -- ./__conftest || exit 1 -+ # Iditios belong shot! ./__conftest || exit 1 - ) >/dev/null 2>&1; then - echo 'yes' - else -@@ -284,7 +284,7 @@ - else - if ( - $CXX $CXXFLAGS -D__USE_BSD_SIGNAL __conftest.cc -o __conftest || exit 1 -- ./__conftest || exit 1 -+ # running still does not work./__conftest || exit 1 - ) >/dev/null 2>&1; then - echo '-D__USE_BSD_SIGNAL' - CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL" -@@ -501,7 +501,7 @@ - EOF - if ( - $CXX $CXXFLAGS __conftest.cc $LIBBSD -o __conftest || exit 1 -- ./__conftest || exit 1 -+ # argh! morons!./__conftest || exit 1 - ) >/dev/null 2>&1; then - echo 'ok' - else diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/telnet-xinetd b/meta-networking/recipes-netkit/netkit-telnet/files/telnet-xinetd deleted file mode 100644 index 12204c71b2..0000000000 --- a/meta-networking/recipes-netkit/netkit-telnet/files/telnet-xinetd +++ /dev/null @@ -1,14 +0,0 @@ -# default: on -# description: The telnet server serves telnet sessions; it uses \ -# unencrypted username/password pairs for authentication. -service telnet -{ - flags = REUSE - socket_type = stream - wait = no - user = root - server = /usr/sbin/in.telnetd - log_on_failure += USERID - disable = yes -} - diff --git a/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb b/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb deleted file mode 100644 index d3de038d16..0000000000 --- a/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb +++ /dev/null @@ -1,74 +0,0 @@ -DESCRIPTION = "netkit-telnet includes the telnet daemon and client." -HOMEPAGE = "http://www.hcs.harvard.edu/~dholland/computers/netkit.html" -SECTION = "net" -DEPENDS = "ncurses" -LICENSE = "BSD-4-Clause" -LIC_FILES_CHKSUM = "file://telnet/telnet.cc;beginline=2;endline=3;md5=780868e7b566313e70cb701560ca95ef" - -SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-telnet/netkit-telnet_${PV}.orig.tar.gz \ - file://To-aviod-buffer-overflow-in-telnet.patch \ - file://Warning-fix-in-the-step-of-install.patch \ - file://telnet-xinetd \ - file://cross-compile.patch \ - file://0001-telnet-telnetd-Fix-print-format-strings.patch \ - file://0001-telnet-telnetd-Fix-deadlock-on-cleanup.patch \ - file://CVE-2020-10188.patch \ - file://0001-telnetd-utility.c-Fix-buffer-overflow-in-netoprintf.patch \ - file://0001-utility-Include-time.h-form-time-and-strftime-protot.patch \ - file://0001-Drop-using-register-keyword.patch \ - file://CVE-2022-39028.patch \ - " - -UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netkit-telnet/" -UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.orig\.tar" - -EXTRA_OEMAKE = "INSTALLROOT=${D} SBINDIR=${sbindir} DAEMONMODE=755 \ - MANMODE=644 MANDIR=${mandir}" - -do_configure () { - ./configure --prefix=${prefix} - sed -e 's#^CFLAGS=\(.*\)$#CFLAGS= -D_GNU_SOURCE \1#' \ - -e 's#^CXXFLAGS=\(.*\)$#CXXFLAGS= -D_GNU_SOURCE \1#' \ - -e 's#^LDFLAGS=.*$#LDFLAGS= ${LDFLAGS}#' \ - -i MCONFIG -} - -do_compile () { - oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' SUB=telnet - oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' LIBS=-lutil SUB=telnetd - oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' SUB=telnetlogin -} - -do_install () { - install -d ${D}${bindir} - install -m 0755 telnet/telnet ${D}${bindir}/telnet.${PN} - install -d ${D}${sbindir} - install -d ${D}${mandir}/man1 - install -d ${D}${mandir}/man5 - install -d ${D}${mandir}/man8 - oe_runmake SUB=telnetd install - rm -rf ${D}${mandir}/man1 - install -D -m 4750 ${B}/telnetlogin/telnetlogin ${D}/${libdir}/telnetlogin - # fix up hardcoded paths - sed -i -e 's,/usr/sbin/,${sbindir}/,' ${WORKDIR}/telnet-xinetd - install -d ${D}/etc/xinetd.d/ - install -p -m644 ${WORKDIR}/telnet-xinetd ${D}/etc/xinetd.d/telnet -} - -inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE:${PN} = "telnet" -ALTERNATIVE_LINK_NAME[telnet] = "${bindir}/telnet" -ALTERNATIVE_TARGET[telnet] = "${bindir}/telnet.${PN}" - -ALTERNATIVE:${PN}-doc = "telnetd.8" -ALTERNATIVE_LINK_NAME[telnetd.8] = "${mandir}/man8/telnetd.8" - -SRC_URI[md5sum] = "d6beabaaf53fe6e382c42ce3faa05a36" -SRC_URI[sha256sum] = "9c80d5c7838361a328fb6b60016d503def9ce53ad3c589f3b08ff71a2bb88e00" -FILES:${PN} += "${sbindir}/in.* ${libdir}/* ${sysconfdir}/xinetd.d/*" - -# http://errors.yoctoproject.org/Errors/Details/186954/ -COMPATIBLE_HOST:libc-musl = 'null' -RCONFLICTS:${PN} = "inetutils-telnetd" diff --git a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch deleted file mode 100644 index 78936907f6..0000000000 --- a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/0001-tftp-Include-missing-fcntl.h.patch +++ /dev/null @@ -1,27 +0,0 @@ -From fa57e161fc953264a75d50a787cb83983e60acc7 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.k...@gmail.com> -Date: Wed, 30 Aug 2017 18:30:02 -0700 -Subject: [PATCH] tftp: Include missing fcntl.h - -Signed-off-by: Khem Raj <raj.k...@gmail.com> ---- -Upstream-Status: Pending - - tftp/main.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tftp/main.c b/tftp/main.c -index 8c54843..5c9b698 100644 ---- a/tftp/main.c -+++ b/tftp/main.c -@@ -63,6 +63,7 @@ char main_rcsid[] = - #include <ctype.h> - #include <netdb.h> - #include <unistd.h> -+#include <fcntl.h> - - #include "tftpsubs.h" /* for mysignal() */ - --- -2.14.1 - diff --git a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/tftp.conf b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/tftp.conf deleted file mode 100644 index 7bc6ca96b6..0000000000 --- a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp/tftp.conf +++ /dev/null @@ -1,11 +0,0 @@ -service tftp -{ - disable = no - socket_type = dgram - port = 69 - protocol = udp - wait = yes - user = nobody - server = /usr/sbin/in.tftpd - server_args = /tftpboot -} diff --git a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb deleted file mode 100644 index 8de3e4a34c..0000000000 --- a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb +++ /dev/null @@ -1,59 +0,0 @@ -SUMMARY = "tftp - Trivial file transfer protocol client" -SECTION = "net" -LICENSE = "BSD-4-Clause" -DEPENDS = "tcp-wrappers" - -LIC_FILES_CHKSUM = "file://tftp/tftp.c;beginline=2;endline=3;md5=84d2cfe1e60863a7d82648734ba4d30c" - -SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz;name=archive \ - ${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}-18.diff.gz;name=patch18 \ - file://tftp.conf \ - file://0001-tftp-Include-missing-fcntl.h.patch \ - " - -SRC_URI[archive.md5sum] = "b7262c798e2ff50e29c2ff50dfd8d6a8" -SRC_URI[archive.sha256sum] = "3a43c0010d4e61f412563fd83769d4667d8b8e82903526d21cb9205fe55ad14d" -SRC_URI[patch18.md5sum] = "cb29e7a33dd85105ba6e6ec4f971e42c" -SRC_URI[patch18.sha256sum] = "092437d27b4fa88c044ef6290372fee5ce06d223607f0e22a6e527065c8930e7" - -inherit autotools-brokensep update-alternatives - -do_configure () { - ./configure --prefix=${prefix} - echo "CFLAGS=${CFLAGS}" > MCONFIG -} - -do_compile () { - oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' 'CFLAGS=${CFLAGS}' -} - -do_install () { - install -d ${D}${bindir} - install -d ${D}${sbindir} - install -d ${D}${mandir}/man1 - install -d ${D}${mandir}/man8 - install -d ${D}${sysconfdir}/xinetd.d - - sed -i 's/install -s/install/' tftp/Makefile - sed -i 's/install -s/install/' tftpd/Makefile - - oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \ - 'DAEMONMODE=0755' 'MANMODE=0644' \ - 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \ - 'MANDIR=${mandir}' install - - install ${WORKDIR}/tftp.conf ${D}/${sysconfdir}/xinetd.d/tftp -} - -PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg" -FILES:${PN}-client = "${bindir}/*" -FILES:${PN}-server = "${sbindir}/* ${sysconfdir}/xinetd.d/*" -FILES:${PN}-doc = "${mandir}" -FILES:${PN}-dbg = "${prefix}/src/debug \ - ${bindir}/.debug ${sbindir}/.debug" - -RDEPENDS:${PN}-server = "tcp-wrappers xinetd" - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE:${PN}-client = "tftp" -ALTERNATIVE_LINK_NAME[tftp] = "${bindir}/tftp" -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#106759): https://lists.openembedded.org/g/openembedded-devel/message/106759 Mute This Topic: https://lists.openembedded.org/mt/102604486/21656 Group Owner: openembedded-devel+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-