diff options
| author | Liguros - Gitlab CI/CD [master] <gitlab@liguros.net> | 2021-01-27 18:53:03 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [master] <gitlab@liguros.net> | 2021-01-27 18:53:03 +0000 |
| commit | 3482ddf943eff7b8848f1fb31350b99ce349e86a (patch) | |
| tree | 9c9bb6ec6679e9dc44a84d87ba611989409b12ca /net-misc/iputils | |
| parent | 8e8120eabdd28020aa69c7a60505cce2edd20adc (diff) | |
| download | baldeagleos-repo-21.1.3.tar.gz baldeagleos-repo-21.1.3.tar.xz baldeagleos-repo-21.1.3.zip | |
Updating liguros repov21.1.3
Diffstat (limited to 'net-misc/iputils')
| -rw-r--r-- | net-misc/iputils/files/iputils-20200821-fclose.patch | 45 | ||||
| -rw-r--r-- | net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch | 43 | ||||
| -rw-r--r-- | net-misc/iputils/files/iputils-20200821-install-sbindir.patch | 29 | ||||
| -rw-r--r-- | net-misc/iputils/iputils-20200821-r2.ebuild (renamed from net-misc/iputils/iputils-20200821.ebuild) | 10 |
4 files changed, 124 insertions, 3 deletions
diff --git a/net-misc/iputils/files/iputils-20200821-fclose.patch b/net-misc/iputils/files/iputils-20200821-fclose.patch new file mode 100644 index 000000000000..cc370f0a5561 --- /dev/null +++ b/net-misc/iputils/files/iputils-20200821-fclose.patch @@ -0,0 +1,45 @@ +From e1c3d09b412ad0d022178344b8cbf748dc60f17f Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Sun, 24 Jan 2021 23:29:27 -0500 +Subject: [PATCH] tftpd: recvfile: avoid closing the file twice + +The close_stream function calls fclose, so don't call it again. + +This resolves an abort in glibc: + + Message: Process 1038079 (tftpd) of user 65534 dumped core. + + Stack trace of thread 1038079: + #0 0x00007f5f650ed204 raise (libc.so.6 + 0x39204) + #1 0x00007f5f650d6547 abort (libc.so.6 + 0x22547) + #2 0x00007f5f6512f25f n/a (libc.so.6 + 0x7b25f) + #3 0x00007f5f651372fa n/a (libc.so.6 + 0x832fa) + #4 0x00007f5f65138dc2 n/a (libc.so.6 + 0x84dc2) + #5 0x00007f5f65124b2f fclose (libc.so.6 + 0x70b2f) + #6 0x000055571a50de73 recvfile (tftpd + 0x2e73) + #7 0x000055571a50e064 tftp (tftpd + 0x3064) + #8 0x000055571a50e387 tftpd_inetd (tftpd + 0x3387) + #9 0x000055571a50e50f main (tftpd + 0x350f) + #10 0x00007f5f650d7e6d __libc_start_main (libc.so.6 + 0x23e6d) + #11 0x000055571a50d3ca _start (tftpd + 0x23ca) + +Fixes: 5d6be65 ("tftpd: remove global variables by using a run state struct") + +Reviewed-by: Petr Vorel <pvorel@suse.cz> +Signed-off-by: Mike Gilbert <floppym@gentoo.org> +--- + tftpd/tftpd.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c +index 42998f9b..a09d32ba 100644 +--- a/tftpd/tftpd.c ++++ b/tftpd/tftpd.c +@@ -387,7 +387,6 @@ void recvfile(struct run_state *ctl, struct formats *pf) + write_behind(ctl->file, pf->f_convert); + if (close_stream(ctl->file)) + syslog(LOG_ERR, "tftpd: write error: %s\n", strerror(errno)); +- fclose(ctl->file); /* close data file */ + + ap->th_opcode = htons((uint16_t)ACK); /* send the "final" ack */ + ap->th_block = htons(block); diff --git a/net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch b/net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch new file mode 100644 index 000000000000..5b69e5c88fb7 --- /dev/null +++ b/net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch @@ -0,0 +1,43 @@ +From 469b41ac89b9f6772ea31df8379669d205be95f8 Mon Sep 17 00:00:00 2001 +From: Nuno Silva <nuno.m.ribeiro.silva@tecnico.ulisboa.pt> +Date: Mon, 24 Aug 2020 19:34:53 +0100 +Subject: [PATCH] common: fix infinite loop when getrandom fails + +Fixes: https://github.com/iputils/iputils/issues/291 +--- + iputils_common.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/iputils_common.c b/iputils_common.c +index 58eacd0..c41f201 100644 +--- a/iputils_common.c ++++ b/iputils_common.c +@@ -98,18 +98,24 @@ static unsigned int iputil_srand_fallback(void) + void iputils_srand(void) + { + unsigned int i; ++ + #if HAVE_GETRANDOM + ssize_t ret; + +- while ((ret = getrandom(&i, sizeof(i), GRND_NONBLOCK)) != sizeof(i)) { +- switch(errno) { ++ do { ++ errno = 0; ++ ret = getrandom(&i, sizeof(i), GRND_NONBLOCK); ++ switch (errno) { ++ case 0: ++ break; + case EINTR: + continue; + default: + i = iputil_srand_fallback(); +- break; ++ goto done; + } +- } ++ } while (ret != sizeof(i)); ++ done: + #else + i = iputil_srand_fallback(); + #endif diff --git a/net-misc/iputils/files/iputils-20200821-install-sbindir.patch b/net-misc/iputils/files/iputils-20200821-install-sbindir.patch new file mode 100644 index 000000000000..cb1575841ccd --- /dev/null +++ b/net-misc/iputils/files/iputils-20200821-install-sbindir.patch @@ -0,0 +1,29 @@ +From 8d1420f3019cd1caccf2ffa15a5873f0c61ab529 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Sun, 24 Jan 2021 22:39:03 -0500 +Subject: [PATCH] tftpd: install into sbindir + +The xinet.d config expects the daemon to live in sbindir. + +Closes: https://github.com/iputils/iputils/pull/310 + +Reviewed-by: Petr Vorel <pvorel@suse.cz> +Signed-off-by: Mike Gilbert <floppym@gentoo.org> +--- + tftpd/meson.build | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tftpd/meson.build b/tftpd/meson.build +index 6e508a24..b4cf6812 100644 +--- a/tftpd/meson.build ++++ b/tftpd/meson.build +@@ -3,7 +3,8 @@ inc = include_directories('..') + executable('tftpd', ['tftpd.c', 'tftpsubs.c', git_version_h], + include_directories : inc, + link_with : [libcommon], +- install: true) ++ install: true, ++ install_dir: sbindir) + + subs = configuration_data() + subs.set('sbindir', sbindir) diff --git a/net-misc/iputils/iputils-20200821.ebuild b/net-misc/iputils/iputils-20200821-r2.ebuild index 035fe9df7914..a048e91a579b 100644 --- a/net-misc/iputils/iputils-20200821.ebuild +++ b/net-misc/iputils/iputils-20200821-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # For released versions, we precompile the man/html pages and store @@ -20,7 +20,7 @@ if [[ ${PV} == "99999999" ]] ; then else SRC_URI="https://github.com/iputils/iputils/archive/s${PV}.tar.gz -> ${P}.tar.gz https://dev.gentoo.org/~whissi/dist/iputils/${PN}-manpages-${PV}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc ~x86 ~amd64-linux ~x86-linux" fi DESCRIPTION="Network monitoring tools including ping and ping6" @@ -61,7 +61,11 @@ fi [ "${PV}" == "99999999" ] || S="${WORKDIR}/${PN}-s${PV}" -PATCHES=() +PATCHES=( + "${FILESDIR}/iputils-20200821-getrandom-fallback.patch" + "${FILESDIR}/iputils-20200821-fclose.patch" + "${FILESDIR}/iputils-20200821-install-sbindir.patch" +) src_prepare() { default |
