diff options
Diffstat (limited to 'meta-networking/recipes-netkit')
25 files changed, 886 insertions, 101 deletions
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 index 8376603ead..2cd639ee92 100644 --- 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 @@ -10,6 +10,8 @@ ftp.c:1091:2: error: unknown type name 'u_long'; did you mean 'long'? Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + ftp/ftp.c | 1 + 1 file changed, 1 insertion(+) 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 index 5a47fd9175..5db004865f 100644 --- 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 @@ -1,7 +1,6 @@ This adds ARG_MAX define to be _SC_ARG_MAX -Upstream-Status: Inappropriate. -Most distros have their own verion for this fix. +Upstream-Status: Inappropriate [Most distros have their own verion for this fix] Signed-off-by: Armin Kuster <akuster808@gmail.com> 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 index 394a69e629..31fdd9e4d8 100644 --- a/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb +++ b/meta-networking/recipes-netkit/netkit-ftp/netkit-ftp_0.17.bb @@ -1,22 +1,21 @@ DESCRIPTION = "netkit-ft includes the ftp client." SECTION = "net" HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit" -LICENSE = "BSD" +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}-31.debian.tar.xz;name=patch31 \ + ${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.md5sum] = "94441610c9b86ef45c4c6ec609444060" SRC_URI[archive.sha256sum] = "61c913299b81a4671ff089aac821329f7db9bc111aa812993dd585798b700349" -SRC_URI[patch31.md5sum] = "93d71e28ce70df69e080c7f90da63cac" -SRC_URI[patch31.sha256sum] = "4edd46a32d70daa7ba00f0ebf0118dc5d17dff23d6e46aa21a2722be2e22d1c1" +SRC_URI[patch34.sha256sum] = "716b984bc6926ed98345fa4e68adcee2efcf08d0f7315d6be8ad6de76f255748" + +inherit autotools-brokensep update-alternatives -inherit autotools-brokensep +CLEANBROKEN = "1" do_configure () { ./configure --prefix=${prefix} @@ -39,9 +38,13 @@ do_install () { } PACKAGES = "${PN} ${PN}-doc ${BPN}-dbg" -FILES_${PN} = "${bindir}/*" -FILES_${PN}-doc = "${mandir}" -FILES_${PN}-dbg = "${prefix}/src/debug \ +FILES:${PN} = "${bindir}/*" +FILES:${PN}-doc = "${mandir}" +FILES:${PN}-dbg = "${prefix}/src/debug \ ${bindir}/.debug" -RDEPENDS_${PN} = "readline" +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 index 8bd77d2e47..508db6aadf 100644 --- 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 @@ -7,6 +7,8 @@ Fixes build with hardening flags Signed-off-by: Khem Raj <raj.khem@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/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch b/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch index d54cea9fdc..83bcc4b490 100644 --- a/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch +++ b/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/gcc4.patch @@ -2,9 +2,9 @@ This fixes an issue when building with gcc 4.x https://github.com/openembedded/openembedded/tree/master/recipes/netkit-rpc/netkit-rpc -Upstream-status: Backported +Upstream-Status: Backport -Signed-off-By: Armin Kuster <akuster808@gmail.com> +Signed-off-by: Armin Kuster <akuster808@gmail.com> --- netkit-rpc-0.17/rpcgen/rpc_cout.c~gcc4 +++ netkit-rpc-0.17/rpcgen/rpc_cout.c 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 index ebe867d776..cb05645ee8 100644 --- a/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb +++ b/meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb @@ -11,6 +11,9 @@ SRC_URI = "http://sources.openembedded.org/${BPN}-${PV}.tar.gz \ " SRC_URI[md5sum] = "67212720482ea1aea9182a98653a9642" SRC_URI[sha256sum] = "421d63b414162237a72867061f1bd3e3752a0d962cd5d30b5e933ddad8a14d3b" + +inherit update-alternatives + CFLAGS += "-I${STAGING_INCDIR}/tirpc" LIBS += "-ltirpc" @@ -42,3 +45,7 @@ do_install () { '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 new file mode 100644 index 0000000000..285667b869 --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch @@ -0,0 +1,35 @@ +From a7831a16c3e0e1463d5eb08a58af152cb75ca976 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@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.zhao@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/fixup_wait3_api_change.patch b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fixup_wait3_api_change.patch index cd6df62fb3..c6e2e60624 100644 --- 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 @@ -8,7 +8,7 @@ https://sourceware.org/ml/libc-alpha/2016-02/msg00342.html Upstream-Status: Inappropriate [ no upstream maintaner ] -Signed-off-by Armin Kuster <akuster@mvista.com> +Signed-off-by: Armin Kuster <akuster@mvista.com> Index: netkit-rsh-0.17/rlogin/rlogin.c =================================================================== 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 index efd060f365..7afd70859f 100644 --- 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 @@ -1,6 +1,6 @@ make rexec support ipv6 -Upstream-status: Pending +Upstream-Status: Pending rexec equals rexec_af(... ,AF_INET) which only support ipv4, use rexec_af(..., AF_UNSPEC) to support both ipv6 and ipv4. 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 index c12ee9b465..ab0b9b64bc 100644 --- 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 @@ -8,7 +8,7 @@ Most distos have there own verison of this fix. This was derived by -- Colin Watson <cjwatson@ubuntu.com> Tue, 13 Sep 2011 10:07:08 +0100 -signed-off-by: Armin Kuster <akuster808@gmail.com> +Signed-off-by: Armin Kuster <akuster808@gmail.com> Index: netkit-rsh-0.17/rsh/Makefile =================================================================== 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 index 3990f7b527..5ea553e871 100644 --- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb +++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb @@ -2,7 +2,7 @@ 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" +DEPENDS = "xinetd libgcrypt virtual/crypt" LIC_FILES_CHKSUM = "file://rsh/rsh.c;endline=32;md5=487b3c637bdc181d32b2a8543d41b606" @@ -16,6 +16,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}.orig.tar.gz;name= 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" @@ -30,15 +31,17 @@ PAM_SRC_URI = "file://rexec.pam \ " SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" -inherit pkgconfig +inherit pkgconfig update-alternatives CFLAGS += " -D_GNU_SOURCE -Wno-deprecated-declarations" LDFLAGS += " -L${STAGING_LIBDIR} -lutil -lcrypt" PACKAGECONFIG ??= "" -PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" +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 @@ -79,15 +82,15 @@ do_install () { 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 \ +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:${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" @@ -95,8 +98,8 @@ 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" +RCONFLICTS:${PN}-server += "inetutils-rshd" +RPROVIDES:${PN}-server = "rshd" -RDEPENDS_${PN}-server = "xinetd" -RDEPENDS_${PN}-server += "tcp-wrappers" +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 index 55926468d9..3655a57162 100644 --- 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 @@ -13,21 +13,69 @@ Upstream-Status: Pending rup/rup.c | 2 +- 4 files changed, 4 insertions(+), 13 deletions(-) -diff --git a/configure b/configure -index 85f6ca6..2d2d4b7 100755 --- a/configure +++ b/configure -@@ -147,7 +147,7 @@ else +@@ -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= +-LDFLAGS= -LIBS= -+LIBS="-ltirpc" ++LIBS="$LIBS -ltirpc" rm -f __conftest* -diff --git a/rpc.rusersd/rusers_proc.c b/rpc.rusersd/rusers_proc.c -index 9ae6306..f9e237c 100644 +@@ -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[] = @@ -44,8 +92,6 @@ index 9ae6306..f9e237c 100644 void rusers_service(struct svc_req *rqstp, SVCXPRT *transp); -diff --git a/rpc.rusersd/rusersd.c b/rpc.rusersd/rusersd.c -index 762be9b..dd355ac 100644 --- a/rpc.rusersd/rusersd.c +++ b/rpc.rusersd/rusersd.c @@ -38,11 +38,7 @@ char rusersd_rcsid[] = @@ -61,11 +107,9 @@ index 762be9b..dd355ac 100644 #include "../version.h" -diff --git a/rup/rup.c b/rup/rup.c -index e5669ff..887f89d 100644 --- a/rup/rup.c +++ b/rup/rup.c -@@ -48,7 +48,7 @@ char rcsid[] = "$Id: rup.c,v 1.8 2000/07/22 19:51:40 dholland Exp $"; +@@ -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 @@ -74,6 +118,3 @@ index e5669ff..887f89d 100644 #include "../version.h" --- -2.17.0 - 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 index 113f89b7f5..c45cbcd925 100644 --- a/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb +++ b/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb @@ -2,9 +2,9 @@ DESCRIPTION = "netkit-rusers includes rusers - Displays who is logged in to mach rusersd - Logged in users server" HOMEPAGE = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit" SECTION = "net" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://rusers/rusers.c;beginline=2;endline=3;md5=f4fc634a4ce8c569911196b72b10770e" -DEPENDS = " tcp-wrappers libtirpc rpcbind" +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 \ @@ -17,16 +17,12 @@ SRC_URI[archive.sha256sum] = "f00138651865ad2dcfec5dedda0cda403cb80c4ab68efcc3bb SRC_URI[patch8.md5sum] = "1ff498113e0f920d92088092e5570bdc" SRC_URI[patch8.sha256sum] = "14882dbdda4e37baa84d55b54b46c7e063a20fc9e04d1be1a2807643cd0f3067" -inherit autotools-brokensep - CFLAGS += "-I${STAGING_INCDIR}/tirpc" -LIBS += "-ltirpc" + +EXTRA_OEMAKE = "RUSERSX=${STAGING_INCDIR}/rpcsvc/rusers.x" do_configure () { - ./configure --prefix=${prefix} - echo "LDFLAGS=${LDFLAGS}" >> MCONFIG - echo "USE_GLIBC=1" >> MCONFIG - echo "LIBS=${LIBS}" >> MCONFIG + ./configure --prefix=${prefix} --installroot=${D} --with-c-compiler="${CC}" } do_install () { @@ -62,14 +58,15 @@ EOF install rusersd.conf ${D}/${sysconfdir}/xinetd.d/rusersd } - -INSANE_SKIP_${PN} = "already-stripped" - 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 \ +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" +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/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 index 717b4d73f4..349a1351fe 100644 --- 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 @@ -12,8 +12,6 @@ Upstream-Status: Pending rwhod/rwhod.c | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) -diff --git a/ruptime/ruptime.c b/ruptime/ruptime.c -index 1d4f7b6..f1f043c 100644 --- a/ruptime/ruptime.c +++ b/ruptime/ruptime.c @@ -53,6 +53,7 @@ char ruptime_rcsid[] = @@ -24,11 +22,9 @@ index 1d4f7b6..f1f043c 100644 struct hs { char hs_hostname[MAXHOSTNAMELEN]; -diff --git a/rwho/rwho.c b/rwho/rwho.c -index 63919ac..71aec9e 100644 --- a/rwho/rwho.c +++ b/rwho/rwho.c -@@ -49,6 +49,7 @@ char rcsid[] = "$Id: rwho.c,v 1.7 1999/08/01 20:44:18 dholland Exp $"; +@@ -49,6 +49,7 @@ char rcsid[] = "$Id: rwho.c,v 1.7 1999/0 #include <assert.h> #include <stdio.h> #include <time.h> @@ -36,8 +32,6 @@ index 63919ac..71aec9e 100644 #include <protocols/rwhod.h> #include "../version.h" -diff --git a/rwhod/rwhod.c b/rwhod/rwhod.c -index 54498d0..40cabcf 100644 --- a/rwhod/rwhod.c +++ b/rwhod/rwhod.c @@ -76,6 +76,7 @@ char rcsid[] = @@ -66,6 +60,13 @@ index 54498d0..40cabcf 100644 /* * Taken from: * --- -2.14.1 - +--- 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_0.17.bb b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb index 5685f03d62..51168f958e 100644 --- a/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb +++ b/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb @@ -1,11 +1,11 @@ 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" +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;name=patch13 \ + ${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 \ @@ -20,13 +20,37 @@ inherit autotools-brokensep useradd update-rc.d update-alternatives CFLAGS += " -D_GNU_SOURCE" -debian_do_patch() { - cd ${S} - while read line; do patch -p1 < ${WORKDIR}/debian/patches/$line; done < ${WORKDIR}/debian/patches/series +# 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('debian_do_patch', d) + bb.build.exec_func('netkit_do_patch', d) bb.build.exec_func('patch_do_patch', d) } @@ -58,12 +82,11 @@ do_install () { mkdir -p -m 755 ${D}${localstatedir}/spool/rwho chown -R rwhod ${D}${localstatedir}/spool/rwho } - -pkg_postinst_${PN}-server() { +pkg_postinst_ontarget:${PN}-server() { ${sysconfdir}/init.d/rwhod start } -pkg_postrm_${PN}-server() { +pkg_postrm:${PN}-server() { ${sysconfdir}/init.d/rwhod stop } @@ -71,15 +94,15 @@ 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 \ +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" +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 \ +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 new file mode 100644 index 0000000000..f508711d34 --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-telnet/files/0001-Drop-using-register-keyword.patch @@ -0,0 +1,457 @@ +From af89f36fbeb5f6a078b349eed8fc4ad6fbfdf5d1 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@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.khem@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 index 945785d3ce..afcc66dada 100644 --- 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 @@ -47,6 +47,8 @@ in upstream. Signed-off-by: Seiichi Ishitsuka <ishitsuka.sc@ncos.nec.co.jp> --- +Upstream-Status: Pending + telnetd/ext.h | 1 + telnetd/sys_term.c | 17 ++++++++++++++++- telnetd/telnetd.c | 2 +- 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 index f2f1b12e28..755b882b67 100644 --- 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 @@ -7,6 +7,8 @@ Fixes build with hardening flags Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + telnet/utilities.cc | 6 +++--- telnetd/utility.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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 new file mode 100644 index 0000000000..8f983e40ab --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnetd-utility.c-Fix-buffer-overflow-in-netoprintf.patch @@ -0,0 +1,56 @@ +From 9c81c8e5bc7782e8ae12c078615abc3c896059f2 Mon Sep 17 00:00:00 2001 +From: Julius Hemanth Pitti <jpitti@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 <jpitti@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 new file mode 100644 index 0000000000..a5e634caab --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-telnet/files/0001-utility-Include-time.h-form-time-and-strftime-protot.patch @@ -0,0 +1,27 @@ +From 23b068e695881be0e8205ecccadf775fc3d5889d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@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.khem@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 new file mode 100644 index 0000000000..d21c602746 --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-telnet/files/CVE-2020-10188.patch @@ -0,0 +1,112 @@ +From 6ab007dbb1958371abff2eaaad2b26da89b3c74e Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@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.zhao@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/To-aviod-buffer-overflow-in-telnet.patch b/meta-networking/recipes-netkit/netkit-telnet/files/To-aviod-buffer-overflow-in-telnet.patch index 7fff8cffc4..34a6479790 100644 --- 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 @@ -5,7 +5,7 @@ Subject: [PATCH 1/2] To aviod buffer overflow in telnet This patch is from Fedora. -Upstream-Status: pending +Upstream-Status: Pending Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> --- 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 index b9a98f1d6f..9ac75439da 100644 --- 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 @@ -6,7 +6,7 @@ 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 +Upstream-Status: Pending Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> --- 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 index 9fe3d6e51c..e28eeae491 100644 --- a/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb +++ b/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb @@ -2,16 +2,20 @@ 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" +LICENSE = "BSD-4-Clause" LIC_FILES_CHKSUM = "file://telnet/telnet.cc;beginline=2;endline=3;md5=780868e7b566313e70cb701560ca95ef" -SRC_URI = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${BP}.tar.gz \ +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 \ " UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netkit-telnet/" @@ -53,9 +57,17 @@ do_install () { inherit update-alternatives ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "telnet" +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/*" +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_0.17.bb b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb index 92c13e850c..8de3e4a34c 100644 --- a/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb +++ b/meta-networking/recipes-netkit/netkit-tftp/netkit-tftp_0.17.bb @@ -16,7 +16,7 @@ SRC_URI[archive.sha256sum] = "3a43c0010d4e61f412563fd83769d4667d8b8e82903526d21c SRC_URI[patch18.md5sum] = "cb29e7a33dd85105ba6e6ec4f971e42c" SRC_URI[patch18.sha256sum] = "092437d27b4fa88c044ef6290372fee5ce06d223607f0e22a6e527065c8930e7" -inherit autotools-brokensep +inherit autotools-brokensep update-alternatives do_configure () { ./configure --prefix=${prefix} @@ -46,10 +46,14 @@ do_install () { } 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 \ +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" +RDEPENDS:${PN}-server = "tcp-wrappers xinetd" + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE:${PN}-client = "tftp" +ALTERNATIVE_LINK_NAME[tftp] = "${bindir}/tftp" |