summaryrefslogtreecommitdiff
path: root/net-analyzer
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-05 19:20:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-05 19:20:12 +0100
commita4e37a9aeeef82eba5858dbc609f65b838b0f836 (patch)
treee4348e571adc5713a413fbaf411d45c511a7da31 /net-analyzer
parentd03ec6c0e9c1683a824ce77667440dcb4a13974e (diff)
gentoo auto-resync : 05:10:2022 - 19:20:12
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/Manifest.gzbin44728 -> 44731 bytes
-rw-r--r--net-analyzer/netcat/Manifest2
-rw-r--r--net-analyzer/netcat/files/netcat-110.20180111-variadic-holler.patch88
-rw-r--r--net-analyzer/netcat/netcat-110.20180111-r2.ebuild66
4 files changed, 156 insertions, 0 deletions
diff --git a/net-analyzer/Manifest.gz b/net-analyzer/Manifest.gz
index 1b07f22f29e1..bc3748f44834 100644
--- a/net-analyzer/Manifest.gz
+++ b/net-analyzer/Manifest.gz
Binary files differ
diff --git a/net-analyzer/netcat/Manifest b/net-analyzer/netcat/Manifest
index dc7b466edd57..6fe2e333ee76 100644
--- a/net-analyzer/netcat/Manifest
+++ b/net-analyzer/netcat/Manifest
@@ -1,7 +1,9 @@
+AUX netcat-110.20180111-variadic-holler.patch 2670 BLAKE2B 5cf2a2e1dc82b72a2e8e8b89424b6e1b0cf1ed405ffd0d5c62f86ebe7fe093302df7cf1d9519557e09ab48f6627cdfa24c36b5292e46c2fc87bb6c214dc0e110 SHA512 d71da490c2798616329fe4ba3a55c7dab7ef9ed95dcbe2fedb3aef3aa0bb82dabd97c68071cd1b00c7675da93563b7c4cb2adaa01684d9fa3434dd9a41bb035d
DIST nc-v6-20000918.patch.gz 8740 BLAKE2B 56274ee32a77f335c31b5593ae92afdb1758ee02bec2b06eb8e06c2cdf856af26f568be7caf287f248909f9b519f9dc77c78623337024d8c1afc770307187cac SHA512 56326fc7c40ea676173f150842367ea1782e700de682d790bb0f2c0df86e72a30f4c3ea0d937deb9d92f5eed47d2d4cb53edaca7dd23eb394a498b2f424bb2fe
DIST nc110.20180111.tar.xz 69984 BLAKE2B cb345db31d8857fc1c3973eba45c7a45ec0c5721829a19c46f1ec91a792d9d6309930b3bba5df1180989025f7a04ec8c85cf4832ac6f4199d13f15764f000420 SHA512 4413849c07c6ec5aae07c6e2baa1ba9a99721fa6ac08cf9e7d15379937a207246eb4f4299dd8c049445a72eac9cfe0a3633a87e4e01e21036db1217ea7a1e330
DIST nc110.tgz 75267 BLAKE2B 203b5f54805ddef2c3e9627300dfb6d14f098e88433ca807c8db01f009dec1ccc329925025238dae00b5e82e91c0787ef25536d08310ac127cda1775cfb2afb3 SHA512 c9a7f5045f76d9ffef4e83fcc3e82f69ac4eb05e061686db51e9367949bfe0b90226b290a059dc68dcf3bf2040b95b5c78545199674da57a7c73e2f9145cf812
DIST netcat-110-patches-1.0.tar.bz2 25751 BLAKE2B c0be51a057981ad1df932f7317a1c317c8788efa670778a4f5bbf67c9d983754bd20188a15e7ced3d849a25244926afc54129e0a2df07bc34932d15a3efbf302 SHA512 b9e7e35aa7e26d30f0115d87aff34fd0cadfad99fdb77cc5aa3ba51bec331f632e180484927c4368172ee9cc6c996b8691bd19bad8806912d8820158a98eab46
EBUILD netcat-110-r9.ebuild 1648 BLAKE2B fa3fc6c694fc056d1f55d96855784ff492a40d312639820519a786b24549e9031e43016ea791d99fdc82c06fd7c4e0d2ffa59d85e9159948d4f1fd830ae53645 SHA512 2d35b812bafa2865c55370c4825e78e53a5c9f2bb7add8f64194713312856872ac2a37de4b5aa69a23fc45fa96c413ee77e450c2e93c750c8f01c0ca93be956c
EBUILD netcat-110.20180111-r1.ebuild 1313 BLAKE2B 222480b563afaed3eb02986ef22e83725732f433ac377d731fac7171f43836fe389c917e73dbf52cccd34b23c758e6ef1f8b1b75b96490c33e9816f6ca902e95 SHA512 8f0e581570d68a927a0085057f9a1339e6bc9cf9e2037b390caf1c56b61127e8f5f51c62eb10ab83e4fc0bc112eec924e831af5012e9becfa3fa8f7b230a2637
+EBUILD netcat-110.20180111-r2.ebuild 1375 BLAKE2B dbde29c434267290e8673af6b86f8d3d35882e402266243640f7bba9d6c09988e9850cff5437960c1d63141be03e68da56dfdc616b6351f92b012be7d1994103 SHA512 046077a06d23cd741419b3786d9fc3ab40ed512fb5993a4ace987ec16bcffb6fab672ee5d6f340c86a1a2ffd6f94cf9348d5f3bb88a6cb3f9bd2b7cc5ab0596d
MISC metadata.xml 521 BLAKE2B 8f4b035d7883868bf0bc9c16be0de72df93481e62c111f18cf925cd218f7ae165ae68cd0c30653cf246050abe8eb7fc7159eb9a277a166664bb15111548f78f6 SHA512 cfc371810ed68ba2ac4b5a11a58cd595032cc7bc332747730df3bdfddae25a8c20bd115f4e77aea68bc91de0e3ee137b2b8b1bda572491847c7ac05ec4a0d1f4
diff --git a/net-analyzer/netcat/files/netcat-110.20180111-variadic-holler.patch b/net-analyzer/netcat/files/netcat-110.20180111-variadic-holler.patch
new file mode 100644
index 000000000000..36fda8614eef
--- /dev/null
+++ b/net-analyzer/netcat/files/netcat-110.20180111-variadic-holler.patch
@@ -0,0 +1,88 @@
+Subject: [PATCH] Convert holler and bail to variadic function
+
+Both functions usually consume different types than char * which is
+problematic for some compliers like clang-16 where -Werror=implicit-int
+is enabled by default.
+
+The fix is done in such a way that original holler function is converted
+to vholer which uses va_list from stdarg.h and holler and bail are
+converted to variadic functions that utilize vholler for printing.
+
+Bug: https://bugs.gentoo.org/871003
+
+diff --git a/netcat.c b/netcat.c
+index 992c42b..b4d6fd8 100644
+--- a/netcat.c
++++ b/netcat.c
+@@ -80,6 +80,7 @@
+ #include <signal.h>
+ #include <fcntl.h> /* O_WRONLY et al */
+ #include <unistd.h>
++#include <stdarg.h>
+
+ /* handy stuff: */
+ #define SA struct sockaddr /* socket overgeneralization braindeath */
+@@ -215,23 +216,18 @@ int o_quit = -1; /* 0 == quit-now; >0 == quit after o_quit seconds */
+ /* support routines -- the bulk of this thing. Placed in such an order that
+ we don't have to forward-declare anything: */
+
+-/* holler :
+- fake varargs -- need to do this way because we wind up calling through
+- more levels of indirection than vanilla varargs can handle, and not all
+- machines have vfprintf/vsyslog/whatever! 6 params oughta be enough. */
+-void holler (str, p1, p2, p3, p4, p5, p6)
+- char * str;
+- char * p1, * p2, * p3, * p4, * p5, * p6;
++/* vholler : */
++void vholler(const char * str, va_list ap)
+ {
+ FILE *o_holler_out = (o_holler_stderr ? stderr : stdout);
+ if (o_verbose) {
+- fprintf (o_holler_out, str, p1, p2, p3, p4, p5, p6);
++ vfprintf (o_holler_out, str, ap);
+ #ifdef HAVE_BIND
+ if (h_errno) { /* if host-lookup variety of error ... */
+ if (h_errno > 4) /* oh no you don't, either */
+ fprintf (o_holler_out, "preposterous h_errno: %d", h_errno);
+ else
+- fprintf (o_holler_out, h_errs[h_errno]); /* handle it here */
++ fputs (h_errs[h_errno], o_holler_out); /* handle it here */
+ h_errno = 0; /* and reset for next call */
+ }
+ #endif
+@@ -241,16 +237,27 @@ void holler (str, p1, p2, p3, p4, p5, p6)
+ fprintf (o_holler_out, "\n");
+ fflush (o_holler_out);
+ }
+-} /* holler */
++} /* vholler */
++
++void holler(const char * fmt, ...)
++{
++ va_list ap;
++ va_start(ap, fmt);
++ vholler(fmt, ap);
++ va_end(ap);
++}
+
+ /* bail :
+ error-exit handler, callable from anywhere */
+-void bail (str, p1, p2, p3, p4, p5, p6)
+- char * str;
+- char * p1, * p2, * p3, * p4, * p5, * p6;
++void bail (const char * fmt, ...)
+ {
+ o_verbose = 1;
+- holler (str, p1, p2, p3, p4, p5, p6);
++ va_list ap;
++
++ va_start(ap, fmt);
++ vholler(fmt, ap);
++ va_end(ap);
++
+ close (netfd);
+ exit (1);
+ } /* bail */
+--
+2.35.1
+
diff --git a/net-analyzer/netcat/netcat-110.20180111-r2.ebuild b/net-analyzer/netcat/netcat-110.20180111-r2.ebuild
new file mode 100644
index 000000000000..1818338b51ac
--- /dev/null
+++ b/net-analyzer/netcat/netcat-110.20180111-r2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs flag-o-matic
+
+MY_P="nc${PV}"
+DESCRIPTION="The network swiss army knife"
+HOMEPAGE="https://nc110.sourceforge.io"
+SRC_URI="mirror://sourceforge/nc110/${MY_P}.tar.xz"
+S="${WORKDIR}/nc110"
+
+LICENSE="netcat"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc64-solaris ~x64-solaris"
+IUSE="ipv6 static"
+
+PATCHES=(
+ "${FILESDIR}/${P}-variadic-holler.patch"
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e '/#define HAVE_BIND/s:#define:#undef:' \
+ -e '/#define FD_SETSIZE 16/s:16:1024: #34250' \
+ netcat.c || die
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ sed -i 's:gethostbyname2 *(\([^)]\+\)):getipnodebyname (\1, AI_DEFAULT, NULL):' netcat.c || die
+ fi
+}
+
+src_configure() {
+ if ! use ipv6 ; then
+ sed -i '/#define INET6/d' generic.h || die
+ fi
+
+ append-cppflags -DTELNET -DGAPING_SECURITY_HOLE
+}
+
+src_compile() {
+ local xlibs
+
+ [[ ${CHOST} == *-solaris* ]] && xlibs+=" -lnsl -lsocket"
+
+ emake \
+ LD="$(tc-getCC) ${LDFLAGS}" \
+ DFLAGS="${CPPFLAGS}" \
+ XFLAGS="${CFLAGS}" \
+ STATIC=$(usex static '-static' '') \
+ XLIBS="${xlibs}" \
+ nc
+}
+
+src_install() {
+ dobin nc
+
+ dodoc README* netcat.blurb
+ doman nc.1
+
+ docinto scripts
+ dodoc scripts/*
+}