[packages/rpcbind] - updated to 0.2.3

baggins baggins at pld-linux.org
Sun Sep 4 11:33:50 CEST 2016


commit d8b0171a4af95cf4c5f52999c4d34dcd3044da2a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Sep 4 11:33:41 2016 +0200

    - updated to 0.2.3

 rpcbind-libwrap.patch   |   8 ++--
 rpcbind-sunrpc.patch    |  18 +++----
 rpcbind-tcp-addrs.patch | 121 ++++++++++++++++++------------------------------
 rpcbind.spec            |   8 ++--
 4 files changed, 63 insertions(+), 92 deletions(-)
---
diff --git a/rpcbind.spec b/rpcbind.spec
index 7402cbf..a1595dc 100644
--- a/rpcbind.spec
+++ b/rpcbind.spec
@@ -1,12 +1,12 @@
 Summary:	Universal addresses to RPC program number mapper
 Summary(pl.UTF-8):	Demon odwzorowujący adresy uniwersalne na numery programów RPC
 Name:		rpcbind
-Version:	0.2.1
-Release:	5
+Version:	0.2.3
+Release:	1
 License:	BSD
 Group:		Daemons
 Source0:	http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
-# Source0-md5:	0a5f9c2142af814c55d957aaab3bcc68
+# Source0-md5:	c8875246b2688a1adfbd6ad43480278d
 Source1:	%{name}.init
 Source2:	%{name}.sysconfig
 Source3:	%{name}.service
@@ -56,7 +56,7 @@ wywołania RPC na serwerze na tej maszynie.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%patch6 -p1
+#%patch6 -p1
 
 %build
 %{__libtoolize}
diff --git a/rpcbind-libwrap.patch b/rpcbind-libwrap.patch
index ef5262c..cd5d0ea 100644
--- a/rpcbind-libwrap.patch
+++ b/rpcbind-libwrap.patch
@@ -9,11 +9,11 @@
  
  bin_PROGRAMS = rpcbind rpcinfo
 @@ -24,7 +28,7 @@
- 	src/security.c \
  	src/util.c \
- 	src/warmstart.c
+ 	src/warmstart.c \
+ 	src/xlog.c
 -rpcbind_LDADD = $(TIRPC_LIBS)
 +rpcbind_LDADD = $(TIRPC_LIBS) $(WRAPLIB)
  
- rpcinfo_SOURCES =       src/rpcinfo.c
- rpcinfo_LDADD   =       $(TIRPC_LIBS)
+ if SYSTEMD
+ AM_CPPFLAGS += $(SYSTEMD_CFLAGS) -DSYSTEMD
diff --git a/rpcbind-sunrpc.patch b/rpcbind-sunrpc.patch
index 76cf54b..3bbd8a3 100644
--- a/rpcbind-sunrpc.patch
+++ b/rpcbind-sunrpc.patch
@@ -11,12 +11,12 @@
  int main __P((int, char *[]));
 --- rpcbind-0.1.7/src/rpcinfo.c~	2010-01-08 16:14:24.592156602 +0000
 +++ rpcbind-0.1.7/src/rpcinfo.c	2010-01-08 16:14:31.578838609 +0000
