public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
@ 2019-09-28 18:27 Matt Turner
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Turner @ 2019-09-28 18:27 UTC (permalink / raw
  To: gentoo-commits

commit:     68d8e6b191da940f0b553b24f9d7bedffd771b8a
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 28 18:07:39 2019 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Sep 28 18:27:12 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68d8e6b1

net-libs/libtirpc: Drop old versions

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 net-libs/libtirpc/Manifest                         |  2 -
 .../files/libtirpc-1.0.2-bzero-to-memset.patch     | 36 ------------
 .../libtirpc/files/libtirpc-1.0.2-exports.patch    | 17 ------
 .../libtirpc/files/libtirpc-1.0.2-glibc-2.26.patch | 12 ----
 net-libs/libtirpc/libtirpc-1.0.2-r1.ebuild         | 65 ----------------------
 net-libs/libtirpc/libtirpc-1.0.3.ebuild            | 63 ---------------------
 6 files changed, 195 deletions(-)

diff --git a/net-libs/libtirpc/Manifest b/net-libs/libtirpc/Manifest
index 96612140117..ee8d1d01072 100644
--- a/net-libs/libtirpc/Manifest
+++ b/net-libs/libtirpc/Manifest
@@ -1,4 +1,2 @@
-DIST libtirpc-1.0.2.tar.bz2 509601 BLAKE2B 7ccf23ca200e2027a66a3105d9b3d0612ac66a08498931f66526a291be6ddef8e7df533af4d44a0e4a1178edd6d51ae39ca50c2536b9b1be7179e7f17cfd165e SHA512 6c819019a8e81d8263d3c509b2eee59ba1ef092222c5a0a8d28f004c711afa252097eca7e6b0b919b2d780883dfd9ee7a363df4cee7fd2c9159a065257637cec
-DIST libtirpc-1.0.3.tar.bz2 509831 BLAKE2B 3f908471b3e10f88329793db2c832754b9bb838d115235d7c25256da883960de8d8c94a6941fc9c2a3cc4dca9a77c32b5cb85bb347cc182e5a6255636b79b06e SHA512 1f1cf7dd6f30ddddc919e4caf6db926f1d532f78d5a93e8aaa2acde6b046be0650c4c46549da0ffd5fa7fb9e550af1a871ed6e02ededf504c6667d2e82eba2cc
 DIST libtirpc-1.1.4.tar.bz2 510924 BLAKE2B 1780f9bb0543583c01b60bda681add0ec2f8718eda4ce4653883c772466178e37d0a3fb47004109f81de470129458561fac4f109f45154c64b6fb729f0212c90 SHA512 392f391f9fc1bd68d81dc44e4058831a64b32790b5c8c37338b0ab416fad2ae4d16389e632596734dba09780347918cc65c6f134e0c1afd09e81ec250785ed23
 DIST libtirpc-glibc-nfs.tar.xz 8948 BLAKE2B 7316623d9f2b6928e296137fe2bf6794b208d549c2ffba9e4a35b47f7b04bf023798a09f38c02d039debf6adc466d7689cf3c8274d71a22eaff08729642c0a28 SHA512 90255bf0a27af16164e0710dd940778609925d473f4343093ff19d98cc4f23023788bf4edf0178eae1961afc0ba8b69b273de95b7d7e2afdb706701d8ba6f7ba

diff --git a/net-libs/libtirpc/files/libtirpc-1.0.2-bzero-to-memset.patch b/net-libs/libtirpc/files/libtirpc-1.0.2-bzero-to-memset.patch
deleted file mode 100644
index 64b516ed826..00000000000
--- a/net-libs/libtirpc/files/libtirpc-1.0.2-bzero-to-memset.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -Naurp libtirpc-1.0.2.orig/src/auth_time.c libtirpc-1.0.2/src/auth_time.c
---- libtirpc-1.0.2.orig/src/auth_time.c	2017-07-05 11:02:23.000000000 -0400
-+++ libtirpc-1.0.2/src/auth_time.c	2017-07-30 17:46:39.481420880 -0400
-@@ -317,7 +317,7 @@ __rpc_get_time_offset(td, srv, thost, ua
- 	sprintf(ipuaddr, "%d.%d.%d.%d.0.111", a1, a2, a3, a4);
- 	useua = &ipuaddr[0];
- 
--	bzero((char *)&sin, sizeof(sin));
-+	memset((char *)&sin, 0, sizeof(sin));
- 	if (uaddr_to_sockaddr(useua, &sin)) {
- 		msg("unable to translate uaddr to sockaddr.");
- 		if (needfree)
-diff -Naurp libtirpc-1.0.2.orig/src/des_impl.c libtirpc-1.0.2/src/des_impl.c
---- libtirpc-1.0.2.orig/src/des_impl.c	2017-07-05 11:02:23.000000000 -0400
-+++ libtirpc-1.0.2/src/des_impl.c	2017-07-30 17:46:49.581420807 -0400
-@@ -588,7 +588,7 @@ _des_crypt (char *buf, unsigned len, str
-     }
-   tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
-   tbuf[0] = tbuf[1] = 0;
--  __bzero (schedule, sizeof (schedule));
-+  memset (schedule, 0, sizeof (schedule));
- 
-   return (1);
- }
-diff -Naurp libtirpc-1.0.2.orig/src/svc_auth_des.c libtirpc-1.0.2/src/svc_auth_des.c
---- libtirpc-1.0.2.orig/src/svc_auth_des.c	2017-07-05 11:02:23.000000000 -0400
-+++ libtirpc-1.0.2/src/svc_auth_des.c	2017-07-30 17:46:58.771420741 -0400
-@@ -356,7 +356,7 @@ cache_init()
- 
- 	authdes_cache = (struct cache_entry *)
- 		mem_alloc(sizeof(struct cache_entry) * AUTHDES_CACHESZ);	
--	bzero((char *)authdes_cache, 
-+	memset((char *)authdes_cache, 0,
- 		sizeof(struct cache_entry) * AUTHDES_CACHESZ);
- 
- 	authdes_lru = (short *)mem_alloc(sizeof(short) * AUTHDES_CACHESZ);

diff --git a/net-libs/libtirpc/files/libtirpc-1.0.2-exports.patch b/net-libs/libtirpc/files/libtirpc-1.0.2-exports.patch
deleted file mode 100644
index 174f4e3471f..00000000000
--- a/net-libs/libtirpc/files/libtirpc-1.0.2-exports.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-See
-https://bugs.alpinelinux.org/issues/7041
-https://git.alpinelinux.org/cgit/aports/commit/?id=9edb53cea056101c4963a04b747bf102de23f919
-(just hit this myself when building libnsl)
-... dilfridge
-
---- a/src/libtirpc.map
-+++ b/src/libtirpc.map
-@@ -298,7 +298,7 @@
-     key_gendes;
-     key_get_conv;
-     key_setsecret;
--    key_secret_is_set;
-+    key_secretkey_is_set;
-     key_setnet;
-     netname2host;
-     netname2user;

diff --git a/net-libs/libtirpc/files/libtirpc-1.0.2-glibc-2.26.patch b/net-libs/libtirpc/files/libtirpc-1.0.2-glibc-2.26.patch
deleted file mode 100644
index 6d583e6149d..00000000000
--- a/net-libs/libtirpc/files/libtirpc-1.0.2-glibc-2.26.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c
-index d23fbd1..79d6707 100644
---- a/src/xdr_sizeof.c
-+++ b/src/xdr_sizeof.c
-@@ -39,6 +39,7 @@
- #include <rpc/xdr.h>
- #include <sys/types.h>
- #include <stdlib.h>
-+#include <stdint.h>
- #include "un-namespace.h"
- 
- /* ARGSUSED */

diff --git a/net-libs/libtirpc/libtirpc-1.0.2-r1.ebuild b/net-libs/libtirpc/libtirpc-1.0.2-r1.ebuild
deleted file mode 100644
index 36dc12d642f..00000000000
--- a/net-libs/libtirpc/libtirpc-1.0.2-r1.ebuild
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit autotools multilib-minimal toolchain-funcs eutils usr-ldscript
-
-DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
-HOMEPAGE="https://sourceforge.net/projects/libtirpc/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
-	mirror://gentoo/${PN}-glibc-nfs.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0/3" # subslot matches SONAME major
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
-IUSE="ipv6 kerberos static-libs"
-
-RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	elibc_musl? ( sys-libs/queue-standalone )
-	app-arch/xz-utils
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-1.0.2-bcopy-to-memmove.patch"
-	"${FILESDIR}/${PN}-1.0.2-bzero-to-memset.patch"
-	"${FILESDIR}/${PN}-1.0.2-glibc-2.26.patch"
-	"${FILESDIR}/${PN}-1.0.2-exports.patch"
-)
-
-src_prepare() {
-	cp -r "${WORKDIR}"/tirpc "${S}"/ || die
-	epatch "${PATCHES[@]}"
-	epatch_user
-	eautoreconf
-}
-
-multilib_src_configure() {
-	ECONF_SOURCE=${S} \
-	econf \
-		$(use_enable ipv6) \
-		$(use_enable kerberos gssapi) \
-		$(use_enable static-libs static)
-}
-
-multilib_src_install() {
-	default
-
-	# libtirpc replaces rpc support in glibc, so we need it in /
-	gen_usr_ldscript -a tirpc
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	insinto /etc
-	doins doc/netconfig
-
-	insinto /usr/include/tirpc
-	doins -r "${WORKDIR}"/tirpc/*
-
-	# makes sure that the linking order for nfs-utils is proper, as
-	# libtool would inject a libgssglue dependency in the list.
-	use static-libs || prune_libtool_files
-}

diff --git a/net-libs/libtirpc/libtirpc-1.0.3.ebuild b/net-libs/libtirpc/libtirpc-1.0.3.ebuild
deleted file mode 100644
index 5a60e1bb7b0..00000000000
--- a/net-libs/libtirpc/libtirpc-1.0.3.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools multilib-minimal toolchain-funcs usr-ldscript
-
-DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
-HOMEPAGE="https://sourceforge.net/projects/libtirpc/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
-	mirror://gentoo/${PN}-glibc-nfs.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0/3" # subslot matches SONAME major
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="ipv6 kerberos static-libs"
-
-RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-1.0.2-bcopy-to-memmove.patch"
-)
-
-src_prepare() {
-	cp -r "${WORKDIR}"/tirpc "${S}"/ || die
-	default
-	eautoreconf
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		$(use_enable ipv6)
-		$(use_enable kerberos gssapi)
-		$(use_enable static-libs static)
-	)
-	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install() {
-	default
-
-	# libtirpc replaces rpc support in glibc, so we need it in /
-	gen_usr_ldscript -a tirpc
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	insinto /etc
-	doins doc/netconfig
-
-	insinto /usr/include/tirpc
-	doins -r "${WORKDIR}"/tirpc/*
-
-	# makes sure that the linking order for nfs-utils is proper, as
-	# libtool would inject a libgssglue dependency in the list.
-	if ! use static-libs ; then
-		find "${ED}" -name "*.la" -delete || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
@ 2020-01-19 22:10 Mike Gilbert
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Gilbert @ 2020-01-19 22:10 UTC (permalink / raw
  To: gentoo-commits

commit:     e4ee5bf49c334a8cc527f23ca3a9f0b43fd34097
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 19 22:09:40 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Jan 19 22:10:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4ee5bf4

net-libs/libtirpc: fix build with gcc 10

Closes: https://bugs.gentoo.org/705896
Package-Manager: Portage-2.3.84_p2, Repoman-2.3.20_p24
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../libtirpc-1.2.5-avoid-multiple-definition.patch | 44 ++++++++++++++++++++++
 net-libs/libtirpc/libtirpc-1.2.5.ebuild            |  5 ++-
 2 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/net-libs/libtirpc/files/libtirpc-1.2.5-avoid-multiple-definition.patch b/net-libs/libtirpc/files/libtirpc-1.2.5-avoid-multiple-definition.patch
new file mode 100644
index 00000000000..a5fecc54ced
--- /dev/null
+++ b/net-libs/libtirpc/files/libtirpc-1.2.5-avoid-multiple-definition.patch
@@ -0,0 +1,44 @@
+From 69682de06816de9b9014441d23bda1918ee2e2fb Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 19 Jan 2020 16:57:45 -0500
+Subject: [PATCH] Avoid multiple-definiton with gcc -fno-common
+
+GCC 10 enables -fno-common by default.
+
+Bug: https://bugs.gentoo.org/705896
+---
+ src/rpc_com.h | 3 +--
+ src/svc.c     | 3 +++
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/rpc_com.h b/src/rpc_com.h
+index 10bec79..76badef 100644
+--- a/src/rpc_com.h
++++ b/src/rpc_com.h
+@@ -61,8 +61,7 @@ void __xprt_unregister_unlocked(SVCXPRT *);
+ void __xprt_set_raddr(SVCXPRT *, const struct sockaddr_storage *);
+ 
+ 
+-SVCXPRT **__svc_xports;
+-int __svc_maxrec;
++extern int __svc_maxrec;
+ 
+ #ifdef __cplusplus
+ }
+diff --git a/src/svc.c b/src/svc.c
+index b59467b..6db164b 100644
+--- a/src/svc.c
++++ b/src/svc.c
+@@ -57,6 +57,9 @@
+ 
+ #define max(a, b) (a > b ? a : b)
+ 
++static SVCXPRT **__svc_xports;
++int __svc_maxrec;
++
+ /*
+  * The services list
+  * Each entry represents a set of procedures (an rpc program).
+-- 
+2.25.0
+

diff --git a/net-libs/libtirpc/libtirpc-1.2.5.ebuild b/net-libs/libtirpc/libtirpc-1.2.5.ebuild
index 5d80a874a92..9970a7e6255 100644
--- a/net-libs/libtirpc/libtirpc-1.2.5.ebuild
+++ b/net-libs/libtirpc/libtirpc-1.2.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -23,6 +23,9 @@ BDEPEND="
 
 src_prepare() {
 	cp -r "${WORKDIR}"/tirpc "${S}"/ || die
+	local PATCHES=(
+		"${FILESDIR}"/libtirpc-1.2.5-avoid-multiple-definition.patch
+	)
 	default
 	eautoreconf
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
@ 2020-03-16 16:22 Mike Gilbert
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Gilbert @ 2020-03-16 16:22 UTC (permalink / raw
  To: gentoo-commits

commit:     7bedd26f1342bae405e65ed714dfd8b782d3130e
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 16 16:22:20 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Mar 16 16:22:20 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bedd26f

net-libs/libtirpc: backport fix for musl

Package-Manager: Portage-2.3.92_p3, Repoman-2.3.20_p118
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../libtirpc/files/libtirpc-1.2.5-endian.h.patch   | 31 ++++++++++++++++++++++
 net-libs/libtirpc/libtirpc-1.2.5.ebuild            |  1 +
 2 files changed, 32 insertions(+)

diff --git a/net-libs/libtirpc/files/libtirpc-1.2.5-endian.h.patch b/net-libs/libtirpc/files/libtirpc-1.2.5-endian.h.patch
new file mode 100644
index 00000000000..8245d022bde
--- /dev/null
+++ b/net-libs/libtirpc/files/libtirpc-1.2.5-endian.h.patch
@@ -0,0 +1,31 @@
+From d04f4d6f0e682f16b0ce96839ab4eadade591eb1 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Tue, 21 Jan 2020 11:51:16 -0500
+Subject: [PATCH] xdr_float: do not include bits/endian.h
+
+bits/endian.h is an internal header. endian.h should be included.
+
+Fixes compilation with recent musl.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/xdr_float.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/xdr_float.c b/src/xdr_float.c
+index 26bc865..349d48f 100644
+--- a/src/xdr_float.c
++++ b/src/xdr_float.c
+@@ -83,7 +83,7 @@ static struct sgl_limits {
+ };
+ #else
+ 
+-#include <bits/endian.h>
++#include <endian.h>
+ #define IEEEFP
+ 
+ #endif /* vax */
+-- 
+1.8.3.1
+

diff --git a/net-libs/libtirpc/libtirpc-1.2.5.ebuild b/net-libs/libtirpc/libtirpc-1.2.5.ebuild
index 2189f57d8b7..0abd7d25782 100644
--- a/net-libs/libtirpc/libtirpc-1.2.5.ebuild
+++ b/net-libs/libtirpc/libtirpc-1.2.5.ebuild
@@ -26,6 +26,7 @@ src_prepare() {
 	cp -r "${WORKDIR}"/tirpc "${S}"/ || die
 	local PATCHES=(
 		"${FILESDIR}"/libtirpc-1.2.5-avoid-multiple-definition.patch
+		"${FILESDIR}"/libtirpc-1.2.5-endian.h.patch
 	)
 	default
 	eautoreconf


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
@ 2020-03-18 20:17 Mike Gilbert
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Gilbert @ 2020-03-18 20:17 UTC (permalink / raw
  To: gentoo-commits

commit:     dd1556e7606fc91b079a41ef85fe62e3cab5876f
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 18 20:17:00 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Mar 18 20:17:20 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd1556e7

net-libs/libtirpc: remove old

Package-Manager: Portage-2.3.92_p3, Repoman-2.3.20_p118
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 net-libs/libtirpc/Manifest                         |  1 -
 .../files/libtirpc-1.0.2-bcopy-to-memmove.patch    | 49 -----------------
 net-libs/libtirpc/libtirpc-1.1.4.ebuild            | 63 ----------------------
 3 files changed, 113 deletions(-)

diff --git a/net-libs/libtirpc/Manifest b/net-libs/libtirpc/Manifest
index b5bd7d4c174..91a2178b4b1 100644
--- a/net-libs/libtirpc/Manifest
+++ b/net-libs/libtirpc/Manifest
@@ -1,3 +1,2 @@
-DIST libtirpc-1.1.4.tar.bz2 510924 BLAKE2B 1780f9bb0543583c01b60bda681add0ec2f8718eda4ce4653883c772466178e37d0a3fb47004109f81de470129458561fac4f109f45154c64b6fb729f0212c90 SHA512 392f391f9fc1bd68d81dc44e4058831a64b32790b5c8c37338b0ab416fad2ae4d16389e632596734dba09780347918cc65c6f134e0c1afd09e81ec250785ed23
 DIST libtirpc-1.2.5.tar.bz2 513146 BLAKE2B 732e4832f3440d9fa08c45c01c56135ff1b96564c55d33e9b3f16c8361a4f02e49a35638b73110bb72da4bfb78107ccb1b4d475d1ecbdd62dcc156529a372c3e SHA512 d31cd4e22301abe1baddd7e8f45aaaf056a40799e961646691d071084fed50563b5eecdd9b78062fe378be8db7a6d4b87597e21cb81ac925e447148684a2b002
 DIST libtirpc-glibc-nfs.tar.xz 8948 BLAKE2B 7316623d9f2b6928e296137fe2bf6794b208d549c2ffba9e4a35b47f7b04bf023798a09f38c02d039debf6adc466d7689cf3c8274d71a22eaff08729642c0a28 SHA512 90255bf0a27af16164e0710dd940778609925d473f4343093ff19d98cc4f23023788bf4edf0178eae1961afc0ba8b69b273de95b7d7e2afdb706701d8ba6f7ba

diff --git a/net-libs/libtirpc/files/libtirpc-1.0.2-bcopy-to-memmove.patch b/net-libs/libtirpc/files/libtirpc-1.0.2-bcopy-to-memmove.patch
deleted file mode 100644
index 91619b7ac9f..00000000000
--- a/net-libs/libtirpc/files/libtirpc-1.0.2-bcopy-to-memmove.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff -Naurp libtirpc-1.0.2.orig/src/auth_time.c libtirpc-1.0.2/src/auth_time.c
---- libtirpc-1.0.2.orig/src/auth_time.c	2017-07-05 11:02:23.000000000 -0400
-+++ libtirpc-1.0.2/src/auth_time.c	2017-07-30 17:48:31.361420071 -0400
-@@ -104,7 +104,7 @@ static int uaddr_to_sockaddr(uaddr, sin)
- 	p_bytes[1] = (unsigned char)a[5] & 0x000000FF;
- 
- 	sin->sin_family = AF_INET; /* always */
--	bcopy((char *)&p_bytes, (char *)&sin->sin_port, 2);
-+	memmove((char *)&sin->sin_port, (char *)&p_bytes, 2);
- 
- 	return (0);
- }
-diff -Naurp libtirpc-1.0.2.orig/src/crypt_client.c libtirpc-1.0.2/src/crypt_client.c
---- libtirpc-1.0.2.orig/src/crypt_client.c	2017-07-05 11:02:23.000000000 -0400
-+++ libtirpc-1.0.2/src/crypt_client.c	2017-07-30 17:49:57.911419445 -0400
-@@ -75,8 +75,8 @@ _des_crypt_call(buf, len, dparms)
- 	des_crypt_1_arg.desbuf.desbuf_val = buf;
- 	des_crypt_1_arg.des_dir = dparms->des_dir;
- 	des_crypt_1_arg.des_mode = dparms->des_mode;
--	bcopy(dparms->des_ivec, des_crypt_1_arg.des_ivec, 8);
--	bcopy(dparms->des_key, des_crypt_1_arg.des_key, 8);
-+	memmove(des_crypt_1_arg.des_ivec, dparms->des_ivec, 8);
-+	memmove(des_crypt_1_arg.des_key, dparms->des_key, 8);
- 
- 	result_1 = des_crypt_1(&des_crypt_1_arg, clnt);
- 	if (result_1 == (desresp *) NULL) {
-@@ -88,8 +88,8 @@ _des_crypt_call(buf, len, dparms)
- 
- 	if (result_1->stat == DESERR_NONE ||
- 	    result_1->stat == DESERR_NOHWDEVICE) {
--		bcopy(result_1->desbuf.desbuf_val, buf, len);
--		bcopy(result_1->des_ivec, dparms->des_ivec, 8);
-+		memmove(buf, result_1->desbuf.desbuf_val, len);
-+		memmove(dparms->des_ivec, result_1->des_ivec, 8);
- 	}
- 
- 	clnt_freeres(clnt, (xdrproc_t)xdr_desresp, result_1);
-diff -Naurp libtirpc-1.0.2.orig/src/svc_auth_des.c libtirpc-1.0.2/src/svc_auth_des.c
---- libtirpc-1.0.2.orig/src/svc_auth_des.c	2017-07-05 11:02:23.000000000 -0400
-+++ libtirpc-1.0.2/src/svc_auth_des.c	2017-07-30 17:50:36.591419165 -0400
-@@ -145,7 +145,7 @@ _svcauth_des(rqst, msg)
- 			return (AUTH_BADCRED);
- 		}
- 		cred->adc_fullname.name = area->area_netname;
--		bcopy((char *)ixdr, cred->adc_fullname.name, 
-+		memmove(cred->adc_fullname.name, (char *)ixdr,
- 			(u_int)namelen);
- 		cred->adc_fullname.name[namelen] = 0;
- 		ixdr += (RNDUP(namelen) / BYTES_PER_XDR_UNIT);

diff --git a/net-libs/libtirpc/libtirpc-1.1.4.ebuild b/net-libs/libtirpc/libtirpc-1.1.4.ebuild
deleted file mode 100644
index 139c19984af..00000000000
--- a/net-libs/libtirpc/libtirpc-1.1.4.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools multilib-minimal toolchain-funcs usr-ldscript
-
-DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
-HOMEPAGE="https://sourceforge.net/projects/libtirpc/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
-	mirror://gentoo/${PN}-glibc-nfs.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0/3" # subslot matches SONAME major
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
-IUSE="ipv6 kerberos static-libs"
-
-RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	app-arch/xz-utils
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-1.0.2-bcopy-to-memmove.patch"
-)
-
-src_prepare() {
-	cp -r "${WORKDIR}"/tirpc "${S}"/ || die
-	default
-	eautoreconf
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		$(use_enable ipv6)
-		$(use_enable kerberos gssapi)
-		$(use_enable static-libs static)
-	)
-	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install() {
-	default
-
-	# libtirpc replaces rpc support in glibc, so we need it in /
-	gen_usr_ldscript -a tirpc
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	insinto /etc
-	doins doc/netconfig
-
-	insinto /usr/include/tirpc
-	doins -r "${WORKDIR}"/tirpc/*
-
-	# makes sure that the linking order for nfs-utils is proper, as
-	# libtool would inject a libgssglue dependency in the list.
-	if ! use static-libs ; then
-		find "${ED}" -name "*.la" -delete || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
@ 2022-07-24  0:38 Mike Gilbert
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Gilbert @ 2022-07-24  0:38 UTC (permalink / raw
  To: gentoo-commits

commit:     15f37371c962d5d28081841062dcf925c6a0914c
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 24 00:36:45 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Jul 24 00:38:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15f37371

net-libs/libtirpc: backport security fixes

Bug: https://bugs.gentoo.org/859634
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 net-libs/libtirpc/files/libtirpc-1.3.2-dos.patch   | 178 +++++++++++++++++++++
 .../files/libtirpc-1.3.2-memory-leak.patch         |  52 ++++++
 .../files/libtirpc-1.3.2-use-after-free.patch      |  31 ++++
 net-libs/libtirpc/libtirpc-1.3.2-r1.ebuild         |  65 ++++++++
 4 files changed, 326 insertions(+)

diff --git a/net-libs/libtirpc/files/libtirpc-1.3.2-dos.patch b/net-libs/libtirpc/files/libtirpc-1.3.2-dos.patch
new file mode 100644
index 000000000000..88b6f5719f41
--- /dev/null
+++ b/net-libs/libtirpc/files/libtirpc-1.3.2-dos.patch
@@ -0,0 +1,178 @@
+From 86529758570cef4c73fb9b9c4104fdc510f701ed Mon Sep 17 00:00:00 2001
+From: Dai Ngo <dai.ngo@oracle.com>
+Date: Sat, 21 Aug 2021 13:16:23 -0400
+Subject: [PATCH] Fix DoS vulnerability in libtirpc
+
+Currently svc_run does not handle poll timeout and rendezvous_request
+does not handle EMFILE error returned from accept(2 as it used to.
+These two missing functionality were removed by commit b2c9430f46c4.
+
+The effect of not handling poll timeout allows idle TCP conections
+to remain ESTABLISHED indefinitely. When the number of connections
+reaches the limit of the open file descriptors (ulimit -n) then
+accept(2) fails with EMFILE. Since there is no handling of EMFILE
+error this causes svc_run() to get in a tight loop calling accept(2).
+This resulting in the RPC service of svc_run is being down, it's
+no longer able to service any requests.
+
+RPC service rpcbind, statd and mountd are effected by this
+problem.
+
+Fix by enhancing rendezvous_request to keep the number of
+SVCXPRT conections to 4/5 of the size of the file descriptor
+table. When this thresold is reached, it destroys the idle
+TCP connections or destroys the least active connection if
+no idle connnction was found.
+
+Fixes: 44bf15b8 rpcbind: don't use obsolete svc_fdset interface of libtirpc
+Signed-off-by: dai.ngo@oracle.com
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ INSTALL      | 371 +----------------------------------------------------------
+ src/svc.c    |  17 ++-
+ src/svc_vc.c |  62 +++++++++-
+ 3 files changed, 78 insertions(+), 372 deletions(-)
+ mode change 100644 => 120000 INSTALL
+
+diff --git a/src/svc.c b/src/svc.c
+index 6db164b..3a8709f 100644
+--- a/src/svc.c
++++ b/src/svc.c
+@@ -57,7 +57,7 @@
+ 
+ #define max(a, b) (a > b ? a : b)
+ 
+-static SVCXPRT **__svc_xports;
++SVCXPRT **__svc_xports;
+ int __svc_maxrec;
+ 
+ /*
+@@ -194,6 +194,21 @@ __xprt_do_unregister (xprt, dolock)
+     rwlock_unlock (&svc_fd_lock);
+ }
+ 
++int
++svc_open_fds()
++{
++	int ix;
++	int nfds = 0;
++
++	rwlock_rdlock (&svc_fd_lock);
++	for (ix = 0; ix < svc_max_pollfd; ++ix) {
++		if (svc_pollfd[ix].fd != -1)
++			nfds++;
++	}
++	rwlock_unlock (&svc_fd_lock);
++	return (nfds);
++}
++
+ /*
+  * Add a service program to the callout list.
+  * The dispatch routine will be called when a rpc request for this
+diff --git a/src/svc_vc.c b/src/svc_vc.c
+index f1d9f00..3dc8a75 100644
+--- a/src/svc_vc.c
++++ b/src/svc_vc.c
+@@ -64,6 +64,8 @@
+ 
+ 
+ extern rwlock_t svc_fd_lock;
++extern SVCXPRT **__svc_xports;
++extern int svc_open_fds();
+ 
+ static SVCXPRT *makefd_xprt(int, u_int, u_int);
+ static bool_t rendezvous_request(SVCXPRT *, struct rpc_msg *);
+@@ -82,6 +84,7 @@ static void svc_vc_ops(SVCXPRT *);
+ static bool_t svc_vc_control(SVCXPRT *xprt, const u_int rq, void *in);
+ static bool_t svc_vc_rendezvous_control (SVCXPRT *xprt, const u_int rq,
+ 				   	     void *in);
++static int __svc_destroy_idle(int timeout);
+ 
+ struct cf_rendezvous { /* kept in xprt->xp_p1 for rendezvouser */
+ 	u_int sendsize;
+@@ -313,13 +316,14 @@ done:
+ 	return (xprt);
+ }
+ 
++
+ /*ARGSUSED*/
+ static bool_t
+ rendezvous_request(xprt, msg)
+ 	SVCXPRT *xprt;
+ 	struct rpc_msg *msg;
+ {
+-	int sock, flags;
++	int sock, flags, nfds, cnt;
+ 	struct cf_rendezvous *r;
+ 	struct cf_conn *cd;
+ 	struct sockaddr_storage addr;
+@@ -379,6 +383,16 @@ again:
+ 
+ 	gettimeofday(&cd->last_recv_time, NULL);
+ 
++	nfds = svc_open_fds();
++	if (nfds >= (_rpc_dtablesize() / 5) * 4) {
++		/* destroy idle connections */
++		cnt = __svc_destroy_idle(15);
++		if (cnt == 0) {
++			/* destroy least active */
++			__svc_destroy_idle(0);
++		}
++	}
++
+ 	return (FALSE); /* there is never an rpc msg to be processed */
+ }
+ 
+@@ -820,3 +834,49 @@ __svc_clean_idle(fd_set *fds, int timeout, bool_t cleanblock)
+ {
+ 	return FALSE;
+ }
++
++static int
++__svc_destroy_idle(int timeout)
++{
++	int i, ncleaned = 0;
++	SVCXPRT *xprt, *least_active;
++	struct timeval tv, tdiff, tmax;
++	struct cf_conn *cd;
++
++	gettimeofday(&tv, NULL);
++	tmax.tv_sec = tmax.tv_usec = 0;
++	least_active = NULL;
++	rwlock_wrlock(&svc_fd_lock);
++
++	for (i = 0; i <= svc_max_pollfd; i++) {
++		if (svc_pollfd[i].fd == -1)
++			continue;
++		xprt = __svc_xports[i];
++		if (xprt == NULL || xprt->xp_ops == NULL ||
++			xprt->xp_ops->xp_recv != svc_vc_recv)
++			continue;
++		cd = (struct cf_conn *)xprt->xp_p1;
++		if (!cd->nonblock)
++			continue;
++		if (timeout == 0) {
++			timersub(&tv, &cd->last_recv_time, &tdiff);
++			if (timercmp(&tdiff, &tmax, >)) {
++				tmax = tdiff;
++				least_active = xprt;
++			}
++			continue;
++		}
++		if (tv.tv_sec - cd->last_recv_time.tv_sec > timeout) {
++			__xprt_unregister_unlocked(xprt);
++			__svc_vc_dodestroy(xprt);
++			ncleaned++;
++		}
++	}
++	if (timeout == 0 && least_active != NULL) {
++		__xprt_unregister_unlocked(least_active);
++		__svc_vc_dodestroy(least_active);
++		ncleaned++;
++	}
++	rwlock_unlock(&svc_fd_lock);
++	return (ncleaned);
++}
+-- 
+1.8.3.1
+

diff --git a/net-libs/libtirpc/files/libtirpc-1.3.2-memory-leak.patch b/net-libs/libtirpc/files/libtirpc-1.3.2-memory-leak.patch
new file mode 100644
index 000000000000..8ce864a2950c
--- /dev/null
+++ b/net-libs/libtirpc/files/libtirpc-1.3.2-memory-leak.patch
@@ -0,0 +1,52 @@
+From 63f3b9e883231ca08cf9c3cd8f5d582584412d94 Mon Sep 17 00:00:00 2001
+From: Ali Abdallah <ali.abdallah@suse.com>
+Date: Thu, 14 Jul 2022 13:47:32 -0400
+Subject: [PATCH] Fix potential memory leak of parms.r_addr
+
+During some valgrind test, the following is observed
+
+==11391== 64 bytes in 4 blocks are definitely lost in loss record 11 of 16
+==11391==    at 0x4C2A2AF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
+==11391==    by 0x50ECED9: strdup (in /lib64/libc-2.22.so)
+==11391==    by 0x4E4AFBF: getclnthandle (in /lib64/libtirpc.so.3.0.0)
+==11391==    by 0x4E4BD8A: __rpcb_findaddr_timed (in /lib64/libtirpc.so.3.0.0)
+==11391==    by 0x4E443AF: clnt_tp_create_timed (in /lib64/libtirpc.so.3.0.0)
+==11391==    by 0x4E44580: clnt_create_timed (in /lib64/libtirpc.so.3.0.0)
+==11391==    by 0x400755: main (in /local/02/xdtadti/tirpc-test/client)
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ INSTALL         | 369 +-------------------------------------------------------
+ src/rpcb_clnt.c |   8 ++
+ 2 files changed, 9 insertions(+), 368 deletions(-)
+ mode change 100644 => 120000 INSTALL
+
+diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c
+index 0c34cb7..1a23cb1 100644
+--- a/src/rpcb_clnt.c
++++ b/src/rpcb_clnt.c
+@@ -798,6 +798,10 @@ __try_protocol_version_2(program, version, nconf, host, tp)
+ 	pmapaddress->len = pmapaddress->maxlen = remote.len;
+ 
+ 	CLNT_DESTROY(client);
++
++	if (parms.r_addr != NULL && parms.r_addr != nullstring)
++		free(parms.r_addr);
++
+ 	return pmapaddress;
+ 
+ error:
+@@ -806,6 +810,10 @@ error:
+ 		client = NULL;
+ 
+ 	}
++
++	if (parms.r_addr != NULL && parms.r_addr != nullstring)
++		free(parms.r_addr);
++
+ 	return (NULL);
+ 
+ }
+-- 
+1.8.3.1
+

diff --git a/net-libs/libtirpc/files/libtirpc-1.3.2-use-after-free.patch b/net-libs/libtirpc/files/libtirpc-1.3.2-use-after-free.patch
new file mode 100644
index 000000000000..8e85a564f29a
--- /dev/null
+++ b/net-libs/libtirpc/files/libtirpc-1.3.2-use-after-free.patch
@@ -0,0 +1,31 @@
+From d0dc59e27263c6b53435d770010dcc6f397d58ee Mon Sep 17 00:00:00 2001
+From: Frank Sorenson <sorenson@redhat.com>
+Date: Mon, 17 Jan 2022 13:33:13 -0500
+Subject: [PATCH] libtirpc: Fix use-after-free accessing the error number
+
+Free the cbuf after obtaining the error number.
+
+Signed-off-by: Frank Sorenson <sorenson@redhat.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/clnt_dg.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/clnt_dg.c b/src/clnt_dg.c
+index e1255de..b3d82e7 100644
+--- a/src/clnt_dg.c
++++ b/src/clnt_dg.c
+@@ -456,9 +456,9 @@ get_reply:
+ 		 cmsg = CMSG_NXTHDR (&msg, cmsg))
+ 	      if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_RECVERR)
+ 		{
+-		  mem_free(cbuf, (outlen + 256));
+ 		  e = (struct sock_extended_err *) CMSG_DATA(cmsg);
+ 		  cu->cu_error.re_errno = e->ee_errno;
++		  mem_free(cbuf, (outlen + 256));
+ 		  release_fd_lock(cu->cu_fd_lock, mask);
+ 		  return (cu->cu_error.re_status = RPC_CANTRECV);
+ 		}
+-- 
+1.8.3.1
+

