[arch-commits] Commit in libtirpc/repos (3 files)
Andreas Radke
andyrtr at archlinux.org
Tue May 8 17:02:21 UTC 2018
Date: Tuesday, May 8, 2018 @ 17:02:20
Author: andyrtr
Revision: 323545
archrelease: copy trunk to testing-x86_64
Added:
libtirpc/repos/testing-x86_64/
libtirpc/repos/testing-x86_64/PKGBUILD
(from rev 323544, libtirpc/trunk/PKGBUILD)
libtirpc/repos/testing-x86_64/restore_using_reserve_ports_for_client_connections.diff
(from rev 323544, libtirpc/trunk/restore_using_reserve_ports_for_client_connections.diff)
---------------------------------------------------------+
PKGBUILD | 35 ++++++
restore_using_reserve_ports_for_client_connections.diff | 72 ++++++++++++++
2 files changed, 107 insertions(+)
Copied: libtirpc/repos/testing-x86_64/PKGBUILD (from rev 323544, libtirpc/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2018-05-08 17:02:20 UTC (rev 323545)
@@ -0,0 +1,35 @@
+# $Id$
+# Maintainer: Tom Gundersen <teg at jklm.no>
+# Contributor: Tobias Powalowski <tpowa at archlinux.org>
+
+pkgname=libtirpc
+pkgver=1.0.3
+pkgrel=2
+pkgdesc="Transport Independent RPC library (SunRPC replacement)"
+arch=('x86_64')
+url="http://libtirpc.sourceforge.net/"
+license=('BSD')
+depends=('krb5')
+backup=('etc/netconfig')
+# git tree: git://linux-nfs.org/~steved/libtirpc
+source=(http://downloads.sourceforge.net/sourceforge/libtirpc/${pkgname}-${pkgver}.tar.bz2
+ restore_using_reserve_ports_for_client_connections.diff)
+sha1sums=('48adb32dc7c3b73c66f001c239da76b8398abf11'
+ '6a290ad197f044ed88607760a69dd24746152bc3')
+
+prepare(){
+ cd ${pkgname}-${pkgver}
+ patch -Np1 -i ../restore_using_reserve_ports_for_client_connections.diff
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr --sysconf=/etc
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
Copied: libtirpc/repos/testing-x86_64/restore_using_reserve_ports_for_client_connections.diff (from rev 323544, libtirpc/trunk/restore_using_reserve_ports_for_client_connections.diff)
===================================================================
--- testing-x86_64/restore_using_reserve_ports_for_client_connections.diff (rev 0)
+++ testing-x86_64/restore_using_reserve_ports_for_client_connections.diff 2018-05-08 17:02:20 UTC (rev 323545)
@@ -0,0 +1,72 @@
+From 2802259184ada839793152ed0a0f130065f82dfd Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved at redhat.com>
+Date: Thu, 12 Apr 2018 10:24:02 -0400
+Subject: [PATCH] clnt_create: Restore using reserve ports for client
+ connections
+
+Commit 46e04a73 changed clnt_create(3) not to
+use reserve ports when binding a connection to
+a server.
+
+For certain legacy apps, like some of the NIS commands,
+the client has to used reserve port to be able
+to communicate with the server.
+
+So the use of reserve ports in clnt_create(3)
+has been restored.
+
+Signed-off-by: Steve Dickson <steved at redhat.com>
+---
+ src/clnt_generic.c | 4 +---
+ src/rpc_soc.c | 5 +----
+ 2 files changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/src/clnt_generic.c b/src/clnt_generic.c
+index e5a314f..3f3dabf 100644
+--- a/src/clnt_generic.c
++++ b/src/clnt_generic.c
+@@ -47,7 +47,6 @@
+
+ extern bool_t __rpc_is_local_host(const char *);
+ int __rpc_raise_fd(int);
+-extern int __binddynport(int fd);
+
+ #ifndef NETIDLEN
+ #define NETIDLEN 32
+@@ -341,8 +340,7 @@ clnt_tli_create(int fd, const struct netconfig *nconf,
+ servtype = nconf->nc_semantics;
+ if (!__rpc_fd2sockinfo(fd, &si))
+ goto err;
+- if (__binddynport(fd) == -1)
+- goto err;
++ bindresvport(fd, NULL);
+ } else {
+ if (!__rpc_fd2sockinfo(fd, &si))
+ goto err;
+diff --git a/src/rpc_soc.c b/src/rpc_soc.c
+index af6c482..5a6eeb7 100644
+--- a/src/rpc_soc.c
++++ b/src/rpc_soc.c
+@@ -67,8 +67,6 @@
+
+ extern mutex_t rpcsoc_lock;
+
+-extern int __binddynport(int fd);
+-
+ static CLIENT *clnt_com_create(struct sockaddr_in *, rpcprog_t, rpcvers_t,
+ int *, u_int, u_int, char *, int);
+ static SVCXPRT *svc_com_create(int, u_int, u_int, char *);
+@@ -147,8 +145,7 @@ clnt_com_create(raddr, prog, vers, sockp, sendsz, recvsz, tp, flags)
+ bindaddr.maxlen = bindaddr.len = sizeof (struct sockaddr_in);
+ bindaddr.buf = raddr;
+
+- if (__binddynport(fd) == -1)
+- goto err;
++ bindresvport(fd, NULL);
+ cl = clnt_tli_create(fd, nconf, &bindaddr, prog, vers,
+ sendsz, recvsz);
+ if (cl) {
+--
+1.8.3.1
+
+
More information about the arch-commits
mailing list