-@@ -633,7 +633,7 @@
- 	{
- 	  memset (&hints, 0, sizeof hints);
- 	  hints.ai_family = AF_INET;
--	  if ((error = getaddrinfo (host, "rpcbind", &hints, &res)) != 0 &&
-+	  if ((error = getaddrinfo (host, "sunrpc", &hints, &res)) != 0 &&
-               (error = getaddrinfo (host, "portmapper", &hints, &res)) != 0)
- 	    {
- 	      fprintf (stderr, "rpcinfo: %s: %s\n",
+@@ -1842,7 +1842,7 @@
+ 
+   /* Get the address of the rpcbind */
+   memset (&hints, 0, sizeof hints);
+-  if ((getaddrinfo (host, "rpcbind", &hints, &res) != 0) &&
++  if ((getaddrinfo (host, "sunrpc", &hints, &res) != 0) &&
+       (getaddrinfo (host, "portmapper",&hints, &res) != 0))
+     {
+       rpc_createerr.cf_stat = RPC_N2AXLATEFAILURE;
diff --git a/rpcbind-tcp-addrs.patch b/rpcbind-tcp-addrs.patch
index 43ffd2f..0edc59b 100644
--- a/rpcbind-tcp-addrs.patch
+++ b/rpcbind-tcp-addrs.patch
@@ -1,8 +1,7 @@
-diff --git a/src/rpcbind.c b/src/rpcbind.c
-index 63023e1..310c243 100644
---- a/src/rpcbind.c
-+++ b/src/rpcbind.c
-@@ -275,7 +275,7 @@ init_transport(struct netconfig *nconf)
+diff -ur rpcbind-0.2.3.orig/src/rpcbind.c rpcbind-0.2.3/src/rpcbind.c
+--- rpcbind-0.2.3.orig/src/rpcbind.c	2015-04-27 16:07:43.000000000 +0200
++++ rpcbind-0.2.3/src/rpcbind.c	2016-09-04 11:30:23.340410259 +0200
+@@ -340,7 +340,7 @@
  	int status;	/* bound checking ? */
  	int aicode;
  	int addrlen = 0;
@@ -11,26 +10,7 @@ index 63023e1..310c243 100644
  	int checkbind;
  	int on = 1;
  	struct sockaddr *sa = NULL;
-@@ -301,18 +301,6 @@ init_transport(struct netconfig *nconf)
- 	}
- #endif
- 
--	/*
--	 * XXX - using RPC library internal functions. For NC_TPI_CLTS
--	 * we call this later, for each socket we like to bind.
--	 */
--	if (nconf->nc_semantics != NC_TPI_CLTS) {
--		if ((fd = __rpc_nconf2fd(nconf)) < 0) {
--			syslog(LOG_ERR, "cannot create socket for %s",
--			    nconf->nc_netid);
--			return (1);
--		}
--	}
--
- 	if (!__rpc_nconf2sockinfo(nconf, &si)) {
- 		syslog(LOG_ERR, "cannot get information for %s",
- 		    nconf->nc_netid);
-@@ -335,8 +323,6 @@ init_transport(struct netconfig *nconf)
+@@ -456,8 +456,6 @@
  		hints.ai_family = si.si_af;
  		hints.ai_socktype = si.si_socktype;
  		hints.ai_protocol = si.si_proto;
@@ -39,7 +19,7 @@ index 63023e1..310c243 100644
  		/*
  		 * If no hosts were specified, just bind to INADDR_ANY.  Otherwise
  		 * make sure 127.0.0.1 is added to the list.
-@@ -354,21 +340,15 @@ init_transport(struct netconfig *nconf)
+@@ -475,21 +473,15 @@
  			} else
  				return 1;
  		}
@@ -67,10 +47,10 @@ index 63023e1..310c243 100644
 +		--nhostsbak;
 +		if ((strcmp(nconf->nc_netid, "local") != 0) &&
 +		    (strcmp(nconf->nc_netid, "unix") != 0)) {
+ 
+ 			hints.ai_flags &= ~AI_NUMERICHOST;
  			switch (hints.ai_family) {
- 			case AF_INET:
- 				if (inet_pton(AF_INET, hosts[nhostsbak],
-@@ -395,7 +375,7 @@ init_transport(struct netconfig *nconf)
+@@ -518,7 +510,7 @@
  					    host_addr) == 1)
  						continue;
  				}
@@ -79,7 +59,7 @@ index 63023e1..310c243 100644
  			default:
  				break;
  			}
-@@ -418,97 +398,37 @@ init_transport(struct netconfig *nconf)
+@@ -541,103 +533,37 @@
  			}
  			addrlen = res->ai_addrlen;
  			sa = (struct sockaddr *)res->ai_addr;
@@ -94,8 +74,7 @@ index 63023e1..310c243 100644
 -			} else
 -				checkbind++;
 -			(void) umask(oldmask);
-+		}
- 
+-
 -			/* Copy the address */
 -			taddr.addr.maxlen = taddr.addr.len = addrlen;
 -			taddr.addr.buf = malloc(addrlen);
@@ -103,23 +82,8 @@ index 63023e1..310c243 100644
 -				syslog(LOG_ERR,
 -				    "cannot allocate memory for %s address",
 -				    nconf->nc_netid);
-+		/*
-+		 * XXX - using RPC library internal functions.
-+		 */
-+		if ((fd = __rpc_nconf2fd(nconf)) < 0) {
-+			syslog(LOG_ERR, "cannot create socket for %s",
-+			    nconf->nc_netid);
-+			continue;
-+		}
-+		oldmask = umask(S_IXUSR|S_IXGRP|S_IXOTH);
-+		if (nconf->nc_semantics != NC_TPI_CLTS) {
-+			__rpc_fd2sockinfo(fd, &si);
-+			if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on,
-+					sizeof(on)) != 0) {
-+				syslog(LOG_ERR, "cannot set SO_REUSEADDR on %s",
-+					nconf->nc_netid);
- 				if (res != NULL)
- 					freeaddrinfo(res);
+-				if (res != NULL)
+-					freeaddrinfo(res);
 -				return 1;
 -			}
 -			memcpy(taddr.addr.buf, sa, addrlen);
@@ -144,7 +108,7 @@ index 63023e1..310c243 100644
 -				}
 -				nb.len = nb.maxlen = sa_size;
 -				uaddr = taddr2uaddr(nconf, &nb);
--				(void) fprintf(stderr,
+-				(void) xlog(LOG_DEBUG,
 -				    "rpcbind : my address is %s\n", uaddr);
 -				(void) free(uaddr);
 -			}
@@ -156,10 +120,20 @@ index 63023e1..310c243 100644
 -                                        nconf->nc_netid);
 -				goto error;
 -			}
--		}
+ 		}
 -		if (!checkbind)
 -			return 1;
 -	} else {	/* NC_TPI_COTS */
++
++		/*
++		 * XXX - using RPC library internal functions.
++		 */
+ 		if ((fd = __rpc_nconf2fd(nconf)) < 0) {
+ 			syslog(LOG_ERR, "cannot create socket for %s",
+ 			    nconf->nc_netid);
+-			return (1);
+-		}
+-
 -		if ((strcmp(nconf->nc_netid, "local") != 0) &&
 -		    (strcmp(nconf->nc_netid, "unix") != 0)) {
 -			if ((aicode = getaddrinfo(NULL, servname, &hints, &res))!= 0) {
@@ -170,12 +144,12 @@ index 63023e1..310c243 100644
 -				    nconf->nc_netid, gai_strerror(aicode));
 -				return 1;
 -			  }
-+				continue;
- 			}
+-			}
 -			addrlen = res->ai_addrlen;
 -			sa = (struct sockaddr *)res->ai_addr;