diff --git a/net-libs/libtirpc/libtirpc-1.3.2-r1.ebuild b/net-libs/libtirpc/libtirpc-1.3.2-r1.ebuild
new file mode 100644
index 000000000000..fe750fb291d8
--- /dev/null
+++ b/net-libs/libtirpc/libtirpc-1.3.2-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib-minimal usr-ldscript
+
+DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
+HOMEPAGE="https://sourceforge.net/projects/libtirpc/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
+	mirror://gentoo/${PN}-glibc-nfs.tar.xz"
+
+LICENSE="BSD BSD-2 BSD-4 LGPL-2.1+"
+SLOT="0/3" # subslot matches SONAME major
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="ipv6 kerberos static-libs"
+
+RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+	elibc_musl? ( sys-libs/queue-standalone )"
+BDEPEND="
+	app-arch/xz-utils
+	virtual/pkgconfig"
+
+src_prepare() {
+	local PATCHES=(
+		"${FILESDIR}"/libtirpc-1.3.2-dos.patch
+		"${FILESDIR}"/libtirpc-1.3.2-use-after-free.patch
+		"${FILESDIR}"/libtirpc-1.3.2-memory-leak.patch
+	)
+	cp -r "${WORKDIR}"/tirpc "${S}"/ || die
+	default
+}
+
+multilib_src_configure() {
+	local myeconfargs=(
+		$(use_enable ipv6)
+		$(use_enable kerberos gssapi)
+		$(use_enable static-libs static)
+	)
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install() {
+	default
+
+	# libtirpc replaces rpc support in glibc, so we need it in /
+	gen_usr_ldscript -a tirpc
+}
+
+multilib_src_install_all() {
+	einstalldocs
+
+	insinto /etc
+	doins doc/netconfig
+
+	insinto /usr/include/tirpc
+	doins -r "${WORKDIR}"/tirpc/*
+
+	# makes sure that the linking order for nfs-utils is proper, as
+	# libtool would inject a libgssglue dependency in the list.
+	if ! use static-libs ; then
+		find "${ED}" -name "*.la" -delete || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/
@ 2022-10-22  3:01 Mike Gilbert
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Gilbert @ 2022-10-22  3:01 UTC (permalink / raw
  To: gentoo-commits

commit:     22ebc6760d7a291af7777ec88b0308d009834988
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 22 03:00:09 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Oct 22 03:00:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22ebc676

net-libs/libtirpc: drop 1.3.2, 1.3.2-r1

Bug: https://bugs.gentoo.org/859634
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 net-libs/libtirpc/Manifest                         |   1 -
 net-libs/libtirpc/files/libtirpc-1.3.2-dos.patch   | 178 ---------------------
 .../files/libtirpc-1.3.2-memory-leak.patch         |  52 ------
 .../files/libtirpc-1.3.2-use-after-free.patch      |  31 ----
 net-libs/libtirpc/libtirpc-1.3.2-r1.ebuild         |  65 --------
 net-libs/libtirpc/libtirpc-1.3.2.ebuild            |  60 -------
 6 files changed, 387 deletions(-)

diff --git a/net-libs/libtirpc/Manifest b/net-libs/libtirpc/Manifest
index 84ccc63b4af4..2767367e2b69 100644
--- a/net-libs/libtirpc/Manifest
+++ b/net-libs/libtirpc/Manifest
@@ -1,3 +1,2 @@
-DIST libtirpc-1.3.2.tar.bz2 513151 BLAKE2B 375b7bb046244f4666522c4f148428349fe1867b095dc5e268d037ba26982f88df70b0ad21fbe2b99150f644806a46651b524c3b9f7fe2499469806ea50b0331 SHA512 8664d5c4f842ee5acf83b9c1cadb7871f17b8157a7c4500e2236dcfb3a25768cab39f7c5123758dcd7381e30eb028ddfa26a28f458283f2dcea3426c9878c255
 DIST libtirpc-1.3.3.tar.bz2 562812 BLAKE2B e229869b05103d912b677f78648dce1f7fa7649bdf44b782a5fb97635eecf07f768bbc0ef25c0f065c8253fbe37c12b80934d9102b7345adfc4102897458b487 SHA512 df0781a74ff9ded2d3c4f5eb7e05496b9f58eac8060c02c68331dc14c4a00304dcd19f46836f5756fe0d9d27095fd463d42dd696fcdff891516711b7d63deabe
 DIST libtirpc-glibc-nfs.tar.xz 8948 BLAKE2B 7316623d9f2b6928e296137fe2bf6794b208d549c2ffba9e4a35b47f7b04bf023798a09f38c02d039debf6adc466d7689cf3c8274d71a22eaff08729642c0a28 SHA512 90255bf0a27af16164e0710dd940778609925d473f4343093ff19d98cc4f23023788bf4edf0178eae1961afc0ba8b69b273de95b7d7e2afdb706701d8ba6f7ba

diff --git a/net-libs/libtirpc/files/libtirpc-1.3.2-dos.patch b/net-libs/libtirpc/files/libtirpc-1.3.2-dos.patch
deleted file mode 100644
index 88b6f5719f41..000000000000
--- a/net-libs/libtirpc/files/libtirpc-1.3.2-dos.patch
+++ /dev/null
@@ -1,178 +0,0 @@
-From 86529758570cef4c73fb9b9c4104fdc510f701ed Mon Sep 17 00:00:00 2001
-From: Dai Ngo <dai.ngo@oracle.com>
-Date: Sat, 21 Aug 2021 13:16:23 -0400
-Subject: [PATCH] Fix DoS vulnerability in libtirpc
-
-Currently svc_run does not handle poll timeout and rendezvous_request
-does not handle EMFILE error returned from accept(2 as it used to.
-These two missing functionality were removed by commit b2c9430f46c4.
-
-The effect of not handling poll timeout allows idle TCP conections
-to remain ESTABLISHED indefinitely. When the number of connections
-reaches the limit of the open file descriptors (ulimit -n) then
-accept(2) fails with EMFILE. Since there is no handling of EMFILE
-error this causes svc_run() to get in a tight loop calling accept(2).
-This resulting in the RPC service of svc_run is being down, it's
-no longer able to service any requests.
-
-RPC service rpcbind, statd and mountd are effected by this
-problem.
-
-Fix by enhancing rendezvous_request to keep the number of
-SVCXPRT conections to 4/5 of the size of the file descriptor
-table. When this thresold is reached, it destroys the idle
-TCP connections or destroys the least active connection if
-no idle connnction was found.
-
-Fixes: 44bf15b8 rpcbind: don't use obsolete svc_fdset interface of libtirpc
-Signed-off-by: dai.ngo@oracle.com
-Signed-off-by: Steve Dickson <steved@redhat.com>
----
- INSTALL      | 371 +----------------------------------------------------------
- src/svc.c    |  17 ++-
- src/svc_vc.c |  62 +++++++++-
- 3 files changed, 78 insertions(+), 372 deletions(-)
- mode change 100644 => 120000 INSTALL
-
-diff --git a/src/svc.c b/src/svc.c
-index 6db164b..3a8709f 100644
---- a/src/svc.c
-+++ b/src/svc.c
-@@ -57,7 +57,7 @@
- 
- #define max(a, b) (a > b ? a : b)
- 
--static SVCXPRT **__svc_xports;
-+SVCXPRT **__svc_xports;
- int __svc_maxrec;
- 
- /*
-@@ -194,6 +194,21 @@ __xprt_do_unregister (xprt, dolock)
-     rwlock_unlock (&svc_fd_lock);
- }
- 
-+int
-+svc_open_fds()
-+{
-+	int ix;
-+	int nfds = 0;
-+
-+	rwlock_rdlock (&svc_fd_lock);
-+	for (ix = 0; ix < svc_max_pollfd; ++ix) {
-+		if (svc_pollfd[ix].fd != -1)
-+			nfds++;
-+	}
-+	rwlock_unlock (&svc_fd_lock);
-+	return (nfds);
-+}
-+
- /*
-  * Add a service program to the callout list.
-  * The dispatch routine will be called when a rpc request for this
-diff --git a/src/svc_vc.c b/src/svc_vc.c
-index f1d9f00..3dc8a75 100644
---- a/src/svc_vc.c
-+++ b/src/svc_vc.c
-@@ -64,6 +64,8 @@
- 
- 
- extern rwlock_t svc_fd_lock;
-+extern SVCXPRT **__svc_xports;
-+extern int svc_open_fds();
- 
- static SVCXPRT *makefd_xprt(int, u_int, u_int);
- static bool_t rendezvous_request(SVCXPRT *, struct rpc_msg *);
-@@ -82,6 +84,7 @@ static void svc_vc_ops(SVCXPRT *);
- static bool_t svc_vc_control(SVCXPRT *xprt, const u_int rq, void *in);
- static bool_t svc_vc_rendezvous_control (SVCXPRT *xprt, const u_int rq,
- 				   	     void *in);
-+static int __svc_destroy_idle(int timeout);
- 
- struct cf_rendezvous { /* kept in xprt->xp_p1 for rendezvouser */
- 	u_int sendsize;
-@@ -313,13 +316,14 @@ done:
- 	return (xprt);
- }
- 
-+
- /*ARGSUSED*/
- static bool_t
- rendezvous_request(xprt, msg)
- 	SVCXPRT *xprt;
- 	struct rpc_msg *msg;
- {
--	int sock, flags;
-+	int sock, flags, nfds, cnt;
- 	struct cf_rendezvous *r;
- 	struct cf_conn *cd;
- 	struct sockaddr_storage addr;
-@@ -379,6 +383,16 @@ again:
- 
- 	gettimeofday(&cd->last_recv_time, NULL);
- 
-+	nfds = svc_open_fds();
-+	if (nfds >= (_rpc_dtablesize() / 5) * 4) {
-+		/* destroy idle connections */
-+		cnt = __svc_destroy_idle(15);
-+		if (cnt == 0) {
-+			/* destroy least active */
-+			__svc_destroy_idle(0);
-+		}
-+	}
-+
- 	return (FALSE); /* there is never an rpc msg to be processed */
- }
- 
-@@ -820,3 +834,49 @@ __svc_clean_idle(fd_set *fds, int timeout, bool_t cleanblock)
- {
- 	return FALSE;
- }
-+
-+static int
-+__svc_destroy_idle(int timeout)
-+{
-+	int i, ncleaned = 0;
-+	SVCXPRT *xprt, *least_active;
-+	struct timeval tv, tdiff, tmax;
-+	struct cf_conn *cd;
-+
-+	gettimeofday(&tv, NULL);
-+	tmax.tv_sec = tmax.tv_usec = 0;
-+	least_active = NULL;
-+	rwlock_wrlock(&svc_fd_lock);
-+
-+	for (i = 0; i <= svc_max_pollfd; i++) {
-+		if (svc_pollfd[i].fd == -1)
-+			continue;
-+		xprt = __svc_xports[i];
-+		if (xprt == NULL || xprt->xp_ops == NULL ||
-+			xprt->xp_ops->xp_recv != svc_vc_recv)
-+			continue;
-+		cd = (struct cf_conn *)xprt->xp_p1;
-+		if (!cd->nonblock)
-+			continue;
-+		if (timeout == 0) {
-+			timersub(&tv, &cd->last_recv_time, &tdiff);
-+			if (timercmp(&tdiff, &tmax, >)) {
-+				tmax = tdiff;
-+				least_active = xprt;
-+			}
-+			continue;
-+		}
-+		if (tv.tv_sec - cd->last_recv_time.tv_sec > timeout) {
-+			__xprt_unregister_unlocked(xprt);
-+			__svc_vc_dodestroy(xprt);
-+			ncleaned++;
-+		}
-+	}
-+	if (timeout == 0 && least_active != NULL) {
-+		__xprt_unregister_unlocked(least_active);
-+		__svc_vc_dodestroy(least_active);
-+		ncleaned++;
-+	}
-+	rwlock_unlock(&svc_fd_lock);
-+	return (ncleaned);
-+}
--- 
-1.8.3.1
-

diff --git a/net-libs/libtirpc/files/libtirpc-1.3.2-memory-leak.patch b/net-libs/libtirpc/files/libtirpc-1.3.2-memory-leak.patch
deleted file mode 100644
index 8ce864a2950c..000000000000
--- a/net-libs/libtirpc/files/libtirpc-1.3.2-memory-leak.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 63f3b9e883231ca08cf9c3cd8f5d582584412d94 Mon Sep 17 00:00:00 2001
-From: Ali Abdallah <ali.abdallah@suse.com>
-Date: Thu, 14 Jul 2022 13:47:32 -0400
-Subject: [PATCH] Fix potential memory leak of parms.r_addr
-
-During some valgrind test, the following is observed
-
-==11391== 64 bytes in 4 blocks are definitely lost in loss record 11 of 16
-==11391==    at 0x4C2A2AF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
-==11391==    by 0x50ECED9: strdup (in /lib64/libc-2.22.so)
-==11391==    by 0x4E4AFBF: getclnthandle (in /lib64/libtirpc.so.3.0.0)
-==11391==    by 0x4E4BD8A: __rpcb_findaddr_timed (in /lib64/libtirpc.so.3.0.0)
-==11391==    by 0x4E443AF: clnt_tp_create_timed (in /lib64/libtirpc.so.3.0.0)
-==11391==    by 0x4E44580: clnt_create_timed (in /lib64/libtirpc.so.3.0.0)
-==11391==    by 0x400755: main (in /local/02/xdtadti/tirpc-test/client)
-
-Signed-off-by: Steve Dickson <steved@redhat.com>
----
- INSTALL         | 369 +-------------------------------------------------------
- src/rpcb_clnt.c |   8 ++
- 2 files changed, 9 insertions(+), 368 deletions(-)
- mode change 100644 => 120000 INSTALL
-
-diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c
-index 0c34cb7..1a23cb1 100644
---- a/src/rpcb_clnt.c
-+++ b/src/rpcb_clnt.c
-@@ -798,6 +798,10 @@ __try_protocol_version_2(program, version, nconf, host, tp)
- 	pmapaddress->len = pmapaddress->maxlen = remote.len;
- 
- 	CLNT_DESTROY(client);
-+
-+	if (parms.r_addr != NULL && parms.r_addr != nullstring)
-+		free(parms.r_addr);
-+
- 	return pmapaddress;
- 
- error:
-@@ -806,6 +810,10 @@ error:
- 		client = NULL;
- 
- 	}
-+
-+	if (parms.r_addr != NULL && parms.r_addr != nullstring)
-+		free(parms.r_addr);
-+
- 	return (NULL);
- 
- }
--- 
-1.8.3.1
-

diff --git a/net-libs/libtirpc/files/libtirpc-1.3.2-use-after-free.patch b/net-libs/libtirpc/files/libtirpc-1.3.2-use-after-free.patch
deleted file mode 100644
index 8e85a564f29a..000000000000
--- a/net-libs/libtirpc/files/libtirpc-1.3.2-use-after-free.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From d0dc59e27263c6b53435d770010dcc6f397d58ee Mon Sep 17 00:00:00 2001
-From: Frank Sorenson <sorenson@redhat.com>
-Date: Mon, 17 Jan 2022 13:33:13 -0500
-Subject: [PATCH] libtirpc: Fix use-after-free accessing the error number
-
-Free the cbuf after obtaining the error number.
-
-Signed-off-by: Frank Sorenson <sorenson@redhat.com>
-Signed-off-by: Steve Dickson <steved@redhat.com>
----
- src/clnt_dg.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/clnt_dg.c b/src/clnt_dg.c
-index e1255de..b3d82e7 100644
---- a/src/clnt_dg.c
-+++ b/src/clnt_dg.c
-@@ -456,9 +456,9 @@ get_reply:
- 		 cmsg = CMSG_NXTHDR (&msg, cmsg))
- 	      if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_RECVERR)
- 		{
--		  mem_free(cbuf, (outlen + 256));
- 		  e = (struct sock_extended_err *) CMSG_DATA(cmsg);
- 		  cu->cu_error.re_errno = e->ee_errno;
-+		  mem_free(cbuf, (outlen + 256));
- 		  release_fd_lock(cu->cu_fd_lock, mask);
- 		  return (cu->cu_error.re_status = RPC_CANTRECV);
- 		}
--- 
-1.8.3.1
-