--		}
--		oldmask = umask(S_IXUSR|S_IXGRP|S_IXOTH);
++			continue;
+ 		}
+ 		oldmask = umask(S_IXUSR|S_IXGRP|S_IXOTH);
 -		__rpc_fd2sockinfo(fd, &si);
 -		if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on,
 -				sizeof(on)) != 0) {
@@ -184,6 +158,16 @@ index 63023e1..310c243 100644
 -			if (res != NULL)
 -				freeaddrinfo(res);
 -			return 1;
++		if (nconf->nc_semantics != NC_TPI_CLTS) {
++			__rpc_fd2sockinfo(fd, &si);
++			if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on,
++					sizeof(on)) != 0) {
++				syslog(LOG_ERR, "cannot set SO_REUSEADDR on %s",
++					nconf->nc_netid);
++				if (res != NULL)
++					freeaddrinfo(res);
++				continue;
++			}
  		}
  		if (bind(fd, sa, addrlen) < 0) {
 -			syslog(LOG_ERR, "cannot bind %s: %m", nconf->nc_netid);
@@ -200,7 +184,7 @@ index 63023e1..310c243 100644
  		(void) umask(oldmask);
  
  		/* Copy the address */
-@@ -527,7 +447,7 @@ init_transport(struct netconfig *nconf)
+@@ -656,7 +582,7 @@
  			/* for debugging print out our universal address */
  			char *uaddr;
  			struct netbuf nb;
@@ -209,7 +193,7 @@ index 63023e1..310c243 100644
  
  			nb.buf = sa;
  			switch( sa->sa_family){
-@@ -546,7 +466,8 @@ init_transport(struct netconfig *nconf)
+@@ -675,7 +601,8 @@
  		}
  #endif
  
@@ -219,25 +203,12 @@ index 63023e1..310c243 100644
  
  		my_xprt = (SVCXPRT *)svc_tli_create(fd, nconf, &taddr, RPC_MAXDATASIZE, RPC_MAXDATASIZE);
  		if (my_xprt == (SVCXPRT *)NULL) {
-@@ -555,6 +476,8 @@ init_transport(struct netconfig *nconf)
- 			goto error;
- 		}
+@@ -740,6 +667,8 @@
+ 		/* Also add version 2 stuff to rpcbind list */
+ 		rbllist_add(PMAPPROG, PMAPVERS, nconf, &taddr.addr);
  	}
 +	if (!checkbind)
 +		return 1;
  
- #ifdef PORTMAP
- 	/*
-diff --git a/man/rpcbind.8 b/man/rpcbind.8
-index c5b8fb7..aa53a25 100644
---- a/man/rpcbind.8
-+++ b/man/rpcbind.8
-@@ -85,7 +85,7 @@ checks are shown in detail.
- .It Fl f
- Do not fork and become a background process.
- .It Fl h
--Specify specific IP addresses to bind to for UDP requests.
-+Specify specific IP addresses to bind to for requests.
- This option
- may be specified multiple times and is typically necessary when running
- on a multi-homed host.
+ 	/* We need to support portmap over IPv4. It makes sense to
+ 	 * support it over AF_LOCAL as well, because that allows
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpcbind.git/commitdiff/d8b0171a4af95cf4c5f52999c4d34dcd3044da2a



More information about the pld-cvs-commit mailing list