diff --git a/net-libs/libtirpc/libtirpc-1.3.2-r1.ebuild b/net-libs/libtirpc/libtirpc-1.3.2-r1.ebuild
deleted file mode 100644
index fe750fb291d8..000000000000
--- a/net-libs/libtirpc/libtirpc-1.3.2-r1.ebuild
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-minimal usr-ldscript
-
-DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
-HOMEPAGE="https://sourceforge.net/projects/libtirpc/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
-	mirror://gentoo/${PN}-glibc-nfs.tar.xz"
-
-LICENSE="BSD BSD-2 BSD-4 LGPL-2.1+"
-SLOT="0/3" # subslot matches SONAME major
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="ipv6 kerberos static-libs"
-
-RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	elibc_musl? ( sys-libs/queue-standalone )"
-BDEPEND="
-	app-arch/xz-utils
-	virtual/pkgconfig"
-
-src_prepare() {
-	local PATCHES=(
-		"${FILESDIR}"/libtirpc-1.3.2-dos.patch
-		"${FILESDIR}"/libtirpc-1.3.2-use-after-free.patch
-		"${FILESDIR}"/libtirpc-1.3.2-memory-leak.patch
-	)
-	cp -r "${WORKDIR}"/tirpc "${S}"/ || die
-	default
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		$(use_enable ipv6)
-		$(use_enable kerberos gssapi)
-		$(use_enable static-libs static)
-	)
-	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install() {
-	default
-
-	# libtirpc replaces rpc support in glibc, so we need it in /
-	gen_usr_ldscript -a tirpc
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	insinto /etc
-	doins doc/netconfig
-
-	insinto /usr/include/tirpc
-	doins -r "${WORKDIR}"/tirpc/*
-
-	# makes sure that the linking order for nfs-utils is proper, as
-	# libtool would inject a libgssglue dependency in the list.
-	if ! use static-libs ; then
-		find "${ED}" -name "*.la" -delete || die
-	fi
-}

diff --git a/net-libs/libtirpc/libtirpc-1.3.2.ebuild b/net-libs/libtirpc/libtirpc-1.3.2.ebuild
deleted file mode 100644
index 8b1e3780df4b..000000000000
--- a/net-libs/libtirpc/libtirpc-1.3.2.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-minimal usr-ldscript
-
-DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
-HOMEPAGE="https://sourceforge.net/projects/libtirpc/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
-	mirror://gentoo/${PN}-glibc-nfs.tar.xz"
-
-LICENSE="BSD BSD-2 BSD-4 LGPL-2.1+"
-SLOT="0/3" # subslot matches SONAME major
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="ipv6 kerberos static-libs"
-
-RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	elibc_musl? ( sys-libs/queue-standalone )"
-BDEPEND="
-	app-arch/xz-utils
-	virtual/pkgconfig"
-
-src_prepare() {
-	cp -r "${WORKDIR}"/tirpc "${S}"/ || die
-	default
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		$(use_enable ipv6)
-		$(use_enable kerberos gssapi)
-		$(use_enable static-libs static)
-	)
-	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install() {
-	default
-
-	# libtirpc replaces rpc support in glibc, so we need it in /
-	gen_usr_ldscript -a tirpc
-}
-
-multilib_src_install_all() {
-	einstalldocs
-
-	insinto /etc
-	doins doc/netconfig
-
-	insinto /usr/include/tirpc
-	doins -r "${WORKDIR}"/tirpc/*
-
-	# makes sure that the linking order for nfs-utils is proper, as
-	# libtool would inject a libgssglue dependency in the list.
-	if ! use static-libs ; then
-		find "${ED}" -name "*.la" -delete || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-22  3:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-24  0:38 [gentoo-commits] repo/gentoo:master commit in: net-libs/libtirpc/, net-libs/libtirpc/files/ Mike Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2022-10-22  3:01 Mike Gilbert
2020-03-18 20:17 Mike Gilbert
2020-03-16 16:22 Mike Gilbert
2020-01-19 22:10 Mike Gilbert
2019-09-28 18:27 Matt Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox