From 283abcbc025696d1ef5df0adef43e0b052e0a40d Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 21 Mar 2017 10:55:19 -0400 Subject: [PATCH 01/51] Try creating statdir once when opening lock file fails (bz 1401561) Signed-off-by: Steve Dickson --- rpcbind-0.2.4-systemd-rundir.patch | 35 ++++++++++++++++++++++++++++++ rpcbind.spec | 7 +++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 rpcbind-0.2.4-systemd-rundir.patch diff --git a/rpcbind-0.2.4-systemd-rundir.patch b/rpcbind-0.2.4-systemd-rundir.patch new file mode 100644 index 0000000..da08d7a --- /dev/null +++ b/rpcbind-0.2.4-systemd-rundir.patch @@ -0,0 +1,35 @@ +diff -up rpcbind-0.2.4/src/rpcbind.c.orig rpcbind-0.2.4/src/rpcbind.c +--- rpcbind-0.2.4/src/rpcbind.c.orig 2017-03-21 10:12:35.005190509 -0400 ++++ rpcbind-0.2.4/src/rpcbind.c 2017-03-21 10:36:45.510507649 -0400 +@@ -144,6 +144,8 @@ static void rbllist_add(rpcprog_t, rpcve + static void terminate(int); + static void parseargs(int, char *[]); + ++char *systemdtmp = "/usr/bin/systemd-tmpfiles --create rpcbind.conf"; ++ + int + main(int argc, char *argv[]) + { +@@ -151,13 +153,21 @@ main(int argc, char *argv[]) + void *nc_handle; /* Net config handle */ + struct rlimit rl; + int maxrec = RPC_MAXDATASIZE; ++ int once = 1; + + parseargs(argc, argv); + ++tryagain: + /* Check that another rpcbind isn't already running. */ + if ((rpcbindlockfd = (open(RPCBINDDLOCK, +- O_RDONLY|O_CREAT, 0444))) == -1) ++ O_RDONLY|O_CREAT, 0444))) == -1) { ++ if (once) { ++ once = system(systemdtmp); /* set once to avoid a warning */ ++ once = 0; ++ goto tryagain; ++ } + err(1, "%s", RPCBINDDLOCK); ++ } + + if(flock(rpcbindlockfd, LOCK_EX|LOCK_NB) == -1 && errno == EWOULDBLOCK) + errx(1, "another rpcbind is already running. Aborting"); diff --git a/rpcbind.spec b/rpcbind.spec index 15e5676..06b0dc6 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -1,6 +1,6 @@ Name: rpcbind Version: 0.2.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -25,6 +25,7 @@ Patch100: rpcbind-0.2.3-systemd-envfile.patch Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch Patch102: rpcbind-0.2.4-runstatdir.patch Patch103: rpcbind-0.2.4-systemd-service.patch +Patch104: rpcbind-0.2.4-systemd-rundir.patch Provides: portmap = %{version}-%{release} Obsoletes: portmap <= 4.0-65.3 @@ -44,6 +45,7 @@ RPC calls on a server on that machine. %patch101 -p1 %patch102 -p1 %patch103 -p1 +%patch104 -p1 %build %ifarch s390 s390x PIE="-fPIE" @@ -137,6 +139,9 @@ fi %{_tmpfilesdir}/%{name}.conf %changelog +* Tue Mar 21 2017 Steve Dickson - 0.2.4-6 +- Try creating statdir once when opening lock file fails (bz 1401561) + * Sat Feb 11 2017 Fedora Release Engineering - 0.2.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 57c833e131c9d3a173924ca103e4ce05b9ef955d Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Thu, 11 May 2017 12:05:09 -0400 Subject: [PATCH 02/51] Fixed memory leaks (bz 1448128) Signed-off-by: Steve Dickson --- rpcbind-0.2.4-rc1.patch | 193 ----------- rpcbind-0.2.4-rc2.patch | 474 ---------------------------- rpcbind-0.2.4-systemd-statdir.patch | 27 -- rpcbind-0.2.5-rc1.patch | 185 +++++++++++ rpcbind.spec | 7 +- 5 files changed, 190 insertions(+), 696 deletions(-) delete mode 100644 rpcbind-0.2.4-rc1.patch delete mode 100644 rpcbind-0.2.4-rc2.patch delete mode 100644 rpcbind-0.2.4-systemd-statdir.patch create mode 100644 rpcbind-0.2.5-rc1.patch diff --git a/rpcbind-0.2.4-rc1.patch b/rpcbind-0.2.4-rc1.patch deleted file mode 100644 index be4b115..0000000 --- a/rpcbind-0.2.4-rc1.patch +++ /dev/null @@ -1,193 +0,0 @@ -diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c -index ff9ce6b..148fe42 100644 ---- a/src/rpcb_svc_com.c -+++ b/src/rpcb_svc_com.c -@@ -536,10 +536,6 @@ create_rmtcall_fd(struct netconfig *nconf) - rmttail->next = rmt; - rmttail = rmt; - } -- /* XXX not threadsafe */ -- if (fd > svc_maxfd) -- svc_maxfd = fd; -- FD_SET(fd, &svc_fdset); - return (fd); - } - -@@ -1056,9 +1052,6 @@ free_slot_by_index(int index) - fi = &FINFO[index]; - if (fi->flag & FINFO_ACTIVE) { - netbuffree(fi->caller_addr); -- /* XXX may be too big, but can't access xprt array here */ -- if (fi->forward_fd >= svc_maxfd) -- svc_maxfd--; - free(fi->uaddr); - fi->flag &= ~FINFO_ACTIVE; - rpcb_rmtcalls--; -@@ -1097,35 +1090,28 @@ netbuffree(struct netbuf *ap) - } - - --#define MASKVAL (POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND) --extern bool_t __svc_clean_idle(fd_set *, int, bool_t); -- - void - my_svc_run() - { -- size_t nfds; -- struct pollfd pollfds[FD_SETSIZE]; - int poll_ret, check_ret; - int n; --#ifdef SVC_RUN_DEBUG -- int i; --#endif -- register struct pollfd *p; -- fd_set cleanfds; - - for (;;) { -- p = pollfds; -- for (n = 0; n <= svc_maxfd; n++) { -- if (FD_ISSET(n, &svc_fdset)) { -- p->fd = n; -- p->events = MASKVAL; -- p++; -- } -- } -- nfds = p - pollfds; -- poll_ret = 0; -+ struct pollfd my_pollfd[svc_max_pollfd]; -+ int i; -+ -+ if (svc_max_pollfd == 0 && svc_pollfd == NULL) -+ return; - -- switch (poll_ret = poll(pollfds, nfds, 30 * 1000)) { -+ -+ for (i = 0; i < svc_max_pollfd; ++i) -+ { -+ my_pollfd[i].fd = svc_pollfd[i].fd; -+ my_pollfd[i].events = svc_pollfd[i].events; -+ my_pollfd[i].revents = 0; -+ } -+ -+ switch (poll_ret = poll(my_pollfd, svc_max_pollfd, 30 * 1000)) { - case -1: - /* - * We ignore all errors, continuing with the assumption -@@ -1133,8 +1119,6 @@ my_svc_run() - * other outside event) and not caused by poll(). - */ - case 0: -- cleanfds = svc_fdset; -- __svc_clean_idle(&cleanfds, 30, FALSE); - continue; - default: - /* -@@ -1144,10 +1128,10 @@ my_svc_run() - * don't call svc_getreq_poll. Otherwise, there - * must be another so we must call svc_getreq_poll. - */ -- if ((check_ret = check_rmtcalls(pollfds, nfds)) == -+ if ((check_ret = check_rmtcalls(my_pollfd, svc_max_pollfd)) == - poll_ret) - continue; -- svc_getreq_poll(pollfds, poll_ret-check_ret); -+ svc_getreq_poll(my_pollfd, poll_ret-check_ret); - } - } - } -@@ -1183,12 +1167,33 @@ check_rmtcalls(struct pollfd *pfds, int nfds) - return (ncallbacks_found); - } - -+/* -+ * This is really a helper function defined in libtirpc, -+ * but unfortunately, it hasn't been exported yet. -+ */ -+static struct netbuf * -+__rpc_set_netbuf(struct netbuf *nb, const void *ptr, size_t len) -+{ -+ if (nb->len != len) { -+ if (nb->len) -+ mem_free(nb->buf, nb->len); -+ nb->buf = mem_alloc(len); -+ if (nb->buf == NULL) -+ return NULL; -+ -+ nb->maxlen = nb->len = len; -+ } -+ memcpy(nb->buf, ptr, len); -+ return nb; -+} -+ - static void - xprt_set_caller(SVCXPRT *xprt, struct finfo *fi) - { -+ const struct netbuf *caller = fi->caller_addr; - u_int32_t *xidp; - -- *(svc_getrpccaller(xprt)) = *(fi->caller_addr); -+ __rpc_set_netbuf(svc_getrpccaller(xprt), caller->buf, caller->len); - xidp = __rpcb_get_dg_xidp(xprt); - *xidp = fi->caller_xid; - } -@@ -1274,10 +1279,17 @@ handle_reply(int fd, SVCXPRT *xprt) - a.rmt_localvers = fi->versnum; - - xprt_set_caller(xprt, fi); -+#if defined(SVC_XP_AUTH) -+ SVC_XP_AUTH(xprt) = svc_auth_none; -+#else - xprt->xp_auth = &svc_auth_none; -+#endif - svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a); -+#if !defined(SVC_XP_AUTH) - SVCAUTH_DESTROY(xprt->xp_auth); - xprt->xp_auth = NULL; -+#endif -+ - done: - if (buffer) - free(buffer); -diff --git a/src/rpcbind.c b/src/rpcbind.c -index 045daa1..c4265cd 100644 ---- a/src/rpcbind.c -+++ b/src/rpcbind.c -@@ -87,6 +87,7 @@ static inline void __nss_configure_lookup(const char *db, const char *s) {} - int debugging = 0; /* Tell me what's going on */ - int doabort = 0; /* When debugging, do an abort on errors */ - int dofork = 1; /* fork? */ -+int createdsocket = 0; /* Did I create the socket or systemd did it for me? */ - - rpcblist_ptr list_rbl; /* A list of version 3/4 rpcbind services */ - -@@ -445,6 +446,7 @@ init_transport(struct netconfig *nconf) - memset(&sun, 0, sizeof sun); - sun.sun_family = AF_LOCAL; - unlink(_PATH_RPCBINDSOCK); -+ createdsocket = 1; /* We are now in the process of creating the unix socket */ - strcpy(sun.sun_path, _PATH_RPCBINDSOCK); - addrlen = SUN_LEN(&sun); - sa = (struct sockaddr *)&sun; -@@ -846,7 +848,8 @@ static void - terminate(int dummy /*__unused*/) - { - close(rpcbindlockfd); -- unlink(_PATH_RPCBINDSOCK); -+ if(createdsocket) -+ unlink(_PATH_RPCBINDSOCK); - unlink(RPCBINDDLOCK); - #ifdef WARMSTART - write_warmstart(); /* Dump yourself */ -diff --git a/src/security.c b/src/security.c -index 0c9453f..c54ce26 100644 ---- a/src/security.c -+++ b/src/security.c -@@ -17,6 +17,8 @@ - #include - #include - -+#include "xlog.h" -+ - /* - * XXX for special case checks in check_callit. - */ diff --git a/rpcbind-0.2.4-rc2.patch b/rpcbind-0.2.4-rc2.patch deleted file mode 100644 index c29d949..0000000 --- a/rpcbind-0.2.4-rc2.patch +++ /dev/null @@ -1,474 +0,0 @@ -diff --git a/.gitignore b/.gitignore -index 321dff6..a8f1fed 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -27,3 +27,4 @@ rpcbind - rpcinfo - # cscope database files - cscope.* -+systemd/rpcbind.service -diff --git a/Makefile.am b/Makefile.am -index 5ec8cd6..43c2710 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -50,6 +50,10 @@ if SYSTEMD - AM_CPPFLAGS += $(SYSTEMD_CFLAGS) -DSYSTEMD - - rpcbind_LDADD += $(SYSTEMD_LIBS) -+ -+systemdsystemunit_DATA = \ -+ systemd/rpcbind.service \ -+ systemd/rpcbind.socket - endif - - rpcinfo_SOURCES = src/rpcinfo.c -diff --git a/configure.ac b/configure.ac -index af4b74b..f84921e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -61,4 +61,9 @@ AC_SEARCH_LIBS([pthread_create], [pthread]) - - AC_CHECK_HEADERS([nss.h rpcsvc/mount.h]) - --AC_OUTPUT([Makefile]) -+# make sbindir available for substitution in config file -+# 2 "evals" needed to expand variable names -+AC_SUBST([_sbindir]) -+AC_CONFIG_COMMANDS_PRE([eval eval _sbindir=$sbindir]) -+ -+AC_OUTPUT([Makefile systemd/rpcbind.service]) -diff --git a/src/check_bound.c b/src/check_bound.c -index c70b845..92bfd36 100644 ---- a/src/check_bound.c -+++ b/src/check_bound.c -@@ -70,7 +70,7 @@ static struct fdlist *fdhead; /* Link list of the check fd's */ - static struct fdlist *fdtail; - static char *nullstring = ""; - --static bool_t check_bound __P((struct fdlist *, char *uaddr)); -+static bool_t check_bound(struct fdlist *, char *uaddr); - - /* - * Returns 1 if the given address is bound for the given addr & transport -diff --git a/src/pmap_svc.c b/src/pmap_svc.c -index ad28b93..4c744fe 100644 ---- a/src/pmap_svc.c -+++ b/src/pmap_svc.c -@@ -60,11 +60,11 @@ static char sccsid[] = "@(#)pmap_svc.c 1.23 89/04/05 Copyr 1984 Sun Micro"; - #include "rpcbind.h" - #include "xlog.h" - #include /* svc_getcaller routine definition */ --static struct pmaplist *find_service_pmap __P((rpcprog_t, rpcvers_t, -- rpcprot_t)); --static bool_t pmapproc_change __P((struct svc_req *, SVCXPRT *, u_long)); --static bool_t pmapproc_getport __P((struct svc_req *, SVCXPRT *)); --static bool_t pmapproc_dump __P((struct svc_req *, SVCXPRT *)); -+static struct pmaplist *find_service_pmap(rpcprog_t, rpcvers_t, -+ rpcprot_t); -+static bool_t pmapproc_change(struct svc_req *, SVCXPRT *, u_long); -+static bool_t pmapproc_getport(struct svc_req *, SVCXPRT *); -+static bool_t pmapproc_dump(struct svc_req *, SVCXPRT *); - - /* - * Called for all the version 2 inquiries. -diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c -index bd92201..709e3fb 100644 ---- a/src/rpcb_svc.c -+++ b/src/rpcb_svc.c -@@ -53,10 +53,10 @@ - #include "rpcbind.h" - #include "xlog.h" - --static void *rpcbproc_getaddr_3_local __P((void *, struct svc_req *, SVCXPRT *, -- rpcvers_t)); --static void *rpcbproc_dump_3_local __P((void *, struct svc_req *, SVCXPRT *, -- rpcvers_t)); -+static void *rpcbproc_getaddr_3_local(void *, struct svc_req *, SVCXPRT *, -+ rpcvers_t); -+static void *rpcbproc_dump_3_local(void *, struct svc_req *, SVCXPRT *, -+ rpcvers_t); - - /* - * Called by svc_getreqset. There is a separate server handle for -@@ -75,7 +75,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) - } argument; - char *result; - xdrproc_t xdr_argument, xdr_result; -- void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); -+ void *(*local)(void *, struct svc_req *, SVCXPRT *, rpcvers_t); - rpcprog_t setprog = 0; - - rpcbs_procinfo(RPCBVERS_3_STAT, rqstp->rq_proc); -diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c -index b673452..5094879 100644 ---- a/src/rpcb_svc_4.c -+++ b/src/rpcb_svc_4.c -@@ -54,13 +54,11 @@ - #include "rpcbind.h" - #include "xlog.h" - --static void *rpcbproc_getaddr_4_local __P((void *, struct svc_req *, SVCXPRT *, -- rpcvers_t)); --static void *rpcbproc_getversaddr_4_local __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); --static void *rpcbproc_getaddrlist_4_local -- __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); --static void free_rpcb_entry_list __P((rpcb_entry_list_ptr *)); --static void *rpcbproc_dump_4_local __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); -+static void *rpcbproc_getaddr_4_local(void *, struct svc_req *, SVCXPRT *, rpcvers_t); -+static void *rpcbproc_getversaddr_4_local(void *, struct svc_req *, SVCXPRT *, rpcvers_t); -+static void *rpcbproc_getaddrlist_4_local(void *, struct svc_req *, SVCXPRT *, rpcvers_t); -+static void free_rpcb_entry_list(rpcb_entry_list_ptr *); -+static void *rpcbproc_dump_4_local(void *, struct svc_req *, SVCXPRT *, rpcvers_t); - - /* - * Called by svc_getreqset. There is a separate server handle for -@@ -78,7 +76,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) - } argument; - char *result; - xdrproc_t xdr_argument, xdr_result; -- void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); -+ void *(*local)(void *, struct svc_req *, SVCXPRT *, rpcvers_t); - rpcprog_t setprog = 0; - - rpcbs_procinfo(RPCBVERS_4_STAT, rqstp->rq_proc); -diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c -index ff9ce6b..5862c26 100644 ---- a/src/rpcb_svc_com.c -+++ b/src/rpcb_svc_com.c -@@ -100,29 +100,29 @@ struct finfo { - static struct finfo FINFO[NFORWARD]; - - --static bool_t xdr_encap_parms __P((XDR *, struct encap_parms *)); --static bool_t xdr_rmtcall_args __P((XDR *, struct r_rmtcall_args *)); --static bool_t xdr_rmtcall_result __P((XDR *, struct r_rmtcall_args *)); --static bool_t xdr_opaque_parms __P((XDR *, struct r_rmtcall_args *)); --static int find_rmtcallfd_by_netid __P((char *)); --static SVCXPRT *find_rmtcallxprt_by_fd __P((int)); --static int forward_register __P((u_int32_t, struct netbuf *, int, char *, -- rpcproc_t, rpcvers_t, u_int32_t *)); --static struct finfo *forward_find __P((u_int32_t)); --static int free_slot_by_xid __P((u_int32_t)); --static int free_slot_by_index __P((int)); --static int netbufcmp __P((struct netbuf *, struct netbuf *)); --static struct netbuf *netbufdup __P((struct netbuf *)); --static void netbuffree __P((struct netbuf *)); --static int check_rmtcalls __P((struct pollfd *, int)); --static void xprt_set_caller __P((SVCXPRT *, struct finfo *)); --static void send_svcsyserr __P((SVCXPRT *, struct finfo *)); --static void handle_reply __P((int, SVCXPRT *)); --static void find_versions __P((rpcprog_t, char *, rpcvers_t *, rpcvers_t *)); --static rpcblist_ptr find_service __P((rpcprog_t, rpcvers_t, char *)); --static char *getowner __P((SVCXPRT *, char *, size_t)); --static int add_pmaplist __P((RPCB *)); --static int del_pmaplist __P((RPCB *)); -+static bool_t xdr_encap_parms(XDR *, struct encap_parms *); -+static bool_t xdr_rmtcall_args(XDR *, struct r_rmtcall_args *); -+static bool_t xdr_rmtcall_result(XDR *, struct r_rmtcall_args *); -+static bool_t xdr_opaque_parms(XDR *, struct r_rmtcall_args *); -+static int find_rmtcallfd_by_netid(char *); -+static SVCXPRT *find_rmtcallxprt_by_fd(int); -+static int forward_register(u_int32_t, struct netbuf *, int, char *, -+ rpcproc_t, rpcvers_t, u_int32_t *); -+static struct finfo *forward_find(u_int32_t); -+static int free_slot_by_xid(u_int32_t); -+static int free_slot_by_index(int); -+static int netbufcmp(struct netbuf *, struct netbuf *); -+static struct netbuf *netbufdup(struct netbuf *); -+static void netbuffree(struct netbuf *); -+static int check_rmtcalls(struct pollfd *, int); -+static void xprt_set_caller(SVCXPRT *, struct finfo *); -+static void send_svcsyserr(SVCXPRT *, struct finfo *); -+static void handle_reply(int, SVCXPRT *); -+static void find_versions(rpcprog_t, char *, rpcvers_t *, rpcvers_t *); -+static rpcblist_ptr find_service(rpcprog_t, rpcvers_t, char *); -+static char *getowner(SVCXPRT *, char *, size_t); -+static int add_pmaplist(RPCB *); -+static int del_pmaplist(RPCB *); - - /* - * Set a mapping of program, version, netid -@@ -536,10 +536,6 @@ create_rmtcall_fd(struct netconfig *nconf) - rmttail->next = rmt; - rmttail = rmt; - } -- /* XXX not threadsafe */ -- if (fd > svc_maxfd) -- svc_maxfd = fd; -- FD_SET(fd, &svc_fdset); - return (fd); - } - -@@ -1056,9 +1052,6 @@ free_slot_by_index(int index) - fi = &FINFO[index]; - if (fi->flag & FINFO_ACTIVE) { - netbuffree(fi->caller_addr); -- /* XXX may be too big, but can't access xprt array here */ -- if (fi->forward_fd >= svc_maxfd) -- svc_maxfd--; - free(fi->uaddr); - fi->flag &= ~FINFO_ACTIVE; - rpcb_rmtcalls--; -@@ -1097,35 +1090,28 @@ netbuffree(struct netbuf *ap) - } - - --#define MASKVAL (POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND) --extern bool_t __svc_clean_idle(fd_set *, int, bool_t); -- - void - my_svc_run() - { -- size_t nfds; -- struct pollfd pollfds[FD_SETSIZE]; - int poll_ret, check_ret; - int n; --#ifdef SVC_RUN_DEBUG -- int i; --#endif -- register struct pollfd *p; -- fd_set cleanfds; - - for (;;) { -- p = pollfds; -- for (n = 0; n <= svc_maxfd; n++) { -- if (FD_ISSET(n, &svc_fdset)) { -- p->fd = n; -- p->events = MASKVAL; -- p++; -- } -- } -- nfds = p - pollfds; -- poll_ret = 0; -+ struct pollfd my_pollfd[svc_max_pollfd]; -+ int i; -+ -+ if (svc_max_pollfd == 0 && svc_pollfd == NULL) -+ return; - -- switch (poll_ret = poll(pollfds, nfds, 30 * 1000)) { -+ -+ for (i = 0; i < svc_max_pollfd; ++i) -+ { -+ my_pollfd[i].fd = svc_pollfd[i].fd; -+ my_pollfd[i].events = svc_pollfd[i].events; -+ my_pollfd[i].revents = 0; -+ } -+ -+ switch (poll_ret = poll(my_pollfd, svc_max_pollfd, 30 * 1000)) { - case -1: - /* - * We ignore all errors, continuing with the assumption -@@ -1133,8 +1119,6 @@ my_svc_run() - * other outside event) and not caused by poll(). - */ - case 0: -- cleanfds = svc_fdset; -- __svc_clean_idle(&cleanfds, 30, FALSE); - continue; - default: - /* -@@ -1144,10 +1128,10 @@ my_svc_run() - * don't call svc_getreq_poll. Otherwise, there - * must be another so we must call svc_getreq_poll. - */ -- if ((check_ret = check_rmtcalls(pollfds, nfds)) == -+ if ((check_ret = check_rmtcalls(my_pollfd, svc_max_pollfd)) == - poll_ret) - continue; -- svc_getreq_poll(pollfds, poll_ret-check_ret); -+ svc_getreq_poll(my_pollfd, poll_ret-check_ret); - } - } - } -@@ -1183,12 +1167,33 @@ check_rmtcalls(struct pollfd *pfds, int nfds) - return (ncallbacks_found); - } - -+/* -+ * This is really a helper function defined in libtirpc, -+ * but unfortunately, it hasn't been exported yet. -+ */ -+static struct netbuf * -+__rpc_set_netbuf(struct netbuf *nb, const void *ptr, size_t len) -+{ -+ if (nb->len != len) { -+ if (nb->len) -+ mem_free(nb->buf, nb->len); -+ nb->buf = mem_alloc(len); -+ if (nb->buf == NULL) -+ return NULL; -+ -+ nb->maxlen = nb->len = len; -+ } -+ memcpy(nb->buf, ptr, len); -+ return nb; -+} -+ - static void - xprt_set_caller(SVCXPRT *xprt, struct finfo *fi) - { -+ const struct netbuf *caller = fi->caller_addr; - u_int32_t *xidp; - -- *(svc_getrpccaller(xprt)) = *(fi->caller_addr); -+ __rpc_set_netbuf(svc_getrpccaller(xprt), caller->buf, caller->len); - xidp = __rpcb_get_dg_xidp(xprt); - *xidp = fi->caller_xid; - } -@@ -1274,10 +1279,17 @@ handle_reply(int fd, SVCXPRT *xprt) - a.rmt_localvers = fi->versnum; - - xprt_set_caller(xprt, fi); -+#if defined(SVC_XP_AUTH) -+ SVC_XP_AUTH(xprt) = svc_auth_none; -+#else - xprt->xp_auth = &svc_auth_none; -+#endif - svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a); -+#if !defined(SVC_XP_AUTH) - SVCAUTH_DESTROY(xprt->xp_auth); - xprt->xp_auth = NULL; -+#endif -+ - done: - if (buffer) - free(buffer); -diff --git a/src/rpcbind.c b/src/rpcbind.c -index 045daa1..87ccdc2 100644 ---- a/src/rpcbind.c -+++ b/src/rpcbind.c -@@ -87,6 +87,7 @@ static inline void __nss_configure_lookup(const char *db, const char *s) {} - int debugging = 0; /* Tell me what's going on */ - int doabort = 0; /* When debugging, do an abort on errors */ - int dofork = 1; /* fork? */ -+int createdsocket = 0; /* Did I create the socket or systemd did it for me? */ - - rpcblist_ptr list_rbl; /* A list of version 3/4 rpcbind services */ - -@@ -135,13 +136,13 @@ char *tcp_uaddr; /* Universal TCP address */ - static char servname[] = "rpcbind"; - static char superuser[] = "superuser"; - --int main __P((int, char *[])); -+int main(int, char *[]); - --static int init_transport __P((struct netconfig *)); --static void rbllist_add __P((rpcprog_t, rpcvers_t, struct netconfig *, -- struct netbuf *)); --static void terminate __P((int)); --static void parseargs __P((int, char *[])); -+static int init_transport(struct netconfig *); -+static void rbllist_add(rpcprog_t, rpcvers_t, struct netconfig *, -+ struct netbuf *); -+static void terminate(int); -+static void parseargs(int, char *[]); - - int - main(int argc, char *argv[]) -@@ -445,6 +446,7 @@ init_transport(struct netconfig *nconf) - memset(&sun, 0, sizeof sun); - sun.sun_family = AF_LOCAL; - unlink(_PATH_RPCBINDSOCK); -+ createdsocket = 1; /* We are now in the process of creating the unix socket */ - strcpy(sun.sun_path, _PATH_RPCBINDSOCK); - addrlen = SUN_LEN(&sun); - sa = (struct sockaddr *)&sun; -@@ -846,7 +848,8 @@ static void - terminate(int dummy /*__unused*/) - { - close(rpcbindlockfd); -- unlink(_PATH_RPCBINDSOCK); -+ if(createdsocket) -+ unlink(_PATH_RPCBINDSOCK); - unlink(RPCBINDDLOCK); - #ifdef WARMSTART - write_warmstart(); /* Dump yourself */ -diff --git a/src/security.c b/src/security.c -index 0c9453f..c54ce26 100644 ---- a/src/security.c -+++ b/src/security.c -@@ -17,6 +17,8 @@ - #include - #include - -+#include "xlog.h" -+ - /* - * XXX for special case checks in check_callit. - */ -diff --git a/src/util.c b/src/util.c -index a6c835b..74b0284 100644 ---- a/src/util.c -+++ b/src/util.c -@@ -70,7 +70,7 @@ static struct sockaddr_in *local_in4; - static struct sockaddr_in6 *local_in6; - #endif - --static int bitmaskcmp __P((void *, void *, void *, int)); -+static int bitmaskcmp(void *, void *, void *, int); - - /* - * For all bits set in "mask", compare the corresponding bits in -diff --git a/src/warmstart.c b/src/warmstart.c -index b6eb73e..122a058 100644 ---- a/src/warmstart.c -+++ b/src/warmstart.c -@@ -58,8 +58,8 @@ - #define PMAPFILE RPCBIND_STATEDIR "/portmap.xdr" - #endif - --static bool_t write_struct __P((char *, xdrproc_t, void *)); --static bool_t read_struct __P((char *, xdrproc_t, void *)); -+static bool_t write_struct(char *, xdrproc_t, void *); -+static bool_t read_struct(char *, xdrproc_t, void *); - - static bool_t - write_struct(char *filename, xdrproc_t structproc, void *list) -diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in -new file mode 100644 -index 0000000..c173b83 ---- /dev/null -+++ b/systemd/rpcbind.service.in -@@ -0,0 +1,17 @@ -+[Unit] -+Description=RPC Bind -+Documentation=man:rpcbind(8) -+DefaultDependencies=no -+ -+# Make sure we use the IP addresses listed for -+# rpcbind.socket, no matter how this unit is started. -+Wants=rpcbind.socket -+After=rpcbind.socket -+ -+[Service] -+Type=notify -+# distro can provide a drop-in adding EnvironmentFile=-/??? if needed. -+ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f -+ -+[Install] -+WantedBy=multi-user.target -diff --git a/systemd/rpcbind.socket b/systemd/rpcbind.socket -new file mode 100644 -index 0000000..3b1a936 ---- /dev/null -+++ b/systemd/rpcbind.socket -@@ -0,0 +1,18 @@ -+[Unit] -+Description=RPCbind Server Activation Socket -+DefaultDependencies=no -+Wants=rpcbind.target -+Before=rpcbind.target -+ -+[Socket] -+ListenStream=/run/rpcbind.sock -+ -+# RPC netconfig can't handle ipv6/ipv4 dual sockets -+BindIPv6Only=ipv6-only -+ListenStream=0.0.0.0:111 -+ListenDatagram=0.0.0.0:111 -+ListenStream=[::]:111 -+ListenDatagram=[::]:111 -+ -+[Install] -+WantedBy=sockets.target diff --git a/rpcbind-0.2.4-systemd-statdir.patch b/rpcbind-0.2.4-systemd-statdir.patch deleted file mode 100644 index f00b30d..0000000 --- a/rpcbind-0.2.4-systemd-statdir.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit ee569be4d6189a68b38d2af162af00ff475b48e2 -Author: Yann Leprince -Date: Wed Dec 21 14:32:54 2016 -0500 - - Fix boot dependency in systemd service file - - From: Yann Leprince - - This fix ensures that a separate /var partition will be mounted before - rpcbind tries to write its status to /var/run. - - Acked-by: NeilBrown - Signed-off-by: Yann Leprince - Signed-off-by: Steve Dickson - -diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in -index e7e86da..03a9e0b 100644 ---- a/systemd/rpcbind.service.in -+++ b/systemd/rpcbind.service.in -@@ -2,6 +2,7 @@ - Description=RPC Bind - Documentation=man:rpcbind(8) - DefaultDependencies=no -+RequiresMountsFor=@statedir@ - - # Make sure we use the IP addresses listed for - # rpcbind.socket, no matter how this unit is started. diff --git a/rpcbind-0.2.5-rc1.patch b/rpcbind-0.2.5-rc1.patch new file mode 100644 index 0000000..93ef61d --- /dev/null +++ b/rpcbind-0.2.5-rc1.patch @@ -0,0 +1,185 @@ +diff --git a/src/pmap_svc.c b/src/pmap_svc.c +index 4c744fe..e926cdc 100644 +--- a/src/pmap_svc.c ++++ b/src/pmap_svc.c +@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + long ans; + uid_t uid; + char uidbuf[32]; ++ int rc = TRUE; + + /* + * Can't use getpwnam here. We might end up calling ourselves +@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + + if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { + svcerr_decode(xprt); +- return (FALSE); ++ rc = FALSE; ++ goto done; + } + #ifdef RPCBIND_DEBUG + if (debugging) +@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + + if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) { + svcerr_weakauth(xprt); +- return (FALSE); ++ rc = (FALSE); ++ goto done; + } + + rpcbreg.r_prog = reg.pm_prog; +@@ -258,7 +261,16 @@ done_change: + rpcbs_set(RPCBVERS_2_STAT, ans); + else + rpcbs_unset(RPCBVERS_2_STAT, ans); +- return (TRUE); ++done: ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++ } ++ return (rc); + } + + /* ARGSUSED */ +@@ -272,15 +284,18 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + #ifdef RPCBIND_DEBUG + char *uaddr; + #endif ++ int rc = TRUE; + + if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { + svcerr_decode(xprt); +- return (FALSE); ++ rc = FALSE; ++ goto done; + } + + if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) { + svcerr_weakauth(xprt); +- return FALSE; ++ rc = FALSE; ++ goto done; + } + + #ifdef RPCBIND_DEBUG +@@ -330,21 +345,34 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + pmap_ipprot2netid(reg.pm_prot) ?: "", + port ? udptrans : ""); + +- return (TRUE); ++done: ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++ } ++ return (rc); + } + + /* ARGSUSED */ + static bool_t + pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + { ++ int rc = TRUE; ++ + if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) { + svcerr_decode(xprt); +- return (FALSE); ++ rc = FALSE; ++ goto done; + } + + if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) { + svcerr_weakauth(xprt); +- return FALSE; ++ rc = FALSE; ++ goto done; + } + + if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr, +@@ -354,7 +382,17 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + rpcbind_abort(); + } + } +- return (TRUE); ++ ++done: ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) { ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++ } ++ return (rc); + } + + int pmap_netid2ipprot(const char *netid) +diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c +index 709e3fb..091f530 100644 +--- a/src/rpcb_svc.c ++++ b/src/rpcb_svc.c +@@ -166,7 +166,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) + svcerr_decode(transp); + if (debugging) + (void) xlog(LOG_DEBUG, "rpcbind: could not decode"); +- return; ++ goto done; + } + + if (rqstp->rq_proc == RPCBPROC_SET +diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c +index 5094879..eebbbbe 100644 +--- a/src/rpcb_svc_4.c ++++ b/src/rpcb_svc_4.c +@@ -218,7 +218,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) + svcerr_decode(transp); + if (debugging) + (void) xlog(LOG_DEBUG, "rpcbind: could not decode\n"); +- return; ++ goto done; + } + + if (rqstp->rq_proc == RPCBPROC_SET +diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c +index 5862c26..cb63afd 100644 +--- a/src/rpcb_svc_com.c ++++ b/src/rpcb_svc_com.c +@@ -927,6 +927,14 @@ error: + if (call_msg.rm_xid != 0) + (void) free_slot_by_xid(call_msg.rm_xid); + out: ++ if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++ } + if (local_uaddr) + free(local_uaddr); + if (buf_alloc) +diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in +index e7e86da..03a9e0b 100644 +--- a/systemd/rpcbind.service.in ++++ b/systemd/rpcbind.service.in +@@ -2,6 +2,7 @@ + Description=RPC Bind + Documentation=man:rpcbind(8) + DefaultDependencies=no ++RequiresMountsFor=@statedir@ + + # Make sure we use the IP addresses listed for + # rpcbind.socket, no matter how this unit is started. diff --git a/rpcbind.spec b/rpcbind.spec index 06b0dc6..368c837 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -1,6 +1,6 @@ Name: rpcbind Version: 0.2.4 -Release: 6%{?dist} +Release: 6.rc1%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -19,7 +19,7 @@ Requires(post): chkconfig systemd Requires(preun): systemd Requires(postun): systemd coreutils -Patch001: rpcbind-0.2.4-systemd-statdir.patch +Patch001: rpcbind-0.2.5-rc1.patch Patch100: rpcbind-0.2.3-systemd-envfile.patch Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch @@ -139,6 +139,9 @@ fi %{_tmpfilesdir}/%{name}.conf %changelog +* Thu May 11 2017 Steve Dickson - 0.2.4-6.rc1 +- Fixed memory leaks (bz 1448128) + * Tue Mar 21 2017 Steve Dickson - 0.2.4-6 - Try creating statdir once when opening lock file fails (bz 1401561) From c9a08768cc89bdee0ddd3f1d3fac3a69c81d8677 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Mon, 15 May 2017 13:19:06 -0400 Subject: [PATCH 03/51] Fixed typo in memory leaks patch (bz 1448128) Signed-off-by: Steve Dickson --- rpcbind-0.2.5-rc1.patch | 2 +- rpcbind.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rpcbind-0.2.5-rc1.patch b/rpcbind-0.2.5-rc1.patch index 93ef61d..6dbfff3 100644 --- a/rpcbind-0.2.5-rc1.patch +++ b/rpcbind-0.2.5-rc1.patch @@ -114,7 +114,7 @@ index 4c744fe..e926cdc 100644 - return (TRUE); + +done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) { ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) { + if (debugging) { + (void) xlog(LOG_DEBUG, "unable to free arguments\n"); + if (doabort) { diff --git a/rpcbind.spec b/rpcbind.spec index 368c837..04e5ea2 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -1,6 +1,6 @@ Name: rpcbind Version: 0.2.4 -Release: 6.rc1%{?dist} +Release: 7.rc1%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -139,6 +139,9 @@ fi %{_tmpfilesdir}/%{name}.conf %changelog +* Mon May 15 2017 Steve Dickson - 0.2.4-7.rc1 +- Fixed typo in memory leaks patch (bz 1448128) + * Thu May 11 2017 Steve Dickson - 0.2.4-6.rc1 - Fixed memory leaks (bz 1448128) From 5604d31c50110ef08c651b943bd3b882e4ac5a3b Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 30 May 2017 12:06:58 -0400 Subject: [PATCH 04/51] Updated to latest upstream RC release: rpcbind-0_2_5-rc2 (bz 1450765) Signed-off-by: Steve Dickson --- rpcbind-0.2.5-rc2.patch | 310 ++++++++++++++++++++++++++++++++++++++++ rpcbind.spec | 7 +- 2 files changed, 315 insertions(+), 2 deletions(-) create mode 100644 rpcbind-0.2.5-rc2.patch diff --git a/rpcbind-0.2.5-rc2.patch b/rpcbind-0.2.5-rc2.patch new file mode 100644 index 0000000..bf89442 --- /dev/null +++ b/rpcbind-0.2.5-rc2.patch @@ -0,0 +1,310 @@ +diff --git a/src/pmap_svc.c b/src/pmap_svc.c +index 4c744fe..a53dd5f 100644 +--- a/src/pmap_svc.c ++++ b/src/pmap_svc.c +@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + long ans; + uid_t uid; + char uidbuf[32]; ++ int rc = TRUE; + + /* + * Can't use getpwnam here. We might end up calling ourselves +@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + + if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { + svcerr_decode(xprt); +- return (FALSE); ++ rc = FALSE; ++ goto done; + } + #ifdef RPCBIND_DEBUG + if (debugging) +@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + + if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) { + svcerr_weakauth(xprt); +- return (FALSE); ++ rc = (FALSE); ++ goto done; + } + + rpcbreg.r_prog = reg.pm_prog; +@@ -258,7 +261,18 @@ done_change: + rpcbs_set(RPCBVERS_2_STAT, ans); + else + rpcbs_unset(RPCBVERS_2_STAT, ans); +- return (TRUE); ++done: ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { ++#ifdef RPCBIND_DEBUG ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++#endif ++ } ++ return (rc); + } + + /* ARGSUSED */ +@@ -272,15 +286,18 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + #ifdef RPCBIND_DEBUG + char *uaddr; + #endif ++ int rc = TRUE; + + if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { + svcerr_decode(xprt); +- return (FALSE); ++ rc = FALSE; ++ goto done; + } + + if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) { + svcerr_weakauth(xprt); +- return FALSE; ++ rc = FALSE; ++ goto done; + } + + #ifdef RPCBIND_DEBUG +@@ -330,21 +347,36 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + pmap_ipprot2netid(reg.pm_prot) ?: "", + port ? udptrans : ""); + +- return (TRUE); ++done: ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { ++#ifdef RPCBIND_DEBUG ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++#endif ++ } ++ return (rc); + } + + /* ARGSUSED */ + static bool_t + pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + { ++ int rc = TRUE; ++ + if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) { + svcerr_decode(xprt); +- return (FALSE); ++ rc = FALSE; ++ goto done; + } + + if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) { + svcerr_weakauth(xprt); +- return FALSE; ++ rc = FALSE; ++ goto done; + } + + if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr, +@@ -354,7 +386,19 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + rpcbind_abort(); + } + } +- return (TRUE); ++ ++done: ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) { ++#ifdef RPCBIND_DEBUG ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++#endif ++ } ++ return (rc); + } + + int pmap_netid2ipprot(const char *netid) +diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c +index 709e3fb..091f530 100644 +--- a/src/rpcb_svc.c ++++ b/src/rpcb_svc.c +@@ -166,7 +166,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) + svcerr_decode(transp); + if (debugging) + (void) xlog(LOG_DEBUG, "rpcbind: could not decode"); +- return; ++ goto done; + } + + if (rqstp->rq_proc == RPCBPROC_SET +diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c +index 5094879..eebbbbe 100644 +--- a/src/rpcb_svc_4.c ++++ b/src/rpcb_svc_4.c +@@ -218,7 +218,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) + svcerr_decode(transp); + if (debugging) + (void) xlog(LOG_DEBUG, "rpcbind: could not decode\n"); +- return; ++ goto done; + } + + if (rqstp->rq_proc == RPCBPROC_SET +diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c +index 5862c26..d36b090 100644 +--- a/src/rpcb_svc_com.c ++++ b/src/rpcb_svc_com.c +@@ -612,9 +612,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, + struct netconfig *nconf; + struct netbuf *caller; + struct r_rmtcall_args a; +- char *buf_alloc = NULL, *outbufp; +- char *outbuf_alloc = NULL; +- char buf[RPC_BUF_MAX], outbuf[RPC_BUF_MAX]; ++ char outbuf[RPC_BUF_MAX]; + struct netbuf *na = (struct netbuf *) NULL; + struct rpc_msg call_msg; + int outlen; +@@ -635,36 +633,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, + } + if (si.si_socktype != SOCK_DGRAM) + return; /* Only datagram type accepted */ +- sendsz = __rpc_get_t_size(si.si_af, si.si_proto, UDPMSGSIZE); +- if (sendsz == 0) { /* data transfer not supported */ +- if (reply_type == RPCBPROC_INDIRECT) +- svcerr_systemerr(transp); +- return; +- } +- /* +- * Should be multiple of 4 for XDR. +- */ +- sendsz = ((sendsz + 3) / 4) * 4; +- if (sendsz > RPC_BUF_MAX) { +-#ifdef notyet +- buf_alloc = alloca(sendsz); /* not in IDR2? */ +-#else +- buf_alloc = malloc(sendsz); +-#endif /* notyet */ +- if (buf_alloc == NULL) { +- if (debugging) +- xlog(LOG_DEBUG, +- "rpcbproc_callit_com: No Memory!\n"); +- if (reply_type == RPCBPROC_INDIRECT) +- svcerr_systemerr(transp); +- return; +- } +- a.rmt_args.args = buf_alloc; +- } else { +- a.rmt_args.args = buf; +- } ++ sendsz = UDPMSGSIZE; + + call_msg.rm_xid = 0; /* For error checking purposes */ ++ memset(&a, 0, sizeof(a)); /* Zero out the input buffer */ + if (!svc_getargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { + if (reply_type == RPCBPROC_INDIRECT) + svcerr_decode(transp); +@@ -700,11 +672,11 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, + + rpcbs_rmtcall(versnum - 2, reply_type, a.rmt_prog, a.rmt_vers, + a.rmt_proc, transp->xp_netid, rbl); +- + if (rbl == (rpcblist_ptr)NULL) { + #ifdef RPCBIND_DEBUG + if (debugging) +- xlog(LOG_DEBUG, "not found\n"); ++ xlog(LOG_DEBUG, "prog %lu vers %lu: not found\n", ++ a.rmt_prog, a.rmt_vers); + #endif + if (reply_type == RPCBPROC_INDIRECT) + svcerr_noprog(transp); +@@ -818,24 +790,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, + call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; + call_msg.rm_call.cb_prog = a.rmt_prog; + call_msg.rm_call.cb_vers = a.rmt_vers; +- if (sendsz > RPC_BUF_MAX) { +-#ifdef notyet +- outbuf_alloc = alloca(sendsz); /* not in IDR2? */ +-#else +- outbuf_alloc = malloc(sendsz); +-#endif /* notyet */ +- if (outbuf_alloc == NULL) { +- if (reply_type == RPCBPROC_INDIRECT) +- svcerr_systemerr(transp); +- if (debugging) +- xlog(LOG_DEBUG, +- "rpcbproc_callit_com: No memory!\n"); +- goto error; +- } +- xdrmem_create(&outxdr, outbuf_alloc, sendsz, XDR_ENCODE); +- } else { +- xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE); +- } ++ ++ memset(outbuf, '\0', sendsz); /* Zero out the output buffer */ ++ xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE); ++ + if (!xdr_callhdr(&outxdr, &call_msg)) { + if (reply_type == RPCBPROC_INDIRECT) + svcerr_systemerr(transp); +@@ -900,10 +858,6 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, + goto error; + } + outlen = (int) XDR_GETPOS(&outxdr); +- if (outbuf_alloc) +- outbufp = outbuf_alloc; +- else +- outbufp = outbuf; + + na = uaddr2taddr(nconf, local_uaddr); + if (!na) { +@@ -912,7 +866,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, + goto error; + } + +- if (sendto(fd, outbufp, outlen, 0, (struct sockaddr *)na->buf, na->len) ++ if (sendto(fd, outbuf, outlen, 0, (struct sockaddr *)na->buf, na->len) + != outlen) { + if (debugging) + xlog(LOG_DEBUG, +@@ -927,12 +881,16 @@ error: + if (call_msg.rm_xid != 0) + (void) free_slot_by_xid(call_msg.rm_xid); + out: ++ if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++ } + if (local_uaddr) + free(local_uaddr); +- if (buf_alloc) +- free(buf_alloc); +- if (outbuf_alloc) +- free(outbuf_alloc); + if (na) { + free(na->buf); + free(na); +diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in +index e7e86da..03a9e0b 100644 +--- a/systemd/rpcbind.service.in ++++ b/systemd/rpcbind.service.in +@@ -2,6 +2,7 @@ + Description=RPC Bind + Documentation=man:rpcbind(8) + DefaultDependencies=no ++RequiresMountsFor=@statedir@ + + # Make sure we use the IP addresses listed for + # rpcbind.socket, no matter how this unit is started. diff --git a/rpcbind.spec b/rpcbind.spec index 04e5ea2..483ebdd 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -1,6 +1,6 @@ Name: rpcbind Version: 0.2.4 -Release: 7.rc1%{?dist} +Release: 7.rc2%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -19,7 +19,7 @@ Requires(post): chkconfig systemd Requires(preun): systemd Requires(postun): systemd coreutils -Patch001: rpcbind-0.2.5-rc1.patch +Patch001: rpcbind-0.2.5-rc2.patch Patch100: rpcbind-0.2.3-systemd-envfile.patch Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch @@ -139,6 +139,9 @@ fi %{_tmpfilesdir}/%{name}.conf %changelog +* Tue May 30 2017 Steve Dickson - 0.2.4-7.rc2 +- Updated to latest upstream RC release: rpcbind-0_2_5-rc2 (bz 1450765) + * Mon May 15 2017 Steve Dickson - 0.2.4-7.rc1 - Fixed typo in memory leaks patch (bz 1448128) From 267c9f7b410f2c7a237e8578907bec6b117b3212 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 13:15:43 +0000 Subject: [PATCH 05/51] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 483ebdd..0edcd01 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -1,6 +1,6 @@ Name: rpcbind Version: 0.2.4 -Release: 7.rc2%{?dist} +Release: 7.rc2%{?dist}.1 Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -139,6 +139,9 @@ fi %{_tmpfilesdir}/%{name}.conf %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 0.2.4-7.rc2.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Tue May 30 2017 Steve Dickson - 0.2.4-7.rc2 - Updated to latest upstream RC release: rpcbind-0_2_5-rc2 (bz 1450765) From edd698f759675cc89855a9043f44960337d59192 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 07:47:08 +0000 Subject: [PATCH 06/51] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 0edcd01..e7ce492 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -1,6 +1,6 @@ Name: rpcbind Version: 0.2.4 -Release: 7.rc2%{?dist}.1 +Release: 7.rc2%{?dist}.2 Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -139,6 +139,9 @@ fi %{_tmpfilesdir}/%{name}.conf %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 0.2.4-7.rc2.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 0.2.4-7.rc2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 714e2e90f5e4f98a65541604689c846aed26fa2f Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Wed, 6 Sep 2017 11:14:03 -0400 Subject: [PATCH 07/51] rpcbind: Create and formally own the state directory So the directory is available from the time of first installation until reboot Signed-off-by: Steve Dickson --- rpcbind.spec | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/rpcbind.spec b/rpcbind.spec index e7ce492..688bc90 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -1,6 +1,10 @@ +# These are macros to be usable outside of the build section +%global rpcbind_user_group rpc +%global rpcbind_state_dir %{_rundir}/rpcbind + Name: rpcbind Version: 0.2.4 -Release: 7.rc2%{?dist}.2 +Release: 8.rc2%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -54,15 +58,13 @@ PIE="-fpie" %endif export PIE -RPCBUSR=rpc -RPCBDIR=/run/rpcbind CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`" autoreconf -fisv %configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \ --enable-warmstarts \ - --with-statedir="$RPCBDIR" \ - --with-rpcuser="$RPCBUSR" \ + --with-statedir="%rpcbind_state_dir" \ + --with-rpcuser="%rpcbind_user_group" \ --with-nss-modules="files altfiles" \ --enable-libwrap \ --enable-debug @@ -75,6 +77,7 @@ mkdir -p %{buildroot}{%{_sbindir},%{_bindir},/etc/sysconfig} mkdir -p %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_tmpfilesdir} mkdir -p %{buildroot}%{_mandir}/man8 +mkdir -p %{buildroot}%{rpcbind_state_dir} make DESTDIR=$RPM_BUILD_ROOT install install -m644 %{SOURCE1} %{buildroot}/etc/sysconfig/rpcbind @@ -137,8 +140,13 @@ fi %{_unitdir}/%{name}.service %{_unitdir}/%{name}.socket %{_tmpfilesdir}/%{name}.conf +%attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Wed Sep 06 2017 Nils Philippsen - 0.2.4-8.rc2 +- create and formally own the state directory so it is available from the time + of first installation until reboot + * Thu Aug 03 2017 Fedora Release Engineering - 0.2.4-7.rc2.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 9ac2b925ab67546f807f5b3bc0abe6243f7397c6 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Sat, 16 Dec 2017 16:06:41 -0500 Subject: [PATCH 08/51] Updated to latest upstream RC release: rpcbind-0_2_5-rc3 (bz 1431574) Signed-off-by: Steve Dickson --- rpcbind-0.2.3-systemd-envfile.patch | 13 +- rpcbind-0.2.3-systemd-tmpfiles.patch | 55 ++-- rpcbind-0.2.4-runstatdir.patch | 16 +- rpcbind-0.2.4-systemd-service.patch | 15 +- rpcbind-0.2.5-rc3.patch | 362 +++++++++++++++++++++++++++ rpcbind.spec | 8 +- 6 files changed, 408 insertions(+), 61 deletions(-) create mode 100644 rpcbind-0.2.5-rc3.patch diff --git a/rpcbind-0.2.3-systemd-envfile.patch b/rpcbind-0.2.3-systemd-envfile.patch index 18382c4..2bfc248 100644 --- a/rpcbind-0.2.3-systemd-envfile.patch +++ b/rpcbind-0.2.3-systemd-envfile.patch @@ -1,12 +1,11 @@ -diff -up rpcbind-0.2.3/systemd/rpcbind.service.in.orig rpcbind-0.2.3/systemd/rpcbind.service.in ---- rpcbind-0.2.3/systemd/rpcbind.service.in.orig 2016-11-07 14:45:17.440658739 -0500 -+++ rpcbind-0.2.3/systemd/rpcbind.service.in 2016-11-07 14:46:50.968844715 -0500 -@@ -10,7 +10,7 @@ After=rpcbind.socket - +diff -up rpcbind-0.2.4/systemd/rpcbind.service.in.orig rpcbind-0.2.4/systemd/rpcbind.service.in +--- rpcbind-0.2.4/systemd/rpcbind.service.in.orig 2017-12-16 15:49:07.830889473 -0500 ++++ rpcbind-0.2.4/systemd/rpcbind.service.in 2017-12-16 15:49:43.156610673 -0500 +@@ -12,6 +12,7 @@ Wants=rpcbind.target [Service] Type=notify --# distro can provide a drop-in adding EnvironmentFile=-/??? if needed. + # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. +EnvironmentFile=/etc/sysconfig/rpcbind - ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f + ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f [Install] diff --git a/rpcbind-0.2.3-systemd-tmpfiles.patch b/rpcbind-0.2.3-systemd-tmpfiles.patch index e916680..2f02651 100644 --- a/rpcbind-0.2.3-systemd-tmpfiles.patch +++ b/rpcbind-0.2.3-systemd-tmpfiles.patch @@ -1,34 +1,6 @@ -commit b47e0f12cfa005bb120e018257410663efbd7254 -Author: Steve Dickson -Date: Tue Nov 15 13:32:40 2016 -0500 - - Use systemd-tmpfiles to create the warmstart directory - - When systemd is available have it create the /run/rpcbind - warmstart directory. Note, the new rpcbind.conf file - expects 'rpc' user and group since that those will be - the id/gid that will own the directory. - - Signed-off-by: Steve Dickson - -diff --git a/Makefile.am b/Makefile.am -index 43c2710..d7ca426 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -54,6 +54,9 @@ rpcbind_LDADD += $(SYSTEMD_LIBS) - systemdsystemunit_DATA = \ - systemd/rpcbind.service \ - systemd/rpcbind.socket -+ -+systemdtmpfiles_DATA = \ -+ systemd/rpcbind.conf - endif - - rpcinfo_SOURCES = src/rpcinfo.c -diff --git a/configure.ac b/configure.ac -index acc6914..81adafc 100644 ---- a/configure.ac -+++ b/configure.ac +diff -up rpcbind-0.2.4/configure.ac.orig rpcbind-0.2.4/configure.ac +--- rpcbind-0.2.4/configure.ac.orig 2017-12-16 15:52:22.774298138 -0500 ++++ rpcbind-0.2.4/configure.ac 2017-12-16 15:52:45.301075188 -0500 @@ -52,6 +52,17 @@ AC_ARG_WITH([systemdsystemunitdir], fi AM_CONDITIONAL(SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) @@ -47,11 +19,22 @@ index acc6914..81adafc 100644 AS_IF([test x$enable_libwrap = xyes], [ AC_CHECK_LIB([wrap], [hosts_access], , AC_MSG_ERROR([libwrap support requested but unable to find libwrap])) -diff --git a/systemd/rpcbind.conf b/systemd/rpcbind.conf -new file mode 100644 -index 0000000..2f8af45 ---- /dev/null -+++ b/systemd/rpcbind.conf +diff -up rpcbind-0.2.4/Makefile.am.orig rpcbind-0.2.4/Makefile.am +--- rpcbind-0.2.4/Makefile.am.orig 2017-12-16 15:52:22.774298138 -0500 ++++ rpcbind-0.2.4/Makefile.am 2017-12-16 15:52:45.301075188 -0500 +@@ -55,6 +55,9 @@ rpcbind_LDADD += $(SYSTEMD_LIBS) + systemdsystemunit_DATA = \ + systemd/rpcbind.service \ + systemd/rpcbind.socket ++ ++systemdtmpfiles_DATA = \ ++ systemd/rpcbind.conf + endif + + rpcinfo_SOURCES = src/rpcinfo.c +diff -up rpcbind-0.2.4/systemd/rpcbind.conf.orig rpcbind-0.2.4/systemd/rpcbind.conf +--- rpcbind-0.2.4/systemd/rpcbind.conf.orig 2017-12-16 15:52:45.301075188 -0500 ++++ rpcbind-0.2.4/systemd/rpcbind.conf 2017-12-16 15:52:45.301075188 -0500 @@ -0,0 +1,2 @@ +#Type Path Mode UID GID Age Argument +D /run/rpcbind 0700 rpc rpc - - diff --git a/rpcbind-0.2.4-runstatdir.patch b/rpcbind-0.2.4-runstatdir.patch index 53abb23..3f192bc 100644 --- a/rpcbind-0.2.4-runstatdir.patch +++ b/rpcbind-0.2.4-runstatdir.patch @@ -1,6 +1,6 @@ diff -up rpcbind-0.2.4/configure.ac.orig rpcbind-0.2.4/configure.ac ---- rpcbind-0.2.4/configure.ac.orig 2017-01-03 13:51:48.426758826 -0500 -+++ rpcbind-0.2.4/configure.ac 2017-01-16 11:19:12.888958858 -0500 +--- rpcbind-0.2.4/configure.ac.orig 2017-12-16 15:53:47.253462041 -0500 ++++ rpcbind-0.2.4/configure.ac 2017-12-16 15:54:01.089325106 -0500 @@ -22,8 +22,8 @@ AC_ARG_ENABLE([warmstarts], AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes) @@ -13,9 +13,9 @@ diff -up rpcbind-0.2.4/configure.ac.orig rpcbind-0.2.4/configure.ac AC_ARG_WITH([rpcuser], diff -up rpcbind-0.2.4/configure.orig rpcbind-0.2.4/configure ---- rpcbind-0.2.4/configure.orig 2017-01-03 13:51:50.222749413 -0500 -+++ rpcbind-0.2.4/configure 2017-01-16 11:20:29.650978018 -0500 -@@ -1389,7 +1389,7 @@ Optional Features: +--- rpcbind-0.2.4/configure.orig 2016-11-30 09:03:59.000000000 -0500 ++++ rpcbind-0.2.4/configure 2017-12-16 15:54:01.091325086 -0500 +@@ -1387,7 +1387,7 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) @@ -24,7 +24,7 @@ diff -up rpcbind-0.2.4/configure.orig rpcbind-0.2.4/configure --with-rpcuser=ARG use ARG for RPC [default=root] -@@ -3887,7 +3887,7 @@ fi +@@ -3883,7 +3883,7 @@ fi if test "${with_statedir+set}" = set; then : withval=$with_statedir; else @@ -35,7 +35,7 @@ diff -up rpcbind-0.2.4/configure.orig rpcbind-0.2.4/configure statedir=$with_statedir diff -up rpcbind-0.2.4/man/rpcbind-fr.8.orig rpcbind-0.2.4/man/rpcbind-fr.8 --- rpcbind-0.2.4/man/rpcbind-fr.8.orig 2016-11-28 15:47:28.000000000 -0500 -+++ rpcbind-0.2.4/man/rpcbind-fr.8 2017-01-16 11:19:12.888958858 -0500 ++++ rpcbind-0.2.4/man/rpcbind-fr.8 2017-12-16 15:54:01.091325086 -0500 @@ -138,8 +138,8 @@ est redémarré. .Xr rpcbind 3 , .Xr rpcinfo 8 @@ -49,7 +49,7 @@ diff -up rpcbind-0.2.4/man/rpcbind-fr.8.orig rpcbind-0.2.4/man/rpcbind-fr.8 .El diff -up rpcbind-0.2.4/src/rpcbind.c.orig rpcbind-0.2.4/src/rpcbind.c --- rpcbind-0.2.4/src/rpcbind.c.orig 2016-11-28 15:47:28.000000000 -0500 -+++ rpcbind-0.2.4/src/rpcbind.c 2017-01-16 11:20:16.499974736 -0500 ++++ rpcbind-0.2.4/src/rpcbind.c 2017-12-16 15:54:01.092325076 -0500 @@ -106,7 +106,7 @@ char *nss_modules = "files"; /* who to suid to if -s is given */ #define RUN_AS "daemon" diff --git a/rpcbind-0.2.4-systemd-service.patch b/rpcbind-0.2.4-systemd-service.patch index 4e5c20f..0350020 100644 --- a/rpcbind-0.2.4-systemd-service.patch +++ b/rpcbind-0.2.4-systemd-service.patch @@ -1,14 +1,13 @@ diff -up rpcbind-0.2.4/systemd/rpcbind.service.in.orig rpcbind-0.2.4/systemd/rpcbind.service.in ---- rpcbind-0.2.4/systemd/rpcbind.service.in.orig 2017-01-28 11:47:59.505282030 -0500 -+++ rpcbind-0.2.4/systemd/rpcbind.service.in 2017-01-28 13:13:43.763324301 -0500 -@@ -6,8 +6,8 @@ RequiresMountsFor=@statedir@ - +--- rpcbind-0.2.4/systemd/rpcbind.service.in.orig 2017-12-16 15:46:12.896270101 -0500 ++++ rpcbind-0.2.4/systemd/rpcbind.service.in 2017-12-16 15:46:43.672027210 -0500 +@@ -7,7 +7,8 @@ RequiresMountsFor=@statedir@ # Make sure we use the IP addresses listed for # rpcbind.socket, no matter how this unit is started. --Wants=rpcbind.socket --After=rpcbind.socket -+Wants=rpcbind.socket systemd-tmpfiles-setup.service -+After=rpcbind.socket systemd-tmpfiles-setup.service + Requires=rpcbind.socket +-Wants=rpcbind.target ++Wants=rpcbind.target systemd-tmpfiles-setup.service ++After=systemd-tmpfiles-setup.service [Service] Type=notify diff --git a/rpcbind-0.2.5-rc3.patch b/rpcbind-0.2.5-rc3.patch new file mode 100644 index 0000000..e02ed95 --- /dev/null +++ b/rpcbind-0.2.5-rc3.patch @@ -0,0 +1,362 @@ +diff --git a/Makefile.am b/Makefile.am +index 43c2710..c160a95 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -29,7 +29,8 @@ if LIBWRAP + AM_CPPFLAGS += -DLIBWRAP + endif + +-bin_PROGRAMS = rpcbind rpcinfo ++bin_PROGRAMS = rpcinfo ++sbin_PROGRAMS = rpcbind + + rpcbind_SOURCES = \ + src/check_bound.c \ +diff --git a/configure.ac b/configure.ac +index 3790310..359a418 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -61,9 +61,9 @@ AC_SEARCH_LIBS([pthread_create], [pthread]) + + AC_CHECK_HEADERS([nss.h rpcsvc/mount.h]) + +-# make bindir available for substitution in config file ++# make sbindir available for substitution in config file + # 2 "evals" needed to expand variable names +-AC_SUBST([_bindir]) +-AC_CONFIG_COMMANDS_PRE([eval eval _bindir=$bindir]) ++AC_SUBST([_sbindir]) ++AC_CONFIG_COMMANDS_PRE([eval eval _sbindir=$sbindir]) + + AC_OUTPUT([Makefile systemd/rpcbind.service]) +diff --git a/src/pmap_svc.c b/src/pmap_svc.c +index 4c744fe..a53dd5f 100644 +--- a/src/pmap_svc.c ++++ b/src/pmap_svc.c +@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + long ans; + uid_t uid; + char uidbuf[32]; ++ int rc = TRUE; + + /* + * Can't use getpwnam here. We might end up calling ourselves +@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + + if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { + svcerr_decode(xprt); +- return (FALSE); ++ rc = FALSE; ++ goto done; + } + #ifdef RPCBIND_DEBUG + if (debugging) +@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + + if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) { + svcerr_weakauth(xprt); +- return (FALSE); ++ rc = (FALSE); ++ goto done; + } + + rpcbreg.r_prog = reg.pm_prog; +@@ -258,7 +261,18 @@ done_change: + rpcbs_set(RPCBVERS_2_STAT, ans); + else + rpcbs_unset(RPCBVERS_2_STAT, ans); +- return (TRUE); ++done: ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { ++#ifdef RPCBIND_DEBUG ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++#endif ++ } ++ return (rc); + } + + /* ARGSUSED */ +@@ -272,15 +286,18 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + #ifdef RPCBIND_DEBUG + char *uaddr; + #endif ++ int rc = TRUE; + + if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { + svcerr_decode(xprt); +- return (FALSE); ++ rc = FALSE; ++ goto done; + } + + if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) { + svcerr_weakauth(xprt); +- return FALSE; ++ rc = FALSE; ++ goto done; + } + + #ifdef RPCBIND_DEBUG +@@ -330,21 +347,36 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + pmap_ipprot2netid(reg.pm_prot) ?: "", + port ? udptrans : ""); + +- return (TRUE); ++done: ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { ++#ifdef RPCBIND_DEBUG ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++#endif ++ } ++ return (rc); + } + + /* ARGSUSED */ + static bool_t + pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + { ++ int rc = TRUE; ++ + if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) { + svcerr_decode(xprt); +- return (FALSE); ++ rc = FALSE; ++ goto done; + } + + if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) { + svcerr_weakauth(xprt); +- return FALSE; ++ rc = FALSE; ++ goto done; + } + + if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr, +@@ -354,7 +386,19 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + rpcbind_abort(); + } + } +- return (TRUE); ++ ++done: ++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) { ++#ifdef RPCBIND_DEBUG ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++#endif ++ } ++ return (rc); + } + + int pmap_netid2ipprot(const char *netid) +diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c +index 709e3fb..091f530 100644 +--- a/src/rpcb_svc.c ++++ b/src/rpcb_svc.c +@@ -166,7 +166,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) + svcerr_decode(transp); + if (debugging) + (void) xlog(LOG_DEBUG, "rpcbind: could not decode"); +- return; ++ goto done; + } + + if (rqstp->rq_proc == RPCBPROC_SET +diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c +index 5094879..eebbbbe 100644 +--- a/src/rpcb_svc_4.c ++++ b/src/rpcb_svc_4.c +@@ -218,7 +218,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) + svcerr_decode(transp); + if (debugging) + (void) xlog(LOG_DEBUG, "rpcbind: could not decode\n"); +- return; ++ goto done; + } + + if (rqstp->rq_proc == RPCBPROC_SET +diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c +index 5862c26..9c1c3af 100644 +--- a/src/rpcb_svc_com.c ++++ b/src/rpcb_svc_com.c +@@ -612,9 +612,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, + struct netconfig *nconf; + struct netbuf *caller; + struct r_rmtcall_args a; +- char *buf_alloc = NULL, *outbufp; +- char *outbuf_alloc = NULL; +- char buf[RPC_BUF_MAX], outbuf[RPC_BUF_MAX]; ++ char outbuf[RPC_BUF_MAX]; + struct netbuf *na = (struct netbuf *) NULL; + struct rpc_msg call_msg; + int outlen; +@@ -635,36 +633,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, + } + if (si.si_socktype != SOCK_DGRAM) + return; /* Only datagram type accepted */ +- sendsz = __rpc_get_t_size(si.si_af, si.si_proto, UDPMSGSIZE); +- if (sendsz == 0) { /* data transfer not supported */ +- if (reply_type == RPCBPROC_INDIRECT) +- svcerr_systemerr(transp); +- return; +- } +- /* +- * Should be multiple of 4 for XDR. +- */ +- sendsz = ((sendsz + 3) / 4) * 4; +- if (sendsz > RPC_BUF_MAX) { +-#ifdef notyet +- buf_alloc = alloca(sendsz); /* not in IDR2? */ +-#else +- buf_alloc = malloc(sendsz); +-#endif /* notyet */ +- if (buf_alloc == NULL) { +- if (debugging) +- xlog(LOG_DEBUG, +- "rpcbproc_callit_com: No Memory!\n"); +- if (reply_type == RPCBPROC_INDIRECT) +- svcerr_systemerr(transp); +- return; +- } +- a.rmt_args.args = buf_alloc; +- } else { +- a.rmt_args.args = buf; +- } ++ sendsz = UDPMSGSIZE; + + call_msg.rm_xid = 0; /* For error checking purposes */ ++ memset(&a, 0, sizeof(a)); /* Zero out the input buffer */ + if (!svc_getargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { + if (reply_type == RPCBPROC_INDIRECT) + svcerr_decode(transp); +@@ -700,11 +672,11 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, + + rpcbs_rmtcall(versnum - 2, reply_type, a.rmt_prog, a.rmt_vers, + a.rmt_proc, transp->xp_netid, rbl); +- + if (rbl == (rpcblist_ptr)NULL) { + #ifdef RPCBIND_DEBUG + if (debugging) +- xlog(LOG_DEBUG, "not found\n"); ++ xlog(LOG_DEBUG, "prog %lu vers %lu: not found\n", ++ a.rmt_prog, a.rmt_vers); + #endif + if (reply_type == RPCBPROC_INDIRECT) + svcerr_noprog(transp); +@@ -818,24 +790,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, + call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; + call_msg.rm_call.cb_prog = a.rmt_prog; + call_msg.rm_call.cb_vers = a.rmt_vers; +- if (sendsz > RPC_BUF_MAX) { +-#ifdef notyet +- outbuf_alloc = alloca(sendsz); /* not in IDR2? */ +-#else +- outbuf_alloc = malloc(sendsz); +-#endif /* notyet */ +- if (outbuf_alloc == NULL) { +- if (reply_type == RPCBPROC_INDIRECT) +- svcerr_systemerr(transp); +- if (debugging) +- xlog(LOG_DEBUG, +- "rpcbproc_callit_com: No memory!\n"); +- goto error; +- } +- xdrmem_create(&outxdr, outbuf_alloc, sendsz, XDR_ENCODE); +- } else { +- xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE); +- } ++ ++ memset(outbuf, '\0', sendsz); /* Zero out the output buffer */ ++ xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE); ++ + if (!xdr_callhdr(&outxdr, &call_msg)) { + if (reply_type == RPCBPROC_INDIRECT) + svcerr_systemerr(transp); +@@ -900,10 +858,6 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, + goto error; + } + outlen = (int) XDR_GETPOS(&outxdr); +- if (outbuf_alloc) +- outbufp = outbuf_alloc; +- else +- outbufp = outbuf; + + na = uaddr2taddr(nconf, local_uaddr); + if (!na) { +@@ -912,7 +866,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, + goto error; + } + +- if (sendto(fd, outbufp, outlen, 0, (struct sockaddr *)na->buf, na->len) ++ if (sendto(fd, outbuf, outlen, 0, (struct sockaddr *)na->buf, na->len) + != outlen) { + if (debugging) + xlog(LOG_DEBUG, +@@ -927,12 +881,16 @@ error: + if (call_msg.rm_xid != 0) + (void) free_slot_by_xid(call_msg.rm_xid); + out: ++ if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { ++ if (debugging) { ++ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); ++ if (doabort) { ++ rpcbind_abort(); ++ } ++ } ++ } + if (local_uaddr) + free(local_uaddr); +- if (buf_alloc) +- free(buf_alloc); +- if (outbuf_alloc) +- free(outbuf_alloc); + if (na) { + free(na->buf); + free(na); +@@ -1094,7 +1052,6 @@ void + my_svc_run() + { + int poll_ret, check_ret; +- int n; + + for (;;) { + struct pollfd my_pollfd[svc_max_pollfd]; +diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in +index e7e86da..7b1c74b 100644 +--- a/systemd/rpcbind.service.in ++++ b/systemd/rpcbind.service.in +@@ -2,16 +2,17 @@ + Description=RPC Bind + Documentation=man:rpcbind(8) + DefaultDependencies=no ++RequiresMountsFor=@statedir@ + + # Make sure we use the IP addresses listed for + # rpcbind.socket, no matter how this unit is started. +-Wants=rpcbind.socket +-After=rpcbind.socket ++Requires=rpcbind.socket ++Wants=rpcbind.target + + [Service] + Type=notify + # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. +-ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f ++ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f + + [Install] + WantedBy=multi-user.target diff --git a/rpcbind.spec b/rpcbind.spec index 688bc90..d13b685 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 0.2.4 -Release: 8.rc2%{?dist} +Release: 8.rc3%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -23,7 +23,7 @@ Requires(post): chkconfig systemd Requires(preun): systemd Requires(postun): systemd coreutils -Patch001: rpcbind-0.2.5-rc2.patch +Patch001: rpcbind-0.2.5-rc3.patch Patch100: rpcbind-0.2.3-systemd-envfile.patch Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch @@ -66,6 +66,7 @@ autoreconf -fisv --with-statedir="%rpcbind_state_dir" \ --with-rpcuser="%rpcbind_user_group" \ --with-nss-modules="files altfiles" \ + --sbindir=%{_bindir} \ --enable-libwrap \ --enable-debug @@ -143,6 +144,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Sat Dec 16 2017 Steve Dickson - 0.2.4-8.rc3 +- Updated to latest upstream RC release: rpcbind-0_2_5-rc3 (bz 1431574) + * Wed Sep 06 2017 Nils Philippsen - 0.2.4-8.rc2 - create and formally own the state directory so it is available from the time of first installation until reboot From cc0a6f2bda27b93fb884a0f55185a5f6d8259f83 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Mon, 18 Dec 2017 11:55:57 -0500 Subject: [PATCH 09/51] Removed tcp_wrappers dependency (bz 1518780) Signed-off-by: Steve Dickson --- rpcbind.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rpcbind.spec b/rpcbind.spec index d13b685..9ec7425 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 0.2.4 -Release: 8.rc3%{?dist} +Release: 9.rc3%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -17,7 +17,7 @@ Source1: %{name}.sysconfig Requires: glibc-common setup Conflicts: man-pages < 2.43-12 BuildRequires: automake, autoconf, libtool, systemd, systemd-devel -BuildRequires: libtirpc-devel, quota-devel, tcp_wrappers-devel +BuildRequires: libtirpc-devel, quota-devel Requires(pre): coreutils shadow-utils Requires(post): chkconfig systemd Requires(preun): systemd @@ -67,7 +67,6 @@ autoreconf -fisv --with-rpcuser="%rpcbind_user_group" \ --with-nss-modules="files altfiles" \ --sbindir=%{_bindir} \ - --enable-libwrap \ --enable-debug make all @@ -144,6 +143,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Mon Dec 18 2017 Steve Dickson - 0.2.4-9.rc3 +- Removed tcp_wrappers dependency (bz 1518780) + * Sat Dec 16 2017 Steve Dickson - 0.2.4-8.rc3 - Updated to latest upstream RC release: rpcbind-0_2_5-rc3 (bz 1431574) From 53c28ebb77014658ad969ffb7460c1b336ca0eb6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 13:17:04 +0000 Subject: [PATCH 10/51] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 9ec7425..696b7cf 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 0.2.4 -Release: 9.rc3%{?dist} +Release: 9.rc3%{?dist}.1 Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -143,6 +143,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 0.2.4-9.rc3.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Mon Dec 18 2017 Steve Dickson - 0.2.4-9.rc3 - Removed tcp_wrappers dependency (bz 1518780) From 431f425a622fc4f051189d07374bf8c9e08389e7 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 14 Feb 2018 00:32:33 +0100 Subject: [PATCH 11/51] Remove BuildRoot definition None of currently supported distributions need that. It was needed last for EL5 which is EOL now Signed-off-by: Igor Gnatenko --- rpcbind.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 696b7cf..0a22fd8 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -10,7 +10,6 @@ Group: System Environment/Daemons License: BSD URL: http://nfsv4.bullopensource.org -BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2 Source1: %{name}.sysconfig From f69f751f065bca1876a23430aaff91f306ea0e35 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 14 Feb 2018 07:37:12 +0100 Subject: [PATCH 12/51] Remove %clean section None of currently supported distributions need that. Last one was EL5 which is EOL for a while. Signed-off-by: Igor Gnatenko --- rpcbind.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/rpcbind.spec b/rpcbind.spec index 0a22fd8..a8ad7ba 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -88,9 +88,6 @@ ln -sf ../bin/rpcbind ln -sf ../bin/rpcinfo -%clean -rm -rf %{buildroot} - %pre # Softly static allocate the rpc uid and gid. From 40319d3d4eff1d316e672ceb0ce2b50d287a546d Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 24 Feb 2018 10:18:25 +0100 Subject: [PATCH 13/51] Use default build flags from redhat-rpm-config --- rpcbind.spec | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/rpcbind.spec b/rpcbind.spec index a8ad7ba..0620351 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 0.2.4 -Release: 9.rc3%{?dist}.1 +Release: 10.rc3%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -50,17 +50,8 @@ RPC calls on a server on that machine. %patch103 -p1 %patch104 -p1 %build -%ifarch s390 s390x -PIE="-fPIE" -%else -PIE="-fpie" -%endif -export PIE - -CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`" - autoreconf -fisv -%configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \ +%configure \ --enable-warmstarts \ --with-statedir="%rpcbind_state_dir" \ --with-rpcuser="%rpcbind_user_group" \ @@ -139,6 +130,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Sat Feb 24 2018 Florian Weimer - 0.2.4-10.rc3 +- Use default build flags from redhat-rpm-config + * Fri Feb 09 2018 Fedora Release Engineering - 0.2.4-9.rc3.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 42c600b3256f739508e30c867f99eb7e2fbe14d2 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Tue, 10 Jul 2018 01:34:42 -0500 Subject: [PATCH 14/51] Remove needless use of %defattr --- rpcbind.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 0620351..9392a1a 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -116,7 +116,6 @@ then fi %files -%defattr(-,root,root) %config(noreplace) /etc/sysconfig/rpcbind %doc AUTHORS ChangeLog README %{_bindir}/rpcbind From 9ee4cac0ece9b0f661beff0c2a36ed226a0ef442 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 03:42:36 +0000 Subject: [PATCH 15/51] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 9392a1a..4d1b804 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 0.2.4 -Release: 10.rc3%{?dist} +Release: 10.rc3%{?dist}.1 Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -129,6 +129,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 0.2.4-10.rc3.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Sat Feb 24 2018 Florian Weimer - 0.2.4-10.rc3 - Use default build flags from redhat-rpm-config From ce8c000bb1ba6f1e520fae3c99665ca6466ce004 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Wed, 15 Aug 2018 12:02:49 -0400 Subject: [PATCH 16/51] Updated to latest upstream release: 1_2_5 Signed-off-by: Steve Dickson --- .gitignore | 4 +- rpcbind-0.2.3-systemd-tmpfiles.patch | 22 +- rpcbind-0.2.4-runstatdir.patch | 32 +-- rpcbind-0.2.5-rc3.patch | 362 --------------------------- rpcbind.spec | 12 +- sources | 2 +- 6 files changed, 35 insertions(+), 399 deletions(-) delete mode 100644 rpcbind-0.2.5-rc3.patch diff --git a/.gitignore b/.gitignore index d7a7da0..4b7a895 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -rpcbind-0.2.4 -/rpcbind-0.2.4.tar.bz2 x86_64 Makefile +/rpcbind-1.2.5.tar.bz2 +rpcbind-1.2.5/ diff --git a/rpcbind-0.2.3-systemd-tmpfiles.patch b/rpcbind-0.2.3-systemd-tmpfiles.patch index 2f02651..b9a8457 100644 --- a/rpcbind-0.2.3-systemd-tmpfiles.patch +++ b/rpcbind-0.2.3-systemd-tmpfiles.patch @@ -1,7 +1,7 @@ -diff -up rpcbind-0.2.4/configure.ac.orig rpcbind-0.2.4/configure.ac ---- rpcbind-0.2.4/configure.ac.orig 2017-12-16 15:52:22.774298138 -0500 -+++ rpcbind-0.2.4/configure.ac 2017-12-16 15:52:45.301075188 -0500 -@@ -52,6 +52,17 @@ AC_ARG_WITH([systemdsystemunitdir], +diff -up rpcbind-1.2.5/configure.ac.orig rpcbind-1.2.5/configure.ac +--- rpcbind-1.2.5/configure.ac.orig 2018-08-15 10:51:19.000000000 -0400 ++++ rpcbind-1.2.5/configure.ac 2018-08-15 11:14:23.933946110 -0400 +@@ -56,6 +56,17 @@ AC_ARG_WITH([systemdsystemunitdir], fi AM_CONDITIONAL(SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) @@ -19,10 +19,10 @@ diff -up rpcbind-0.2.4/configure.ac.orig rpcbind-0.2.4/configure.ac AS_IF([test x$enable_libwrap = xyes], [ AC_CHECK_LIB([wrap], [hosts_access], , AC_MSG_ERROR([libwrap support requested but unable to find libwrap])) -diff -up rpcbind-0.2.4/Makefile.am.orig rpcbind-0.2.4/Makefile.am ---- rpcbind-0.2.4/Makefile.am.orig 2017-12-16 15:52:22.774298138 -0500 -+++ rpcbind-0.2.4/Makefile.am 2017-12-16 15:52:45.301075188 -0500 -@@ -55,6 +55,9 @@ rpcbind_LDADD += $(SYSTEMD_LIBS) +diff -up rpcbind-1.2.5/Makefile.am.orig rpcbind-1.2.5/Makefile.am +--- rpcbind-1.2.5/Makefile.am.orig 2018-08-15 10:51:19.000000000 -0400 ++++ rpcbind-1.2.5/Makefile.am 2018-08-15 11:14:23.934946111 -0400 +@@ -59,6 +59,9 @@ rpcbind_LDADD += $(SYSTEMD_LIBS) systemdsystemunit_DATA = \ systemd/rpcbind.service \ systemd/rpcbind.socket @@ -32,9 +32,9 @@ diff -up rpcbind-0.2.4/Makefile.am.orig rpcbind-0.2.4/Makefile.am endif rpcinfo_SOURCES = src/rpcinfo.c -diff -up rpcbind-0.2.4/systemd/rpcbind.conf.orig rpcbind-0.2.4/systemd/rpcbind.conf ---- rpcbind-0.2.4/systemd/rpcbind.conf.orig 2017-12-16 15:52:45.301075188 -0500 -+++ rpcbind-0.2.4/systemd/rpcbind.conf 2017-12-16 15:52:45.301075188 -0500 +diff -up rpcbind-1.2.5/systemd/rpcbind.conf.orig rpcbind-1.2.5/systemd/rpcbind.conf +--- rpcbind-1.2.5/systemd/rpcbind.conf.orig 2018-08-15 11:14:23.934946111 -0400 ++++ rpcbind-1.2.5/systemd/rpcbind.conf 2018-08-15 11:14:23.934946111 -0400 @@ -0,0 +1,2 @@ +#Type Path Mode UID GID Age Argument +D /run/rpcbind 0700 rpc rpc - - diff --git a/rpcbind-0.2.4-runstatdir.patch b/rpcbind-0.2.4-runstatdir.patch index 3f192bc..90c1dae 100644 --- a/rpcbind-0.2.4-runstatdir.patch +++ b/rpcbind-0.2.4-runstatdir.patch @@ -1,8 +1,8 @@ -diff -up rpcbind-0.2.4/configure.ac.orig rpcbind-0.2.4/configure.ac ---- rpcbind-0.2.4/configure.ac.orig 2017-12-16 15:53:47.253462041 -0500 -+++ rpcbind-0.2.4/configure.ac 2017-12-16 15:54:01.089325106 -0500 -@@ -22,8 +22,8 @@ AC_ARG_ENABLE([warmstarts], - AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes) +diff -up rpcbind-1.2.5/configure.ac.orig rpcbind-1.2.5/configure.ac +--- rpcbind-1.2.5/configure.ac.orig 2018-08-15 11:15:14.188974027 -0400 ++++ rpcbind-1.2.5/configure.ac 2018-08-15 11:15:44.948991114 -0400 +@@ -26,8 +26,8 @@ AC_ARG_ENABLE([rmtcalls], + AM_CONDITIONAL(RMTCALLS, test x$enable_rmtcalls = xyes) AC_ARG_WITH([statedir], - AS_HELP_STRING([--with-statedir=ARG], [use ARG as state dir @<:@default=/var/run/rpcbind@:>@]) @@ -12,10 +12,10 @@ diff -up rpcbind-0.2.4/configure.ac.orig rpcbind-0.2.4/configure.ac AC_SUBST([statedir], [$with_statedir]) AC_ARG_WITH([rpcuser], -diff -up rpcbind-0.2.4/configure.orig rpcbind-0.2.4/configure ---- rpcbind-0.2.4/configure.orig 2016-11-30 09:03:59.000000000 -0500 -+++ rpcbind-0.2.4/configure 2017-12-16 15:54:01.091325086 -0500 -@@ -1387,7 +1387,7 @@ Optional Features: +diff -up rpcbind-1.2.5/configure.orig rpcbind-1.2.5/configure +--- rpcbind-1.2.5/configure.orig 2018-08-15 11:00:32.000000000 -0400 ++++ rpcbind-1.2.5/configure 2018-08-15 11:15:44.951991115 -0400 +@@ -1391,7 +1391,7 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) @@ -24,7 +24,7 @@ diff -up rpcbind-0.2.4/configure.orig rpcbind-0.2.4/configure --with-rpcuser=ARG use ARG for RPC [default=root] -@@ -3883,7 +3883,7 @@ fi +@@ -3901,7 +3901,7 @@ fi if test "${with_statedir+set}" = set; then : withval=$with_statedir; else @@ -33,9 +33,9 @@ diff -up rpcbind-0.2.4/configure.orig rpcbind-0.2.4/configure fi statedir=$with_statedir -diff -up rpcbind-0.2.4/man/rpcbind-fr.8.orig rpcbind-0.2.4/man/rpcbind-fr.8 ---- rpcbind-0.2.4/man/rpcbind-fr.8.orig 2016-11-28 15:47:28.000000000 -0500 -+++ rpcbind-0.2.4/man/rpcbind-fr.8 2017-12-16 15:54:01.091325086 -0500 +diff -up rpcbind-1.2.5/man/rpcbind-fr.8.orig rpcbind-1.2.5/man/rpcbind-fr.8 +--- rpcbind-1.2.5/man/rpcbind-fr.8.orig 2018-08-15 10:51:19.000000000 -0400 ++++ rpcbind-1.2.5/man/rpcbind-fr.8 2018-08-15 11:15:44.951991115 -0400 @@ -138,8 +138,8 @@ est redémarré. .Xr rpcbind 3 , .Xr rpcinfo 8 @@ -47,9 +47,9 @@ diff -up rpcbind-0.2.4/man/rpcbind-fr.8.orig rpcbind-0.2.4/man/rpcbind-fr.8 .Sh TRADUCTION Aurelien CHARBON (Sept 2003) .El -diff -up rpcbind-0.2.4/src/rpcbind.c.orig rpcbind-0.2.4/src/rpcbind.c ---- rpcbind-0.2.4/src/rpcbind.c.orig 2016-11-28 15:47:28.000000000 -0500 -+++ rpcbind-0.2.4/src/rpcbind.c 2017-12-16 15:54:01.092325076 -0500 +diff -up rpcbind-1.2.5/src/rpcbind.c.orig rpcbind-1.2.5/src/rpcbind.c +--- rpcbind-1.2.5/src/rpcbind.c.orig 2018-08-15 10:51:19.000000000 -0400 ++++ rpcbind-1.2.5/src/rpcbind.c 2018-08-15 11:15:44.952991116 -0400 @@ -106,7 +106,7 @@ char *nss_modules = "files"; /* who to suid to if -s is given */ #define RUN_AS "daemon" diff --git a/rpcbind-0.2.5-rc3.patch b/rpcbind-0.2.5-rc3.patch deleted file mode 100644 index e02ed95..0000000 --- a/rpcbind-0.2.5-rc3.patch +++ /dev/null @@ -1,362 +0,0 @@ -diff --git a/Makefile.am b/Makefile.am -index 43c2710..c160a95 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -29,7 +29,8 @@ if LIBWRAP - AM_CPPFLAGS += -DLIBWRAP - endif - --bin_PROGRAMS = rpcbind rpcinfo -+bin_PROGRAMS = rpcinfo -+sbin_PROGRAMS = rpcbind - - rpcbind_SOURCES = \ - src/check_bound.c \ -diff --git a/configure.ac b/configure.ac -index 3790310..359a418 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -61,9 +61,9 @@ AC_SEARCH_LIBS([pthread_create], [pthread]) - - AC_CHECK_HEADERS([nss.h rpcsvc/mount.h]) - --# make bindir available for substitution in config file -+# make sbindir available for substitution in config file - # 2 "evals" needed to expand variable names --AC_SUBST([_bindir]) --AC_CONFIG_COMMANDS_PRE([eval eval _bindir=$bindir]) -+AC_SUBST([_sbindir]) -+AC_CONFIG_COMMANDS_PRE([eval eval _sbindir=$sbindir]) - - AC_OUTPUT([Makefile systemd/rpcbind.service]) -diff --git a/src/pmap_svc.c b/src/pmap_svc.c -index 4c744fe..a53dd5f 100644 ---- a/src/pmap_svc.c -+++ b/src/pmap_svc.c -@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - long ans; - uid_t uid; - char uidbuf[32]; -+ int rc = TRUE; - - /* - * Can't use getpwnam here. We might end up calling ourselves -@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - - if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - #ifdef RPCBIND_DEBUG - if (debugging) -@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - - if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) { - svcerr_weakauth(xprt); -- return (FALSE); -+ rc = (FALSE); -+ goto done; - } - - rpcbreg.r_prog = reg.pm_prog; -@@ -258,7 +261,18 @@ done_change: - rpcbs_set(RPCBVERS_2_STAT, ans); - else - rpcbs_unset(RPCBVERS_2_STAT, ans); -- return (TRUE); -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { -+#ifdef RPCBIND_DEBUG -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+#endif -+ } -+ return (rc); - } - - /* ARGSUSED */ -@@ -272,15 +286,18 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - #ifdef RPCBIND_DEBUG - char *uaddr; - #endif -+ int rc = TRUE; - - if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - - if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) { - svcerr_weakauth(xprt); -- return FALSE; -+ rc = FALSE; -+ goto done; - } - - #ifdef RPCBIND_DEBUG -@@ -330,21 +347,36 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - pmap_ipprot2netid(reg.pm_prot) ?: "", - port ? udptrans : ""); - -- return (TRUE); -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { -+#ifdef RPCBIND_DEBUG -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+#endif -+ } -+ return (rc); - } - - /* ARGSUSED */ - static bool_t - pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - { -+ int rc = TRUE; -+ - if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - - if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) { - svcerr_weakauth(xprt); -- return FALSE; -+ rc = FALSE; -+ goto done; - } - - if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr, -@@ -354,7 +386,19 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - rpcbind_abort(); - } - } -- return (TRUE); -+ -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) { -+#ifdef RPCBIND_DEBUG -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+#endif -+ } -+ return (rc); - } - - int pmap_netid2ipprot(const char *netid) -diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c -index 709e3fb..091f530 100644 ---- a/src/rpcb_svc.c -+++ b/src/rpcb_svc.c -@@ -166,7 +166,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) - svcerr_decode(transp); - if (debugging) - (void) xlog(LOG_DEBUG, "rpcbind: could not decode"); -- return; -+ goto done; - } - - if (rqstp->rq_proc == RPCBPROC_SET -diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c -index 5094879..eebbbbe 100644 ---- a/src/rpcb_svc_4.c -+++ b/src/rpcb_svc_4.c -@@ -218,7 +218,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) - svcerr_decode(transp); - if (debugging) - (void) xlog(LOG_DEBUG, "rpcbind: could not decode\n"); -- return; -+ goto done; - } - - if (rqstp->rq_proc == RPCBPROC_SET -diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c -index 5862c26..9c1c3af 100644 ---- a/src/rpcb_svc_com.c -+++ b/src/rpcb_svc_com.c -@@ -612,9 +612,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - struct netconfig *nconf; - struct netbuf *caller; - struct r_rmtcall_args a; -- char *buf_alloc = NULL, *outbufp; -- char *outbuf_alloc = NULL; -- char buf[RPC_BUF_MAX], outbuf[RPC_BUF_MAX]; -+ char outbuf[RPC_BUF_MAX]; - struct netbuf *na = (struct netbuf *) NULL; - struct rpc_msg call_msg; - int outlen; -@@ -635,36 +633,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - } - if (si.si_socktype != SOCK_DGRAM) - return; /* Only datagram type accepted */ -- sendsz = __rpc_get_t_size(si.si_af, si.si_proto, UDPMSGSIZE); -- if (sendsz == 0) { /* data transfer not supported */ -- if (reply_type == RPCBPROC_INDIRECT) -- svcerr_systemerr(transp); -- return; -- } -- /* -- * Should be multiple of 4 for XDR. -- */ -- sendsz = ((sendsz + 3) / 4) * 4; -- if (sendsz > RPC_BUF_MAX) { --#ifdef notyet -- buf_alloc = alloca(sendsz); /* not in IDR2? */ --#else -- buf_alloc = malloc(sendsz); --#endif /* notyet */ -- if (buf_alloc == NULL) { -- if (debugging) -- xlog(LOG_DEBUG, -- "rpcbproc_callit_com: No Memory!\n"); -- if (reply_type == RPCBPROC_INDIRECT) -- svcerr_systemerr(transp); -- return; -- } -- a.rmt_args.args = buf_alloc; -- } else { -- a.rmt_args.args = buf; -- } -+ sendsz = UDPMSGSIZE; - - call_msg.rm_xid = 0; /* For error checking purposes */ -+ memset(&a, 0, sizeof(a)); /* Zero out the input buffer */ - if (!svc_getargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { - if (reply_type == RPCBPROC_INDIRECT) - svcerr_decode(transp); -@@ -700,11 +672,11 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - - rpcbs_rmtcall(versnum - 2, reply_type, a.rmt_prog, a.rmt_vers, - a.rmt_proc, transp->xp_netid, rbl); -- - if (rbl == (rpcblist_ptr)NULL) { - #ifdef RPCBIND_DEBUG - if (debugging) -- xlog(LOG_DEBUG, "not found\n"); -+ xlog(LOG_DEBUG, "prog %lu vers %lu: not found\n", -+ a.rmt_prog, a.rmt_vers); - #endif - if (reply_type == RPCBPROC_INDIRECT) - svcerr_noprog(transp); -@@ -818,24 +790,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; - call_msg.rm_call.cb_prog = a.rmt_prog; - call_msg.rm_call.cb_vers = a.rmt_vers; -- if (sendsz > RPC_BUF_MAX) { --#ifdef notyet -- outbuf_alloc = alloca(sendsz); /* not in IDR2? */ --#else -- outbuf_alloc = malloc(sendsz); --#endif /* notyet */ -- if (outbuf_alloc == NULL) { -- if (reply_type == RPCBPROC_INDIRECT) -- svcerr_systemerr(transp); -- if (debugging) -- xlog(LOG_DEBUG, -- "rpcbproc_callit_com: No memory!\n"); -- goto error; -- } -- xdrmem_create(&outxdr, outbuf_alloc, sendsz, XDR_ENCODE); -- } else { -- xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE); -- } -+ -+ memset(outbuf, '\0', sendsz); /* Zero out the output buffer */ -+ xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE); -+ - if (!xdr_callhdr(&outxdr, &call_msg)) { - if (reply_type == RPCBPROC_INDIRECT) - svcerr_systemerr(transp); -@@ -900,10 +858,6 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - goto error; - } - outlen = (int) XDR_GETPOS(&outxdr); -- if (outbuf_alloc) -- outbufp = outbuf_alloc; -- else -- outbufp = outbuf; - - na = uaddr2taddr(nconf, local_uaddr); - if (!na) { -@@ -912,7 +866,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - goto error; - } - -- if (sendto(fd, outbufp, outlen, 0, (struct sockaddr *)na->buf, na->len) -+ if (sendto(fd, outbuf, outlen, 0, (struct sockaddr *)na->buf, na->len) - != outlen) { - if (debugging) - xlog(LOG_DEBUG, -@@ -927,12 +881,16 @@ error: - if (call_msg.rm_xid != 0) - (void) free_slot_by_xid(call_msg.rm_xid); - out: -+ if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } - if (local_uaddr) - free(local_uaddr); -- if (buf_alloc) -- free(buf_alloc); -- if (outbuf_alloc) -- free(outbuf_alloc); - if (na) { - free(na->buf); - free(na); -@@ -1094,7 +1052,6 @@ void - my_svc_run() - { - int poll_ret, check_ret; -- int n; - - for (;;) { - struct pollfd my_pollfd[svc_max_pollfd]; -diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in -index e7e86da..7b1c74b 100644 ---- a/systemd/rpcbind.service.in -+++ b/systemd/rpcbind.service.in -@@ -2,16 +2,17 @@ - Description=RPC Bind - Documentation=man:rpcbind(8) - DefaultDependencies=no -+RequiresMountsFor=@statedir@ - - # Make sure we use the IP addresses listed for - # rpcbind.socket, no matter how this unit is started. --Wants=rpcbind.socket --After=rpcbind.socket -+Requires=rpcbind.socket -+Wants=rpcbind.target - - [Service] - Type=notify - # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. --ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f -+ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f - - [Install] - WantedBy=multi-user.target diff --git a/rpcbind.spec b/rpcbind.spec index 4d1b804..9158870 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -3,8 +3,8 @@ %global rpcbind_state_dir %{_rundir}/rpcbind Name: rpcbind -Version: 0.2.4 -Release: 10.rc3%{?dist}.1 +Version: 1.2.5 +Release: 0%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -22,8 +22,6 @@ Requires(post): chkconfig systemd Requires(preun): systemd Requires(postun): systemd coreutils -Patch001: rpcbind-0.2.5-rc3.patch - Patch100: rpcbind-0.2.3-systemd-envfile.patch Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch Patch102: rpcbind-0.2.4-runstatdir.patch @@ -41,9 +39,6 @@ RPC calls on a server on that machine. %prep %setup -q -# 1401561 - rpcbind-0.2.3-12.rc2.fc24 fails to start at boot -%patch001 -p1 - %patch100 -p1 %patch101 -p1 %patch102 -p1 @@ -129,6 +124,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Wed Aug 15 2018 Steve Dickson - 1.2.5-0 +- Updated to latest upstream release: 1_2_5 + * Sat Jul 14 2018 Fedora Release Engineering - 0.2.4-10.rc3.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 9caa437..12c7885 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cf10cd41ed8228fc54c316191c1f07fe rpcbind-0.2.4.tar.bz2 +SHA512 (rpcbind-1.2.5.tar.bz2) = e884c4757950ccead0f9a07f50625a63e6f18f9bfae9fcfffa3e5fa4b7a66c3a99d9fa303061848fe8211509d5456f24ff26e4579af6e161a35522268f3ef3e4 From aa311807910a0593ddf7b4ed3746a43742cebcc4 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 9 Oct 2018 10:07:32 -0400 Subject: [PATCH 17/51] Fixed stack buffer overflow in rpcinfo (bz 1637562) Signed-off-by: Steve Dickson --- rpcbind-1.2.5-rpcinfo-bufoverflow.patch | 64 +++++++++++++++++++++++++ rpcbind.spec | 9 +++- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 rpcbind-1.2.5-rpcinfo-bufoverflow.patch diff --git a/rpcbind-1.2.5-rpcinfo-bufoverflow.patch b/rpcbind-1.2.5-rpcinfo-bufoverflow.patch new file mode 100644 index 0000000..e9cd522 --- /dev/null +++ b/rpcbind-1.2.5-rpcinfo-bufoverflow.patch @@ -0,0 +1,64 @@ +commit 0bc1c0ae7ce61a7ac8a8e9a9b2086268f011abf0 +Author: Steve Dickson +Date: Tue Oct 9 09:19:50 2018 -0400 + + rpcinfo: Fix stack buffer overflow + + *** buffer overflow detected ***: rpcinfo terminated + ======= Backtrace: ========= + /lib64/libc.so.6(+0x721af)[0x7ff24c4451af] + /lib64/libc.so.6(__fortify_fail+0x37)[0x7ff24c4ccdc7] + /lib64/libc.so.6(+0xf8050)[0x7ff24c4cb050] + rpcinfo(+0x435f)[0xef3be2635f] + rpcinfo(+0x1c62)[0xef3be23c62] + /lib64/libc.so.6(__libc_start_main+0xf5)[0x7ff24c3f36e5] + rpcinfo(+0x2739)[0xef3be24739] + ======= Memory map: ======== + ... + The patch below fixes it. + + Reviewed-by: Chuck Lever + Signed-off-by: Thomas Blume + Signed-off-by: Steve Dickson + +diff --git a/src/rpcinfo.c b/src/rpcinfo.c +index 9b46864..cfdba88 100644 +--- a/src/rpcinfo.c ++++ b/src/rpcinfo.c +@@ -973,6 +973,7 @@ rpcbdump (dumptype, netid, argc, argv) + (" program version(s) netid(s) service owner\n"); + for (rs = rs_head; rs; rs = rs->next) + { ++ size_t netidmax = sizeof(buf) - 1; + char *p = buf; + + printf ("%10ld ", rs->prog); +@@ -985,12 +986,22 @@ rpcbdump (dumptype, netid, argc, argv) + } + printf ("%-10s", buf); + buf[0] = '\0'; +- for (nl = rs->nlist; nl; nl = nl->next) +- { +- strcat (buf, nl->netid); +- if (nl->next) +- strcat (buf, ","); +- } ++ ++ for (nl = rs->nlist; nl; nl = nl->next) ++ { ++ strncat (buf, nl->netid, netidmax); ++ if (strlen (nl->netid) < netidmax) ++ netidmax -= strlen(nl->netid); ++ else ++ break; ++ ++ if (nl->next && netidmax > 1) ++ { ++ strncat (buf, ",", netidmax); ++ netidmax --; ++ } ++ } ++ + printf ("%-32s", buf); + rpc = getrpcbynumber (rs->prog); + if (rpc) diff --git a/rpcbind.spec b/rpcbind.spec index 9158870..d9041e2 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.5 -Release: 0%{?dist} +Release: 1%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -22,6 +22,8 @@ Requires(post): chkconfig systemd Requires(preun): systemd Requires(postun): systemd coreutils +Patch001: rpcbind-1.2.5-rpcinfo-bufoverflow.patch + Patch100: rpcbind-0.2.3-systemd-envfile.patch Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch Patch102: rpcbind-0.2.4-runstatdir.patch @@ -38,6 +40,8 @@ RPC calls on a server on that machine. %prep %setup -q +# 1637562 - rpcinfo: Fix stack buffer overflow +%patch001 -p1 %patch100 -p1 %patch101 -p1 @@ -124,6 +128,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Tue Oct 9 2018 Steve Dickson - 1.2.5-1 +- Fixed stack buffer overflow in rpcinfo (bz 1637562) + * Wed Aug 15 2018 Steve Dickson - 1.2.5-0 - Updated to latest upstream release: 1_2_5 From d344d78664d6bb5bb1a34bc7f60f0ad79998a486 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 17 Oct 2018 09:18:55 +0100 Subject: [PATCH 18/51] Drop old sys-v migration bits, Ship the license file, minor spec cleanups --- rpcbind.spec | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/rpcbind.spec b/rpcbind.spec index d9041e2..1888fe0 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,9 +4,8 @@ Name: rpcbind Version: 1.2.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Universal Addresses to RPC Program Number Mapper -Group: System Environment/Daemons License: BSD URL: http://nfsv4.bullopensource.org @@ -18,7 +17,7 @@ Conflicts: man-pages < 2.43-12 BuildRequires: automake, autoconf, libtool, systemd, systemd-devel BuildRequires: libtirpc-devel, quota-devel Requires(pre): coreutils shadow-utils -Requires(post): chkconfig systemd +Requires(post): systemd Requires(preun): systemd Requires(postun): systemd coreutils @@ -61,7 +60,6 @@ autoreconf -fisv make all %install -rm -rf %{buildroot} mkdir -p %{buildroot}{%{_sbindir},%{_bindir},/etc/sysconfig} mkdir -p %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_tmpfilesdir} @@ -101,12 +99,6 @@ fi %postun %systemd_postun_with_restart rpcbind.service rpcbind.socket -%triggerun -- rpcbind < 0.2.0-15 -%{_bindir}/systemd-sysv-convert --save rpcbind >/dev/null 2>&1 ||: -/bin/systemctl --no-reload enable rpcbind.service >/dev/null 2>&1 -/sbin/chkconfig --del rpcbind >/dev/null 2>&1 || : -/bin/systemctl try-restart rpcbind.service >/dev/null 2>&1 || : - %triggerin -- rpcbind > 0.2.2-2.0 if systemctl -q is-enabled rpcbind.socket then @@ -115,6 +107,7 @@ then fi %files +%license COPYING %config(noreplace) /etc/sysconfig/rpcbind %doc AUTHORS ChangeLog README %{_bindir}/rpcbind @@ -128,6 +121,10 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Wed Oct 17 2018 Peter Robinson 1.2.5-2 +- Drop old sys-v migration bits +- Ship the license file, minor spec cleanups + * Tue Oct 9 2018 Steve Dickson - 1.2.5-1 - Fixed stack buffer overflow in rpcinfo (bz 1637562) From e371446c906060ed9592d9a8613e424bf08a325f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 2 Feb 2019 11:33:36 +0000 Subject: [PATCH 19/51] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 1888fe0..3b83ef7 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -121,6 +121,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Sat Feb 02 2019 Fedora Release Engineering - 1.2.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Wed Oct 17 2018 Peter Robinson 1.2.5-2 - Drop old sys-v migration bits - Ship the license file, minor spec cleanups From eb2280538bc0071e4171db66e18f67eb10454108 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jul 2019 18:44:28 +0000 Subject: [PATCH 20/51] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 3b83ef7..b78e10e 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -121,6 +121,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Fri Jul 26 2019 Fedora Release Engineering - 1.2.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sat Feb 02 2019 Fedora Release Engineering - 1.2.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From aefb4fab9757b338e1e213e6f15f74aadc322119 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Thu, 19 Sep 2019 14:29:27 -0400 Subject: [PATCH 21/51] Enable remote calls which are used by NIS and other packages (bz 1630672) Signed-off-by: Steve Dickson --- rpcbind.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index b78e10e..003796b 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -55,6 +55,7 @@ autoreconf -fisv --with-rpcuser="%rpcbind_user_group" \ --with-nss-modules="files altfiles" \ --sbindir=%{_bindir} \ + --enable-rmtcalls \ --enable-debug make all @@ -121,6 +122,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Thu Sep 19 2019 Steve Dickson - 1.2.5-5 +- Enable remote calls which are used by NIS and other packages (bz 1630672) + * Fri Jul 26 2019 Fedora Release Engineering - 1.2.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 4ebf00837dac78ef0c69278850e6a0a5a739b1bd Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Mon, 11 Nov 2019 09:53:22 -0500 Subject: [PATCH 22/51] Updated to latest upstream RC release: rpcbind-1_2_5-rc1 (bz 1431574) Signed-off-by: Steve Dickson --- rpcbind-0.2.5-rc1.patch | 185 ------------------------ rpcbind-0.2.5-rc2.patch | 310 ---------------------------------------- rpcbind-1.2.5-rc1.patch | 249 ++++++++++++++++++++++++++++++++ rpcbind.spec | 7 +- 4 files changed, 254 insertions(+), 497 deletions(-) delete mode 100644 rpcbind-0.2.5-rc1.patch delete mode 100644 rpcbind-0.2.5-rc2.patch create mode 100644 rpcbind-1.2.5-rc1.patch diff --git a/rpcbind-0.2.5-rc1.patch b/rpcbind-0.2.5-rc1.patch deleted file mode 100644 index 6dbfff3..0000000 --- a/rpcbind-0.2.5-rc1.patch +++ /dev/null @@ -1,185 +0,0 @@ -diff --git a/src/pmap_svc.c b/src/pmap_svc.c -index 4c744fe..e926cdc 100644 ---- a/src/pmap_svc.c -+++ b/src/pmap_svc.c -@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - long ans; - uid_t uid; - char uidbuf[32]; -+ int rc = TRUE; - - /* - * Can't use getpwnam here. We might end up calling ourselves -@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - - if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - #ifdef RPCBIND_DEBUG - if (debugging) -@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - - if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) { - svcerr_weakauth(xprt); -- return (FALSE); -+ rc = (FALSE); -+ goto done; - } - - rpcbreg.r_prog = reg.pm_prog; -@@ -258,7 +261,16 @@ done_change: - rpcbs_set(RPCBVERS_2_STAT, ans); - else - rpcbs_unset(RPCBVERS_2_STAT, ans); -- return (TRUE); -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } -+ return (rc); - } - - /* ARGSUSED */ -@@ -272,15 +284,18 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - #ifdef RPCBIND_DEBUG - char *uaddr; - #endif -+ int rc = TRUE; - - if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - - if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) { - svcerr_weakauth(xprt); -- return FALSE; -+ rc = FALSE; -+ goto done; - } - - #ifdef RPCBIND_DEBUG -@@ -330,21 +345,34 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - pmap_ipprot2netid(reg.pm_prot) ?: "", - port ? udptrans : ""); - -- return (TRUE); -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } -+ return (rc); - } - - /* ARGSUSED */ - static bool_t - pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - { -+ int rc = TRUE; -+ - if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - - if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) { - svcerr_weakauth(xprt); -- return FALSE; -+ rc = FALSE; -+ goto done; - } - - if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr, -@@ -354,7 +382,17 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - rpcbind_abort(); - } - } -- return (TRUE); -+ -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) { -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } -+ return (rc); - } - - int pmap_netid2ipprot(const char *netid) -diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c -index 709e3fb..091f530 100644 ---- a/src/rpcb_svc.c -+++ b/src/rpcb_svc.c -@@ -166,7 +166,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) - svcerr_decode(transp); - if (debugging) - (void) xlog(LOG_DEBUG, "rpcbind: could not decode"); -- return; -+ goto done; - } - - if (rqstp->rq_proc == RPCBPROC_SET -diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c -index 5094879..eebbbbe 100644 ---- a/src/rpcb_svc_4.c -+++ b/src/rpcb_svc_4.c -@@ -218,7 +218,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) - svcerr_decode(transp); - if (debugging) - (void) xlog(LOG_DEBUG, "rpcbind: could not decode\n"); -- return; -+ goto done; - } - - if (rqstp->rq_proc == RPCBPROC_SET -diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c -index 5862c26..cb63afd 100644 ---- a/src/rpcb_svc_com.c -+++ b/src/rpcb_svc_com.c -@@ -927,6 +927,14 @@ error: - if (call_msg.rm_xid != 0) - (void) free_slot_by_xid(call_msg.rm_xid); - out: -+ if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } - if (local_uaddr) - free(local_uaddr); - if (buf_alloc) -diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in -index e7e86da..03a9e0b 100644 ---- a/systemd/rpcbind.service.in -+++ b/systemd/rpcbind.service.in -@@ -2,6 +2,7 @@ - Description=RPC Bind - Documentation=man:rpcbind(8) - DefaultDependencies=no -+RequiresMountsFor=@statedir@ - - # Make sure we use the IP addresses listed for - # rpcbind.socket, no matter how this unit is started. diff --git a/rpcbind-0.2.5-rc2.patch b/rpcbind-0.2.5-rc2.patch deleted file mode 100644 index bf89442..0000000 --- a/rpcbind-0.2.5-rc2.patch +++ /dev/null @@ -1,310 +0,0 @@ -diff --git a/src/pmap_svc.c b/src/pmap_svc.c -index 4c744fe..a53dd5f 100644 ---- a/src/pmap_svc.c -+++ b/src/pmap_svc.c -@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - long ans; - uid_t uid; - char uidbuf[32]; -+ int rc = TRUE; - - /* - * Can't use getpwnam here. We might end up calling ourselves -@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - - if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - #ifdef RPCBIND_DEBUG - if (debugging) -@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - - if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) { - svcerr_weakauth(xprt); -- return (FALSE); -+ rc = (FALSE); -+ goto done; - } - - rpcbreg.r_prog = reg.pm_prog; -@@ -258,7 +261,18 @@ done_change: - rpcbs_set(RPCBVERS_2_STAT, ans); - else - rpcbs_unset(RPCBVERS_2_STAT, ans); -- return (TRUE); -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { -+#ifdef RPCBIND_DEBUG -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+#endif -+ } -+ return (rc); - } - - /* ARGSUSED */ -@@ -272,15 +286,18 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - #ifdef RPCBIND_DEBUG - char *uaddr; - #endif -+ int rc = TRUE; - - if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - - if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) { - svcerr_weakauth(xprt); -- return FALSE; -+ rc = FALSE; -+ goto done; - } - - #ifdef RPCBIND_DEBUG -@@ -330,21 +347,36 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - pmap_ipprot2netid(reg.pm_prot) ?: "", - port ? udptrans : ""); - -- return (TRUE); -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { -+#ifdef RPCBIND_DEBUG -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+#endif -+ } -+ return (rc); - } - - /* ARGSUSED */ - static bool_t - pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - { -+ int rc = TRUE; -+ - if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - - if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) { - svcerr_weakauth(xprt); -- return FALSE; -+ rc = FALSE; -+ goto done; - } - - if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr, -@@ -354,7 +386,19 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - rpcbind_abort(); - } - } -- return (TRUE); -+ -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) { -+#ifdef RPCBIND_DEBUG -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+#endif -+ } -+ return (rc); - } - - int pmap_netid2ipprot(const char *netid) -diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c -index 709e3fb..091f530 100644 ---- a/src/rpcb_svc.c -+++ b/src/rpcb_svc.c -@@ -166,7 +166,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) - svcerr_decode(transp); - if (debugging) - (void) xlog(LOG_DEBUG, "rpcbind: could not decode"); -- return; -+ goto done; - } - - if (rqstp->rq_proc == RPCBPROC_SET -diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c -index 5094879..eebbbbe 100644 ---- a/src/rpcb_svc_4.c -+++ b/src/rpcb_svc_4.c -@@ -218,7 +218,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) - svcerr_decode(transp); - if (debugging) - (void) xlog(LOG_DEBUG, "rpcbind: could not decode\n"); -- return; -+ goto done; - } - - if (rqstp->rq_proc == RPCBPROC_SET -diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c -index 5862c26..d36b090 100644 ---- a/src/rpcb_svc_com.c -+++ b/src/rpcb_svc_com.c -@@ -612,9 +612,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - struct netconfig *nconf; - struct netbuf *caller; - struct r_rmtcall_args a; -- char *buf_alloc = NULL, *outbufp; -- char *outbuf_alloc = NULL; -- char buf[RPC_BUF_MAX], outbuf[RPC_BUF_MAX]; -+ char outbuf[RPC_BUF_MAX]; - struct netbuf *na = (struct netbuf *) NULL; - struct rpc_msg call_msg; - int outlen; -@@ -635,36 +633,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - } - if (si.si_socktype != SOCK_DGRAM) - return; /* Only datagram type accepted */ -- sendsz = __rpc_get_t_size(si.si_af, si.si_proto, UDPMSGSIZE); -- if (sendsz == 0) { /* data transfer not supported */ -- if (reply_type == RPCBPROC_INDIRECT) -- svcerr_systemerr(transp); -- return; -- } -- /* -- * Should be multiple of 4 for XDR. -- */ -- sendsz = ((sendsz + 3) / 4) * 4; -- if (sendsz > RPC_BUF_MAX) { --#ifdef notyet -- buf_alloc = alloca(sendsz); /* not in IDR2? */ --#else -- buf_alloc = malloc(sendsz); --#endif /* notyet */ -- if (buf_alloc == NULL) { -- if (debugging) -- xlog(LOG_DEBUG, -- "rpcbproc_callit_com: No Memory!\n"); -- if (reply_type == RPCBPROC_INDIRECT) -- svcerr_systemerr(transp); -- return; -- } -- a.rmt_args.args = buf_alloc; -- } else { -- a.rmt_args.args = buf; -- } -+ sendsz = UDPMSGSIZE; - - call_msg.rm_xid = 0; /* For error checking purposes */ -+ memset(&a, 0, sizeof(a)); /* Zero out the input buffer */ - if (!svc_getargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { - if (reply_type == RPCBPROC_INDIRECT) - svcerr_decode(transp); -@@ -700,11 +672,11 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - - rpcbs_rmtcall(versnum - 2, reply_type, a.rmt_prog, a.rmt_vers, - a.rmt_proc, transp->xp_netid, rbl); -- - if (rbl == (rpcblist_ptr)NULL) { - #ifdef RPCBIND_DEBUG - if (debugging) -- xlog(LOG_DEBUG, "not found\n"); -+ xlog(LOG_DEBUG, "prog %lu vers %lu: not found\n", -+ a.rmt_prog, a.rmt_vers); - #endif - if (reply_type == RPCBPROC_INDIRECT) - svcerr_noprog(transp); -@@ -818,24 +790,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; - call_msg.rm_call.cb_prog = a.rmt_prog; - call_msg.rm_call.cb_vers = a.rmt_vers; -- if (sendsz > RPC_BUF_MAX) { --#ifdef notyet -- outbuf_alloc = alloca(sendsz); /* not in IDR2? */ --#else -- outbuf_alloc = malloc(sendsz); --#endif /* notyet */ -- if (outbuf_alloc == NULL) { -- if (reply_type == RPCBPROC_INDIRECT) -- svcerr_systemerr(transp); -- if (debugging) -- xlog(LOG_DEBUG, -- "rpcbproc_callit_com: No memory!\n"); -- goto error; -- } -- xdrmem_create(&outxdr, outbuf_alloc, sendsz, XDR_ENCODE); -- } else { -- xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE); -- } -+ -+ memset(outbuf, '\0', sendsz); /* Zero out the output buffer */ -+ xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE); -+ - if (!xdr_callhdr(&outxdr, &call_msg)) { - if (reply_type == RPCBPROC_INDIRECT) - svcerr_systemerr(transp); -@@ -900,10 +858,6 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - goto error; - } - outlen = (int) XDR_GETPOS(&outxdr); -- if (outbuf_alloc) -- outbufp = outbuf_alloc; -- else -- outbufp = outbuf; - - na = uaddr2taddr(nconf, local_uaddr); - if (!na) { -@@ -912,7 +866,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - goto error; - } - -- if (sendto(fd, outbufp, outlen, 0, (struct sockaddr *)na->buf, na->len) -+ if (sendto(fd, outbuf, outlen, 0, (struct sockaddr *)na->buf, na->len) - != outlen) { - if (debugging) - xlog(LOG_DEBUG, -@@ -927,12 +881,16 @@ error: - if (call_msg.rm_xid != 0) - (void) free_slot_by_xid(call_msg.rm_xid); - out: -+ if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } - if (local_uaddr) - free(local_uaddr); -- if (buf_alloc) -- free(buf_alloc); -- if (outbuf_alloc) -- free(outbuf_alloc); - if (na) { - free(na->buf); - free(na); -diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in -index e7e86da..03a9e0b 100644 ---- a/systemd/rpcbind.service.in -+++ b/systemd/rpcbind.service.in -@@ -2,6 +2,7 @@ - Description=RPC Bind - Documentation=man:rpcbind(8) - DefaultDependencies=no -+RequiresMountsFor=@statedir@ - - # Make sure we use the IP addresses listed for - # rpcbind.socket, no matter how this unit is started. diff --git a/rpcbind-1.2.5-rc1.patch b/rpcbind-1.2.5-rc1.patch new file mode 100644 index 0000000..6d09254 --- /dev/null +++ b/rpcbind-1.2.5-rc1.patch @@ -0,0 +1,249 @@ +diff -up rpcbind-1.2.5/src/pmap_svc.c.orig rpcbind-1.2.5/src/pmap_svc.c +--- rpcbind-1.2.5/src/pmap_svc.c.orig 2018-08-15 10:51:19.000000000 -0400 ++++ rpcbind-1.2.5/src/pmap_svc.c 2019-11-11 09:50:09.051438608 -0500 +@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)pmap_svc.c 1 + #include + #include + #include ++#include + #include + #include + #include +diff -up rpcbind-1.2.5/src/rpcbind.c.orig rpcbind-1.2.5/src/rpcbind.c +--- rpcbind-1.2.5/src/rpcbind.c.orig 2018-08-15 10:51:19.000000000 -0400 ++++ rpcbind-1.2.5/src/rpcbind.c 2019-11-11 09:50:09.050438602 -0500 +@@ -42,11 +42,10 @@ + + #include + #include +-#include + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -340,7 +339,7 @@ init_transport(struct netconfig *nconf) + { + int fd = -1; + struct t_bind taddr; +- struct addrinfo hints, *res; ++ struct addrinfo hints, *res = NULL; + struct __rpc_sockinfo si; + SVCXPRT *my_xprt = NULL; + int status; /* bound checking ? */ +@@ -817,8 +816,12 @@ got_socket: + } + #endif + ++ if (res != NULL) ++ freeaddrinfo(res); + return (0); + error: ++ if (res != NULL) ++ freeaddrinfo(res); + close(fd); + return (1); + } +diff -up rpcbind-1.2.5/src/rpcb_stat.c.orig rpcbind-1.2.5/src/rpcb_stat.c +--- rpcbind-1.2.5/src/rpcb_stat.c.orig 2018-08-15 10:51:19.000000000 -0400 ++++ rpcbind-1.2.5/src/rpcb_stat.c 2019-11-11 09:50:09.051438608 -0500 +@@ -151,7 +151,7 @@ rpcbs_rmtcall(rpcvers_t rtype, rpcproc_t + rpcbs_rmtcalllist *rl; + struct netconfig *nconf; + +- if (rtype > RPCBVERS_STAT) ++ if (rtype >= RPCBVERS_STAT) + return; + for (rl = inf[rtype].rmtinfo; rl; rl = rl->next) { + +diff -up rpcbind-1.2.5/src/rpcb_svc_com.c.orig rpcbind-1.2.5/src/rpcb_svc_com.c +--- rpcbind-1.2.5/src/rpcb_svc_com.c.orig 2018-08-15 10:51:19.000000000 -0400 ++++ rpcbind-1.2.5/src/rpcb_svc_com.c 2019-11-11 09:50:09.050438602 -0500 +@@ -42,7 +42,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff -up rpcbind-1.2.5/src/rpcinfo.c.orig rpcbind-1.2.5/src/rpcinfo.c +--- rpcbind-1.2.5/src/rpcinfo.c.orig 2018-08-15 10:51:19.000000000 -0400 ++++ rpcbind-1.2.5/src/rpcinfo.c 2019-11-11 09:50:09.052438613 -0500 +@@ -693,11 +693,11 @@ reply_proc (res, who, nconf) + } + if (!(uaddr = taddr2uaddr (nconf, who))) + { +- uaddr = UNKNOWN; ++ printf ("%s\t%s\n", UNKNOWN, hostname); ++ } else { ++ printf ("%s\t%s\n", uaddr, hostname); ++ free ((char *) uaddr); + } +- printf ("%s\t%s\n", uaddr, hostname); +- if (strcmp (uaddr, UNKNOWN)) +- free ((char *) uaddr); + return (FALSE); + } + +@@ -973,6 +973,7 @@ rpcbdump (dumptype, netid, argc, argv) + (" program version(s) netid(s) service owner\n"); + for (rs = rs_head; rs; rs = rs->next) + { ++ size_t netidmax = sizeof(buf) - 1; + char *p = buf; + + printf ("%10ld ", rs->prog); +@@ -985,12 +986,22 @@ rpcbdump (dumptype, netid, argc, argv) + } + printf ("%-10s", buf); + buf[0] = '\0'; +- for (nl = rs->nlist; nl; nl = nl->next) +- { +- strcat (buf, nl->netid); +- if (nl->next) +- strcat (buf, ","); +- } ++ ++ for (nl = rs->nlist; nl; nl = nl->next) ++ { ++ strncat (buf, nl->netid, netidmax); ++ if (strlen (nl->netid) < netidmax) ++ netidmax -= strlen(nl->netid); ++ else ++ break; ++ ++ if (nl->next && netidmax > 1) ++ { ++ strncat (buf, ",", netidmax); ++ netidmax --; ++ } ++ } ++ + printf ("%-32s", buf); + rpc = getrpcbynumber (rs->prog); + if (rpc) +diff -up rpcbind-1.2.5/src/util.c.orig rpcbind-1.2.5/src/util.c +--- rpcbind-1.2.5/src/util.c.orig 2018-08-15 10:51:19.000000000 -0400 ++++ rpcbind-1.2.5/src/util.c 2019-11-11 09:50:09.051438608 -0500 +@@ -45,7 +45,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -103,7 +103,7 @@ char * + addrmerge(struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr, + char *netid) + { +- struct ifaddrs *ifap, *ifp = NULL, *bestif; ++ struct ifaddrs *ifap, *ifp = NULL, *bestif, *exactif; + struct netbuf *serv_nbp = NULL, *hint_nbp = NULL, tbuf; + struct sockaddr *caller_sa, *hint_sa, *ifsa, *ifmasksa, *serv_sa; + struct sockaddr_storage ss; +@@ -157,7 +157,10 @@ addrmerge(struct netbuf *caller, char *s + * network portion of its address is equal to that of the client. + * If so, we have found the interface that we want to use. + */ +- bestif = NULL; ++ bestif = NULL; /* first interface UP with same network & family */ ++ exactif = NULL; /* the interface requested by the client */ ++ u_int8_t maskAllAddrBits[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, ++ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; /* 16 bytes for IPv6 */ + for (ifap = ifp; ifap != NULL; ifap = ifap->ifa_next) { + ifsa = ifap->ifa_addr; + ifmasksa = ifap->ifa_netmask; +@@ -175,8 +178,16 @@ addrmerge(struct netbuf *caller, char *s + if (!bitmaskcmp(&SA2SINADDR(ifsa), + &SA2SINADDR(hint_sa), &SA2SINADDR(ifmasksa), + sizeof(struct in_addr))) { +- bestif = ifap; +- goto found; ++ if(!bestif) /* for compatibility with previous code */ ++ bestif = ifap; ++ /* Is this an exact match? */ ++ if (!bitmaskcmp(&SA2SINADDR(ifsa), ++ &SA2SINADDR(hint_sa), maskAllAddrBits, ++ sizeof(struct in_addr))) { ++ exactif = ifap; ++ goto found; ++ } ++ /* else go-on looking for an exact match */ + } + break; + #ifdef INET6 +@@ -197,8 +208,16 @@ addrmerge(struct netbuf *caller, char *s + } else if (!bitmaskcmp(&SA2SIN6ADDR(ifsa), + &SA2SIN6ADDR(hint_sa), &SA2SIN6ADDR(ifmasksa), + sizeof(struct in6_addr))) { +- bestif = ifap; +- goto found; ++ if(!bestif) /* for compatibility with previous code */ ++ bestif = ifap; ++ /* Is this an exact match? */ ++ if (!bitmaskcmp(&SA2SIN6ADDR(ifsa), ++ &SA2SIN6ADDR(hint_sa), maskAllAddrBits, ++ sizeof(struct in6_addr))) { ++ exactif = ifap; ++ goto found; ++ } ++ /* else go-on looking for an exact match */ + } + break; + #endif +@@ -215,10 +234,13 @@ addrmerge(struct netbuf *caller, char *s + (bestif->ifa_flags & (IFF_LOOPBACK | IFF_POINTOPOINT)))) + bestif = ifap; + } ++ + if (bestif == NULL) + goto freeit; + + found: ++ if(exactif) ++ bestif = exactif; + /* + * Construct the new address using the the address from + * `bestif', and the port number from `serv_uaddr'. +@@ -322,9 +344,10 @@ network_init() + /* + * Now join the RPC ipv6 multicast group on all interfaces. + */ +- if (getifaddrs(&ifp) < 0) ++ if (getifaddrs(&ifp) < 0) { ++ freeaddrinfo (res); + return; +- ++ } + mreq6.ipv6mr_interface = 0; + inet_pton(AF_INET6, RPCB_MULTICAST_ADDR, &mreq6.ipv6mr_multiaddr); + +@@ -352,8 +375,8 @@ network_init() + perror("setsockopt v6 multicast"); + } + #endif +- +- /* close(s); */ ++ freeaddrinfo (res); ++ close(s); + } + + struct sockaddr * +diff -up rpcbind-1.2.5/src/warmstart.c.orig rpcbind-1.2.5/src/warmstart.c +--- rpcbind-1.2.5/src/warmstart.c.orig 2018-08-15 10:51:19.000000000 -0400 ++++ rpcbind-1.2.5/src/warmstart.c 2019-11-11 09:50:09.051438608 -0500 +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/rpcbind.spec b/rpcbind.spec index 003796b..9d780ee 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.5 -Release: 5%{?dist} +Release: 5.rc1%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -21,7 +21,7 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd coreutils -Patch001: rpcbind-1.2.5-rpcinfo-bufoverflow.patch +Patch001: rpcbind-1.2.5-rc1.patch Patch100: rpcbind-0.2.3-systemd-envfile.patch Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch @@ -122,6 +122,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Mon Nov 11 2019 Steve Dickson - 1.2.5-5.rc1 +- Updated to latest upstream RC release: rpcbind-1_2_5-rc1 (bz 1431574) + * Thu Sep 19 2019 Steve Dickson - 1.2.5-5 - Enable remote calls which are used by NIS and other packages (bz 1630672) From 2fe1941633c779e640e527e47915ed9be52a10ff Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 30 Jan 2020 17:50:04 +0000 Subject: [PATCH 23/51] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 9d780ee..2b52e71 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.5 -Release: 5.rc1%{?dist} +Release: 5.rc1%{?dist}.1 Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -122,6 +122,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Thu Jan 30 2020 Fedora Release Engineering - 1.2.5-5.rc1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Mon Nov 11 2019 Steve Dickson - 1.2.5-5.rc1 - Updated to latest upstream RC release: rpcbind-1_2_5-rc1 (bz 1431574) From c31ad06462eedb8ce849ed8b07ab8e4f937ae5d6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 05:53:35 +0000 Subject: [PATCH 24/51] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 2b52e71..806921b 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.5 -Release: 5.rc1%{?dist}.1 +Release: 5.rc1%{?dist}.2 Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -122,6 +122,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 1.2.5-5.rc1.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Thu Jan 30 2020 Fedora Release Engineering - 1.2.5-5.rc1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 43178e7a5b2cfc5aac26bb243d70c1d95a57859d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 1 Aug 2020 07:55:23 +0000 Subject: [PATCH 25/51] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 806921b..64ac130 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.5 -Release: 5.rc1%{?dist}.2 +Release: 5.rc1%{?dist}.3 Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -122,6 +122,10 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Sat Aug 01 2020 Fedora Release Engineering - 1.2.5-5.rc1.3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 1.2.5-5.rc1.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 37c6c9056d3b404a018b47c19a3eb45584593a52 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 8 Jan 2021 20:52:58 +0000 Subject: [PATCH 26/51] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- rpcbind.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/rpcbind.spec b/rpcbind.spec index 64ac130..1e6ea7d 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -14,6 +14,7 @@ Source1: %{name}.sysconfig Requires: glibc-common setup Conflicts: man-pages < 2.43-12 +BuildRequires: make BuildRequires: automake, autoconf, libtool, systemd, systemd-devel BuildRequires: libtirpc-devel, quota-devel Requires(pre): coreutils shadow-utils From 106cdc10577fd8c1082a42afc0d3f8ea0bc85612 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 15:25:37 +0000 Subject: [PATCH 27/51] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 1e6ea7d..83507c4 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.5 -Release: 5.rc1%{?dist}.3 +Release: 5.rc1%{?dist}.4 Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -123,6 +123,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.2.5-5.rc1.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Sat Aug 01 2020 Fedora Release Engineering - 1.2.5-5.rc1.3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 3d509e2d2cf162f25bc9052c8ae0119e5d91bb95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:12:51 +0100 Subject: [PATCH 28/51] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- rpcbind.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 83507c4..82b8f8c 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.5 -Release: 5.rc1%{?dist}.4 +Release: 5.rc1%{?dist}.5 Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -123,6 +123,10 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Tue Mar 02 2021 Zbigniew JÄ™drzejewski-Szmek - 1.2.5-5.rc1.5 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Wed Jan 27 2021 Fedora Release Engineering - 1.2.5-5.rc1.4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From e7af3ee1411296227097e6c534c3edf4b8ead3ea Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 18 May 2021 13:20:27 -0400 Subject: [PATCH 29/51] Updated to latest upstream release: rpcbind-1_2_6 (bz 1959127) Signed-off-by: Steve Dickson --- .gitignore | 4 +- rpcbind-1.2.5-rc1.patch | 249 ---------------------------------------- rpcbind.spec | 11 +- sources | 2 +- 4 files changed, 8 insertions(+), 258 deletions(-) delete mode 100644 rpcbind-1.2.5-rc1.patch diff --git a/.gitignore b/.gitignore index 4b7a895..f5d986e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ x86_64 Makefile -/rpcbind-1.2.5.tar.bz2 -rpcbind-1.2.5/ +/rpcbind-1.2.6.tar.bz2 +rpcbind-1.2.6/ diff --git a/rpcbind-1.2.5-rc1.patch b/rpcbind-1.2.5-rc1.patch deleted file mode 100644 index 6d09254..0000000 --- a/rpcbind-1.2.5-rc1.patch +++ /dev/null @@ -1,249 +0,0 @@ -diff -up rpcbind-1.2.5/src/pmap_svc.c.orig rpcbind-1.2.5/src/pmap_svc.c ---- rpcbind-1.2.5/src/pmap_svc.c.orig 2018-08-15 10:51:19.000000000 -0400 -+++ rpcbind-1.2.5/src/pmap_svc.c 2019-11-11 09:50:09.051438608 -0500 -@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)pmap_svc.c 1 - #include - #include - #include -+#include - #include - #include - #include -diff -up rpcbind-1.2.5/src/rpcbind.c.orig rpcbind-1.2.5/src/rpcbind.c ---- rpcbind-1.2.5/src/rpcbind.c.orig 2018-08-15 10:51:19.000000000 -0400 -+++ rpcbind-1.2.5/src/rpcbind.c 2019-11-11 09:50:09.050438602 -0500 -@@ -42,11 +42,10 @@ - - #include - #include --#include - #include - #include - #include --#include -+#include - #include - #include - #include -@@ -340,7 +339,7 @@ init_transport(struct netconfig *nconf) - { - int fd = -1; - struct t_bind taddr; -- struct addrinfo hints, *res; -+ struct addrinfo hints, *res = NULL; - struct __rpc_sockinfo si; - SVCXPRT *my_xprt = NULL; - int status; /* bound checking ? */ -@@ -817,8 +816,12 @@ got_socket: - } - #endif - -+ if (res != NULL) -+ freeaddrinfo(res); - return (0); - error: -+ if (res != NULL) -+ freeaddrinfo(res); - close(fd); - return (1); - } -diff -up rpcbind-1.2.5/src/rpcb_stat.c.orig rpcbind-1.2.5/src/rpcb_stat.c ---- rpcbind-1.2.5/src/rpcb_stat.c.orig 2018-08-15 10:51:19.000000000 -0400 -+++ rpcbind-1.2.5/src/rpcb_stat.c 2019-11-11 09:50:09.051438608 -0500 -@@ -151,7 +151,7 @@ rpcbs_rmtcall(rpcvers_t rtype, rpcproc_t - rpcbs_rmtcalllist *rl; - struct netconfig *nconf; - -- if (rtype > RPCBVERS_STAT) -+ if (rtype >= RPCBVERS_STAT) - return; - for (rl = inf[rtype].rmtinfo; rl; rl = rl->next) { - -diff -up rpcbind-1.2.5/src/rpcb_svc_com.c.orig rpcbind-1.2.5/src/rpcb_svc_com.c ---- rpcbind-1.2.5/src/rpcb_svc_com.c.orig 2018-08-15 10:51:19.000000000 -0400 -+++ rpcbind-1.2.5/src/rpcb_svc_com.c 2019-11-11 09:50:09.050438602 -0500 -@@ -42,7 +42,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff -up rpcbind-1.2.5/src/rpcinfo.c.orig rpcbind-1.2.5/src/rpcinfo.c ---- rpcbind-1.2.5/src/rpcinfo.c.orig 2018-08-15 10:51:19.000000000 -0400 -+++ rpcbind-1.2.5/src/rpcinfo.c 2019-11-11 09:50:09.052438613 -0500 -@@ -693,11 +693,11 @@ reply_proc (res, who, nconf) - } - if (!(uaddr = taddr2uaddr (nconf, who))) - { -- uaddr = UNKNOWN; -+ printf ("%s\t%s\n", UNKNOWN, hostname); -+ } else { -+ printf ("%s\t%s\n", uaddr, hostname); -+ free ((char *) uaddr); - } -- printf ("%s\t%s\n", uaddr, hostname); -- if (strcmp (uaddr, UNKNOWN)) -- free ((char *) uaddr); - return (FALSE); - } - -@@ -973,6 +973,7 @@ rpcbdump (dumptype, netid, argc, argv) - (" program version(s) netid(s) service owner\n"); - for (rs = rs_head; rs; rs = rs->next) - { -+ size_t netidmax = sizeof(buf) - 1; - char *p = buf; - - printf ("%10ld ", rs->prog); -@@ -985,12 +986,22 @@ rpcbdump (dumptype, netid, argc, argv) - } - printf ("%-10s", buf); - buf[0] = '\0'; -- for (nl = rs->nlist; nl; nl = nl->next) -- { -- strcat (buf, nl->netid); -- if (nl->next) -- strcat (buf, ","); -- } -+ -+ for (nl = rs->nlist; nl; nl = nl->next) -+ { -+ strncat (buf, nl->netid, netidmax); -+ if (strlen (nl->netid) < netidmax) -+ netidmax -= strlen(nl->netid); -+ else -+ break; -+ -+ if (nl->next && netidmax > 1) -+ { -+ strncat (buf, ",", netidmax); -+ netidmax --; -+ } -+ } -+ - printf ("%-32s", buf); - rpc = getrpcbynumber (rs->prog); - if (rpc) -diff -up rpcbind-1.2.5/src/util.c.orig rpcbind-1.2.5/src/util.c ---- rpcbind-1.2.5/src/util.c.orig 2018-08-15 10:51:19.000000000 -0400 -+++ rpcbind-1.2.5/src/util.c 2019-11-11 09:50:09.051438608 -0500 -@@ -45,7 +45,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -@@ -103,7 +103,7 @@ char * - addrmerge(struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr, - char *netid) - { -- struct ifaddrs *ifap, *ifp = NULL, *bestif; -+ struct ifaddrs *ifap, *ifp = NULL, *bestif, *exactif; - struct netbuf *serv_nbp = NULL, *hint_nbp = NULL, tbuf; - struct sockaddr *caller_sa, *hint_sa, *ifsa, *ifmasksa, *serv_sa; - struct sockaddr_storage ss; -@@ -157,7 +157,10 @@ addrmerge(struct netbuf *caller, char *s - * network portion of its address is equal to that of the client. - * If so, we have found the interface that we want to use. - */ -- bestif = NULL; -+ bestif = NULL; /* first interface UP with same network & family */ -+ exactif = NULL; /* the interface requested by the client */ -+ u_int8_t maskAllAddrBits[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; /* 16 bytes for IPv6 */ - for (ifap = ifp; ifap != NULL; ifap = ifap->ifa_next) { - ifsa = ifap->ifa_addr; - ifmasksa = ifap->ifa_netmask; -@@ -175,8 +178,16 @@ addrmerge(struct netbuf *caller, char *s - if (!bitmaskcmp(&SA2SINADDR(ifsa), - &SA2SINADDR(hint_sa), &SA2SINADDR(ifmasksa), - sizeof(struct in_addr))) { -- bestif = ifap; -- goto found; -+ if(!bestif) /* for compatibility with previous code */ -+ bestif = ifap; -+ /* Is this an exact match? */ -+ if (!bitmaskcmp(&SA2SINADDR(ifsa), -+ &SA2SINADDR(hint_sa), maskAllAddrBits, -+ sizeof(struct in_addr))) { -+ exactif = ifap; -+ goto found; -+ } -+ /* else go-on looking for an exact match */ - } - break; - #ifdef INET6 -@@ -197,8 +208,16 @@ addrmerge(struct netbuf *caller, char *s - } else if (!bitmaskcmp(&SA2SIN6ADDR(ifsa), - &SA2SIN6ADDR(hint_sa), &SA2SIN6ADDR(ifmasksa), - sizeof(struct in6_addr))) { -- bestif = ifap; -- goto found; -+ if(!bestif) /* for compatibility with previous code */ -+ bestif = ifap; -+ /* Is this an exact match? */ -+ if (!bitmaskcmp(&SA2SIN6ADDR(ifsa), -+ &SA2SIN6ADDR(hint_sa), maskAllAddrBits, -+ sizeof(struct in6_addr))) { -+ exactif = ifap; -+ goto found; -+ } -+ /* else go-on looking for an exact match */ - } - break; - #endif -@@ -215,10 +234,13 @@ addrmerge(struct netbuf *caller, char *s - (bestif->ifa_flags & (IFF_LOOPBACK | IFF_POINTOPOINT)))) - bestif = ifap; - } -+ - if (bestif == NULL) - goto freeit; - - found: -+ if(exactif) -+ bestif = exactif; - /* - * Construct the new address using the the address from - * `bestif', and the port number from `serv_uaddr'. -@@ -322,9 +344,10 @@ network_init() - /* - * Now join the RPC ipv6 multicast group on all interfaces. - */ -- if (getifaddrs(&ifp) < 0) -+ if (getifaddrs(&ifp) < 0) { -+ freeaddrinfo (res); - return; -- -+ } - mreq6.ipv6mr_interface = 0; - inet_pton(AF_INET6, RPCB_MULTICAST_ADDR, &mreq6.ipv6mr_multiaddr); - -@@ -352,8 +375,8 @@ network_init() - perror("setsockopt v6 multicast"); - } - #endif -- -- /* close(s); */ -+ freeaddrinfo (res); -+ close(s); - } - - struct sockaddr * -diff -up rpcbind-1.2.5/src/warmstart.c.orig rpcbind-1.2.5/src/warmstart.c ---- rpcbind-1.2.5/src/warmstart.c.orig 2018-08-15 10:51:19.000000000 -0400 -+++ rpcbind-1.2.5/src/warmstart.c 2019-11-11 09:50:09.051438608 -0500 -@@ -35,6 +35,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/rpcbind.spec b/rpcbind.spec index 82b8f8c..3b33f6b 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -3,8 +3,8 @@ %global rpcbind_state_dir %{_rundir}/rpcbind Name: rpcbind -Version: 1.2.5 -Release: 5.rc1%{?dist}.5 +Version: 1.2.6 +Release: 0%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -22,8 +22,6 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd coreutils -Patch001: rpcbind-1.2.5-rc1.patch - Patch100: rpcbind-0.2.3-systemd-envfile.patch Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch Patch102: rpcbind-0.2.4-runstatdir.patch @@ -40,8 +38,6 @@ RPC calls on a server on that machine. %prep %setup -q -# 1637562 - rpcinfo: Fix stack buffer overflow -%patch001 -p1 %patch100 -p1 %patch101 -p1 @@ -123,6 +119,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Mon May 17 2021 Steve Dickson 1.2.6-0 +- Updated to latest upstream release: rpcbind-1_2_6 (bz 1959127) + * Tue Mar 02 2021 Zbigniew JÄ™drzejewski-Szmek - 1.2.5-5.rc1.5 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. diff --git a/sources b/sources index 12c7885..638c1b1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rpcbind-1.2.5.tar.bz2) = e884c4757950ccead0f9a07f50625a63e6f18f9bfae9fcfffa3e5fa4b7a66c3a99d9fa303061848fe8211509d5456f24ff26e4579af6e161a35522268f3ef3e4 +SHA512 (rpcbind-1.2.6.tar.bz2) = fb89c61be4c533fe2e6057749d97079a2d1c9fac0d35d6be1a159a0edbf86092b3fc121f19fa920e75aac5ecdd3f59f5978e6401d5cad16cd438c977736206a7 From b6cfae01a2556527b13e3e6cac3ac1885d975361 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 11:33:51 +0000 Subject: [PATCH 30/51] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 3b33f6b..e586577 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.6 -Release: 0%{?dist} +Release: 1%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -119,6 +119,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 1.2.6-1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Mon May 17 2021 Steve Dickson 1.2.6-0 - Updated to latest upstream release: rpcbind-1_2_6 (bz 1959127) From f9cc7db67bda355f381f50c96107b69554343ce6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 17:59:37 +0000 Subject: [PATCH 31/51] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index e586577..6fed3ba 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -119,6 +119,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 1.2.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 1.2.6-1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 6101200022a26ca9f41c997bfc0ecc816d278098 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 00:59:31 +0000 Subject: [PATCH 32/51] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 6fed3ba..b6f1b69 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -119,6 +119,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 1.2.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Fri Jan 21 2022 Fedora Release Engineering - 1.2.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 85806f502e64d9f06b3c89d049dedcbe820c1eec Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 19:55:08 +0000 Subject: [PATCH 33/51] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index b6f1b69..35255b6 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -119,6 +119,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 1.2.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Jul 23 2022 Fedora Release Engineering - 1.2.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From c01c84e6ffebdd41ef0ccf5b887570b38b233e92 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 28 Feb 2023 11:21:32 -0500 Subject: [PATCH 34/51] Updated to latest upstream RC release: rpcbind-1_2_7-rc2 Signed-off-by: Steve Dickson --- rpcbind-0.2.3-systemd-envfile.patch | 8 ++--- rpcbind-0.2.3-systemd-tmpfiles.patch | 20 ++++++------ rpcbind-0.2.4-runstatdir.patch | 28 ++++++++--------- rpcbind-0.2.4-systemd-rundir.patch | 10 +++--- rpcbind-1.2.7-rc2.patch | 46 ++++++++++++++++++++++++++++ rpcbind.spec | 10 +++++- 6 files changed, 88 insertions(+), 34 deletions(-) create mode 100644 rpcbind-1.2.7-rc2.patch diff --git a/rpcbind-0.2.3-systemd-envfile.patch b/rpcbind-0.2.3-systemd-envfile.patch index 2bfc248..60da4c6 100644 --- a/rpcbind-0.2.3-systemd-envfile.patch +++ b/rpcbind-0.2.3-systemd-envfile.patch @@ -1,11 +1,11 @@ -diff -up rpcbind-0.2.4/systemd/rpcbind.service.in.orig rpcbind-0.2.4/systemd/rpcbind.service.in ---- rpcbind-0.2.4/systemd/rpcbind.service.in.orig 2017-12-16 15:49:07.830889473 -0500 -+++ rpcbind-0.2.4/systemd/rpcbind.service.in 2017-12-16 15:49:43.156610673 -0500 +diff -up rpcbind-1.2.6/systemd/rpcbind.service.in.orig rpcbind-1.2.6/systemd/rpcbind.service.in +--- rpcbind-1.2.6/systemd/rpcbind.service.in.orig 2022-07-12 16:18:16.272919592 -0400 ++++ rpcbind-1.2.6/systemd/rpcbind.service.in 2022-07-12 16:19:14.153189756 -0400 @@ -12,6 +12,7 @@ Wants=rpcbind.target [Service] Type=notify # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. +EnvironmentFile=/etc/sysconfig/rpcbind - ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f + ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f [Install] diff --git a/rpcbind-0.2.3-systemd-tmpfiles.patch b/rpcbind-0.2.3-systemd-tmpfiles.patch index b9a8457..f574fdf 100644 --- a/rpcbind-0.2.3-systemd-tmpfiles.patch +++ b/rpcbind-0.2.3-systemd-tmpfiles.patch @@ -1,7 +1,7 @@ -diff -up rpcbind-1.2.5/configure.ac.orig rpcbind-1.2.5/configure.ac ---- rpcbind-1.2.5/configure.ac.orig 2018-08-15 10:51:19.000000000 -0400 -+++ rpcbind-1.2.5/configure.ac 2018-08-15 11:14:23.933946110 -0400 -@@ -56,6 +56,17 @@ AC_ARG_WITH([systemdsystemunitdir], +diff -up rpcbind-1.2.6/configure.ac.orig rpcbind-1.2.6/configure.ac +--- rpcbind-1.2.6/configure.ac.orig 2022-07-12 16:21:09.682728993 -0400 ++++ rpcbind-1.2.6/configure.ac 2022-07-12 16:21:41.137875815 -0400 +@@ -62,6 +62,17 @@ AC_ARG_WITH([systemdsystemunitdir], fi AM_CONDITIONAL(SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) @@ -19,9 +19,9 @@ diff -up rpcbind-1.2.5/configure.ac.orig rpcbind-1.2.5/configure.ac AS_IF([test x$enable_libwrap = xyes], [ AC_CHECK_LIB([wrap], [hosts_access], , AC_MSG_ERROR([libwrap support requested but unable to find libwrap])) -diff -up rpcbind-1.2.5/Makefile.am.orig rpcbind-1.2.5/Makefile.am ---- rpcbind-1.2.5/Makefile.am.orig 2018-08-15 10:51:19.000000000 -0400 -+++ rpcbind-1.2.5/Makefile.am 2018-08-15 11:14:23.934946111 -0400 +diff -up rpcbind-1.2.6/Makefile.am.orig rpcbind-1.2.6/Makefile.am +--- rpcbind-1.2.6/Makefile.am.orig 2021-05-10 13:10:19.000000000 -0400 ++++ rpcbind-1.2.6/Makefile.am 2022-07-12 16:21:41.137875815 -0400 @@ -59,6 +59,9 @@ rpcbind_LDADD += $(SYSTEMD_LIBS) systemdsystemunit_DATA = \ systemd/rpcbind.service \ @@ -32,9 +32,9 @@ diff -up rpcbind-1.2.5/Makefile.am.orig rpcbind-1.2.5/Makefile.am endif rpcinfo_SOURCES = src/rpcinfo.c -diff -up rpcbind-1.2.5/systemd/rpcbind.conf.orig rpcbind-1.2.5/systemd/rpcbind.conf ---- rpcbind-1.2.5/systemd/rpcbind.conf.orig 2018-08-15 11:14:23.934946111 -0400 -+++ rpcbind-1.2.5/systemd/rpcbind.conf 2018-08-15 11:14:23.934946111 -0400 +diff -up rpcbind-1.2.6/systemd/rpcbind.conf.orig rpcbind-1.2.6/systemd/rpcbind.conf +--- rpcbind-1.2.6/systemd/rpcbind.conf.orig 2022-07-12 16:21:41.137875815 -0400 ++++ rpcbind-1.2.6/systemd/rpcbind.conf 2022-07-12 16:21:41.137875815 -0400 @@ -0,0 +1,2 @@ +#Type Path Mode UID GID Age Argument +D /run/rpcbind 0700 rpc rpc - - diff --git a/rpcbind-0.2.4-runstatdir.patch b/rpcbind-0.2.4-runstatdir.patch index 90c1dae..462cf39 100644 --- a/rpcbind-0.2.4-runstatdir.patch +++ b/rpcbind-0.2.4-runstatdir.patch @@ -1,7 +1,7 @@ -diff -up rpcbind-1.2.5/configure.ac.orig rpcbind-1.2.5/configure.ac ---- rpcbind-1.2.5/configure.ac.orig 2018-08-15 11:15:14.188974027 -0400 -+++ rpcbind-1.2.5/configure.ac 2018-08-15 11:15:44.948991114 -0400 -@@ -26,8 +26,8 @@ AC_ARG_ENABLE([rmtcalls], +diff -up rpcbind-1.2.6/configure.ac.orig rpcbind-1.2.6/configure.ac +--- rpcbind-1.2.6/configure.ac.orig 2022-07-12 16:23:15.409315832 -0400 ++++ rpcbind-1.2.6/configure.ac 2022-07-12 16:23:33.242399069 -0400 +@@ -32,8 +32,8 @@ AC_ARG_ENABLE([rmtcalls], AM_CONDITIONAL(RMTCALLS, test x$enable_rmtcalls = xyes) AC_ARG_WITH([statedir], @@ -12,9 +12,9 @@ diff -up rpcbind-1.2.5/configure.ac.orig rpcbind-1.2.5/configure.ac AC_SUBST([statedir], [$with_statedir]) AC_ARG_WITH([rpcuser], -diff -up rpcbind-1.2.5/configure.orig rpcbind-1.2.5/configure ---- rpcbind-1.2.5/configure.orig 2018-08-15 11:00:32.000000000 -0400 -+++ rpcbind-1.2.5/configure 2018-08-15 11:15:44.951991115 -0400 +diff -up rpcbind-1.2.6/configure.orig rpcbind-1.2.6/configure +--- rpcbind-1.2.6/configure.orig 2021-05-10 13:13:18.000000000 -0400 ++++ rpcbind-1.2.6/configure 2022-07-12 16:23:33.244399078 -0400 @@ -1391,7 +1391,7 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -33,9 +33,9 @@ diff -up rpcbind-1.2.5/configure.orig rpcbind-1.2.5/configure fi statedir=$with_statedir -diff -up rpcbind-1.2.5/man/rpcbind-fr.8.orig rpcbind-1.2.5/man/rpcbind-fr.8 ---- rpcbind-1.2.5/man/rpcbind-fr.8.orig 2018-08-15 10:51:19.000000000 -0400 -+++ rpcbind-1.2.5/man/rpcbind-fr.8 2018-08-15 11:15:44.951991115 -0400 +diff -up rpcbind-1.2.6/man/rpcbind-fr.8.orig rpcbind-1.2.6/man/rpcbind-fr.8 +--- rpcbind-1.2.6/man/rpcbind-fr.8.orig 2021-05-10 13:10:19.000000000 -0400 ++++ rpcbind-1.2.6/man/rpcbind-fr.8 2022-07-12 16:23:33.244399078 -0400 @@ -138,8 +138,8 @@ est redémarré. .Xr rpcbind 3 , .Xr rpcinfo 8 @@ -47,10 +47,10 @@ diff -up rpcbind-1.2.5/man/rpcbind-fr.8.orig rpcbind-1.2.5/man/rpcbind-fr.8 .Sh TRADUCTION Aurelien CHARBON (Sept 2003) .El -diff -up rpcbind-1.2.5/src/rpcbind.c.orig rpcbind-1.2.5/src/rpcbind.c ---- rpcbind-1.2.5/src/rpcbind.c.orig 2018-08-15 10:51:19.000000000 -0400 -+++ rpcbind-1.2.5/src/rpcbind.c 2018-08-15 11:15:44.952991116 -0400 -@@ -106,7 +106,7 @@ char *nss_modules = "files"; +diff -up rpcbind-1.2.6/src/rpcbind.c.orig rpcbind-1.2.6/src/rpcbind.c +--- rpcbind-1.2.6/src/rpcbind.c.orig 2022-07-12 16:23:15.407315823 -0400 ++++ rpcbind-1.2.6/src/rpcbind.c 2022-07-12 16:23:33.244399078 -0400 +@@ -105,7 +105,7 @@ char *nss_modules = "files"; /* who to suid to if -s is given */ #define RUN_AS "daemon" diff --git a/rpcbind-0.2.4-systemd-rundir.patch b/rpcbind-0.2.4-systemd-rundir.patch index da08d7a..a3dc01f 100644 --- a/rpcbind-0.2.4-systemd-rundir.patch +++ b/rpcbind-0.2.4-systemd-rundir.patch @@ -1,7 +1,7 @@ -diff -up rpcbind-0.2.4/src/rpcbind.c.orig rpcbind-0.2.4/src/rpcbind.c ---- rpcbind-0.2.4/src/rpcbind.c.orig 2017-03-21 10:12:35.005190509 -0400 -+++ rpcbind-0.2.4/src/rpcbind.c 2017-03-21 10:36:45.510507649 -0400 -@@ -144,6 +144,8 @@ static void rbllist_add(rpcprog_t, rpcve +diff -up rpcbind-1.2.6/src/rpcbind.c.orig rpcbind-1.2.6/src/rpcbind.c +--- rpcbind-1.2.6/src/rpcbind.c.orig 2022-07-12 16:25:36.422972803 -0400 ++++ rpcbind-1.2.6/src/rpcbind.c 2022-07-12 16:26:00.679085433 -0400 +@@ -143,6 +143,8 @@ static void rbllist_add(rpcprog_t, rpcve static void terminate(int); static void parseargs(int, char *[]); @@ -10,7 +10,7 @@ diff -up rpcbind-0.2.4/src/rpcbind.c.orig rpcbind-0.2.4/src/rpcbind.c int main(int argc, char *argv[]) { -@@ -151,13 +153,21 @@ main(int argc, char *argv[]) +@@ -150,13 +152,21 @@ main(int argc, char *argv[]) void *nc_handle; /* Net config handle */ struct rlimit rl; int maxrec = RPC_MAXDATASIZE; diff --git a/rpcbind-1.2.7-rc2.patch b/rpcbind-1.2.7-rc2.patch new file mode 100644 index 0000000..4c1749d --- /dev/null +++ b/rpcbind-1.2.7-rc2.patch @@ -0,0 +1,46 @@ +diff --git a/configure.ac b/configure.ac +index c0ef896..c2069a2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -20,6 +20,12 @@ AM_CONDITIONAL(LIBSETDEBUG, test x$lib_setdebug = xyes) + AC_ARG_ENABLE([warmstarts], + AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts @<:@default=no@:>@])) + AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes) ++AS_IF([test x$enable_warmstarts = xyes], [ ++ warmstarts_opt=-w ++], [ ++ warmstarts_opt= ++]) ++AC_SUBST([warmstarts_opt], [$warmstarts_opt]) + + AC_ARG_ENABLE([rmtcalls], + AS_HELP_STRING([--enable-rmtcalls], [Enables Remote Calls @<:@default=no@:>@])) +diff --git a/src/rpcbind.c b/src/rpcbind.c +index 25d8a90..ecebe97 100644 +--- a/src/rpcbind.c ++++ b/src/rpcbind.c +@@ -552,8 +552,10 @@ init_transport(struct netconfig *nconf) + syslog(LOG_ERR, "cannot bind %s on %s: %m", + (hosts[nhostsbak] == NULL) ? "*" : + hosts[nhostsbak], nconf->nc_netid); +- if (res != NULL) ++ if (res != NULL) { + freeaddrinfo(res); ++ res = NULL; ++ } + continue; + } else + checkbind++; +diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in +index 7b1c74b..c892ca8 100644 +--- a/systemd/rpcbind.service.in ++++ b/systemd/rpcbind.service.in +@@ -12,7 +12,7 @@ Wants=rpcbind.target + [Service] + Type=notify + # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. +-ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f ++ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f + + [Install] + WantedBy=multi-user.target diff --git a/rpcbind.spec b/rpcbind.spec index 35255b6..c09d0ac 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.6 -Release: 4%{?dist} +Release: 4.rc2%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -22,6 +22,8 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd coreutils +Patch001: rpcbind-1.2.7-rc2.patch + Patch100: rpcbind-0.2.3-systemd-envfile.patch Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch Patch102: rpcbind-0.2.4-runstatdir.patch @@ -39,11 +41,14 @@ RPC calls on a server on that machine. %prep %setup -q +%patch001 -p1 + %patch100 -p1 %patch101 -p1 %patch102 -p1 %patch103 -p1 %patch104 -p1 + %build autoreconf -fisv %configure \ @@ -119,6 +124,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Tue Feb 28 2023 Steve Dickson 1.2.6-4.rc2 +- Updated to latest upstream RC release: rpcbind-1_2_7-rc2 + * Fri Jan 20 2023 Fedora Release Engineering - 1.2.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 8dc2f3003d8da39b7104b8901d6c3b2463844ade Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 17:02:39 +0000 Subject: [PATCH 35/51] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index c09d0ac..7f240b4 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.6 -Release: 4.rc2%{?dist} +Release: 4.rc2%{?dist}.1 Summary: Universal Addresses to RPC Program Number Mapper License: BSD URL: http://nfsv4.bullopensource.org @@ -124,6 +124,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 1.2.6-4.rc2.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Feb 28 2023 Steve Dickson 1.2.6-4.rc2 - Updated to latest upstream RC release: rpcbind-1_2_7-rc2 From 46ccf3be73f088fde768e1acab402bd7de6694fa Mon Sep 17 00:00:00 2001 From: Pavel Reichl Date: Mon, 16 Oct 2023 05:20:43 +0200 Subject: [PATCH 36/51] Convert License tag to SPDX format Related: https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_2 Signed-off-by: Pavel Reichl --- rpcbind.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rpcbind.spec b/rpcbind.spec index 7f240b4..c5982aa 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,9 +4,9 @@ Name: rpcbind Version: 1.2.6 -Release: 4.rc2%{?dist}.1 +Release: 4.rc2%{?dist}.2 Summary: Universal Addresses to RPC Program Number Mapper -License: BSD +License: BSD-3-Clause URL: http://nfsv4.bullopensource.org Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2 @@ -124,6 +124,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Mon Oct 16 2023 Pavel Reichl - 1.2.6-4.rc2.2 +- Convert License tag to SPDX format + * Fri Jul 21 2023 Fedora Release Engineering - 1.2.6-4.rc2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 44324f80acba67617df81bfdc68b40db606db8e1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 11:56:13 +0000 Subject: [PATCH 37/51] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index c5982aa..8f11356 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.6 -Release: 4.rc2%{?dist}.2 +Release: 4.rc2%{?dist}.3 Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -124,6 +124,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 1.2.6-4.rc2.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Oct 16 2023 Pavel Reichl - 1.2.6-4.rc2.2 - Convert License tag to SPDX format From dff6ecad48f78c6379a3985514d197c4a8f40908 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 15:45:44 +0000 Subject: [PATCH 38/51] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 8f11356..2daefb1 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.6 -Release: 4.rc2%{?dist}.3 +Release: 4.rc2%{?dist}.4 Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -124,6 +124,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Fri Jan 26 2024 Fedora Release Engineering - 1.2.6-4.rc2.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Jan 22 2024 Fedora Release Engineering - 1.2.6-4.rc2.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 48fb6226edcec04ba17e396bc5ff40a1ee953c77 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Mon, 18 Mar 2024 16:30:45 -0400 Subject: [PATCH 39/51] Updated to latest upstream RC release: rpcbind-1_2_7-rc3 Signed-off-by: Steve Dickson --- rpcbind-1.2.7-rc3.patch | 177 ++++++++++++++++++++++++++++++++++++++++ rpcbind.spec | 19 +++-- 2 files changed, 188 insertions(+), 8 deletions(-) create mode 100644 rpcbind-1.2.7-rc3.patch diff --git a/rpcbind-1.2.7-rc3.patch b/rpcbind-1.2.7-rc3.patch new file mode 100644 index 0000000..3e11c03 --- /dev/null +++ b/rpcbind-1.2.7-rc3.patch @@ -0,0 +1,177 @@ +diff --git a/configure.ac b/configure.ac +index c0ef896..573e4fd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -20,6 +20,12 @@ AM_CONDITIONAL(LIBSETDEBUG, test x$lib_setdebug = xyes) + AC_ARG_ENABLE([warmstarts], + AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts @<:@default=no@:>@])) + AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes) ++AS_IF([test x$enable_warmstarts = xyes], [ ++ warmstarts_opt=-w ++], [ ++ warmstarts_opt= ++]) ++AC_SUBST([warmstarts_opt], [$warmstarts_opt]) + + AC_ARG_ENABLE([rmtcalls], + AS_HELP_STRING([--enable-rmtcalls], [Enables Remote Calls @<:@default=no@:>@])) +@@ -44,6 +50,17 @@ AC_SUBST([nss_modules], [$with_nss_modules]) + + PKG_CHECK_MODULES([TIRPC], [libtirpc]) + ++CPPFLAGS=$TIRPC_CFLAGS ++AC_MSG_CHECKING([for abstract socket support in libtirpc]) ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ++#include ++],[ ++char *path = _PATH_RPCBINDSOCK_ABSTRACT; ++])], [have_abstract=yes], [have_abstract=no]) ++CPPFLAGS= ++AC_MSG_RESULT([$have_abstract]) ++AM_CONDITIONAL(ABSTRACT, [ test "x$have_abstract" = "xyes" ]) ++ + PKG_PROG_PKG_CONFIG + AC_ARG_WITH([systemdsystemunitdir], + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), +@@ -70,4 +87,4 @@ AC_CHECK_HEADERS([nss.h]) + AC_SUBST([_sbindir]) + AC_CONFIG_COMMANDS_PRE([eval eval _sbindir=$sbindir]) + +-AC_OUTPUT([Makefile systemd/rpcbind.service]) ++AC_OUTPUT([Makefile systemd/rpcbind.service systemd/rpcbind.socket]) +diff --git a/src/rpcbind.c b/src/rpcbind.c +index 25d8a90..ecebe97 100644 +--- a/src/rpcbind.c ++++ b/src/rpcbind.c +@@ -552,8 +552,10 @@ init_transport(struct netconfig *nconf) + syslog(LOG_ERR, "cannot bind %s on %s: %m", + (hosts[nhostsbak] == NULL) ? "*" : + hosts[nhostsbak], nconf->nc_netid); +- if (res != NULL) ++ if (res != NULL) { + freeaddrinfo(res); ++ res = NULL; ++ } + continue; + } else + checkbind++; +diff --git a/src/rpcinfo.c b/src/rpcinfo.c +index 0e14f78..006057a 100644 +--- a/src/rpcinfo.c ++++ b/src/rpcinfo.c +@@ -311,29 +311,17 @@ main (int argc, char **argv) + return (0); + } + ++/* Evaluate to actual length of the `sockaddr_un' structure, whether ++ * abstract or not. ++ */ ++#include ++#define SUN_LEN_A(ptr) (offsetof(struct sockaddr_un, sun_path) \ ++ + 1 + strlen((ptr)->sun_path + 1)) ++ + static CLIENT * + local_rpcb (rpcprog_t prog, rpcvers_t vers) + { +-#if 0 +- void *localhandle; +- struct netconfig *nconf; + CLIENT *clnt; +- +- localhandle = setnetconfig(); +- while ((nconf = getnetconfig(localhandle)) != NULL) { +- if (nconf->nc_protofmly != NULL && +- strcmp(nconf->nc_protofmly, NC_LOOPBACK) == 0) +- break; +- } +- if (nconf == NULL) { +- warnx("getnetconfig: %s", nc_sperror()); +- return (NULL); +- } +- +- clnt = clnt_tp_create (/* "localhost"*/ NULL, prog, vers, nconf); +- endnetconfig(localhandle); +- return clnt; +-#else + struct netbuf nbuf; + struct sockaddr_un sun; + int sock; +@@ -344,13 +332,26 @@ local_rpcb (rpcprog_t prog, rpcvers_t vers) + return NULL; + + sun.sun_family = AF_LOCAL; ++ ++#ifdef _PATH_RPCBINDSOCK_ABSTRACT ++ memcpy(sun.sun_path, _PATH_RPCBINDSOCK_ABSTRACT, ++ sizeof(_PATH_RPCBINDSOCK_ABSTRACT)); ++ nbuf.len = SUN_LEN_A (&sun); ++ nbuf.maxlen = sizeof (struct sockaddr_un); ++ nbuf.buf = &sun; ++ ++ clnt = clnt_vc_create (sock, &nbuf, prog, vers, 0, 0); ++ if (clnt) ++ return clnt; ++#endif ++ + strcpy (sun.sun_path, _PATH_RPCBINDSOCK); + nbuf.len = SUN_LEN (&sun); + nbuf.maxlen = sizeof (struct sockaddr_un); + nbuf.buf = &sun; + +- return clnt_vc_create (sock, &nbuf, prog, vers, 0, 0); +-#endif ++ clnt = clnt_vc_create (sock, &nbuf, prog, vers, 0, 0); ++ return clnt; + } + + #ifdef PORTMAP +diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in +index 7b1c74b..c892ca8 100644 +--- a/systemd/rpcbind.service.in ++++ b/systemd/rpcbind.service.in +@@ -12,7 +12,7 @@ Wants=rpcbind.target + [Service] + Type=notify + # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. +-ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f ++ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f + + [Install] + WantedBy=multi-user.target +diff --git a/systemd/rpcbind.socket b/systemd/rpcbind.socket +index 3b1a936..685341c 100644 +--- a/systemd/rpcbind.socket ++++ b/systemd/rpcbind.socket +@@ -6,6 +6,7 @@ Before=rpcbind.target + + [Socket] + ListenStream=/run/rpcbind.sock ++#ListenStream=@/run/rpcbind.sock + + # RPC netconfig can't handle ipv6/ipv4 dual sockets + BindIPv6Only=ipv6-only +diff --git a/systemd/rpcbind.socket.in b/systemd/rpcbind.socket.in +new file mode 100644 +index 0000000..5dd09a1 +--- /dev/null ++++ b/systemd/rpcbind.socket.in +@@ -0,0 +1,19 @@ ++[Unit] ++Description=RPCbind Server Activation Socket ++DefaultDependencies=no ++Wants=rpcbind.target ++Before=rpcbind.target ++ ++[Socket] ++ListenStream=/run/rpcbind.sock ++@ABSTRACT_TRUE@ListenStream=@/run/rpcbind.sock ++ ++# RPC netconfig can't handle ipv6/ipv4 dual sockets ++BindIPv6Only=ipv6-only ++ListenStream=0.0.0.0:111 ++ListenDatagram=0.0.0.0:111 ++ListenStream=[::]:111 ++ListenDatagram=[::]:111 ++ ++[Install] ++WantedBy=sockets.target diff --git a/rpcbind.spec b/rpcbind.spec index 2daefb1..2616fdb 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.6 -Release: 4.rc2%{?dist}.4 +Release: 4.rc3%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -22,7 +22,7 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd coreutils -Patch001: rpcbind-1.2.7-rc2.patch +Patch001: rpcbind-1.2.7-rc3.patch Patch100: rpcbind-0.2.3-systemd-envfile.patch Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch @@ -41,13 +41,13 @@ RPC calls on a server on that machine. %prep %setup -q -%patch001 -p1 +%patch 001 -p1 -%patch100 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 -%patch104 -p1 +%patch 100 -p1 +%patch 101 -p1 +%patch 102 -p1 +%patch 103 -p1 +%patch 104 -p1 %build autoreconf -fisv @@ -124,6 +124,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Mon Mar 18 2024 Steve Dickson 1.2.6-4.rc3 +- Updated to latest upstream RC release: rpcbind-1_2_7-rc3 + * Fri Jan 26 2024 Fedora Release Engineering - 1.2.6-4.rc2.4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 2376822f36fae2e40ef754b46f4166797af1bd3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 11 Apr 2024 13:15:26 +0200 Subject: [PATCH 40/51] Prepare for bin-sbin merge https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin Skip symlinks if they'd point to themselves. Add virtual Provides for the old paths. --- rpcbind.spec | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/rpcbind.spec b/rpcbind.spec index 2616fdb..b5986f9 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.6 -Release: 4.rc3%{?dist} +Release: 5.rc3%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -33,6 +33,14 @@ Patch104: rpcbind-0.2.4-systemd-rundir.patch Provides: portmap = %{version}-%{release} Obsoletes: portmap <= 4.0-65.3 +%if "%{_sbindir}" == "%{_bindir}" +# Compat symlinks for Requires in other packages. +# We rely on filesystem to create the symlinks for us. +Requires: filesystem(unmerged-sbin-symlinks) +Provides: /usr/sbin/rpcbind +Provides: /usr/sbin/rpcinfo +%endif + %description The rpcbind utility is a server that converts RPC program numbers into universal addresses. It must be running on the host to be able to make @@ -72,12 +80,13 @@ make DESTDIR=$RPM_BUILD_ROOT install install -m644 %{SOURCE1} %{buildroot}/etc/sysconfig/rpcbind +%if "%{_sbindir}" != "%{_bindir}" # The binaries now live in /usr/bin, moving from /usr/sbin # For compatibility create a couple symlinks. cd ${RPM_BUILD_ROOT}%{_sbindir} ln -sf ../bin/rpcbind ln -sf ../bin/rpcinfo - +%endif %pre @@ -115,8 +124,10 @@ fi %doc AUTHORS ChangeLog README %{_bindir}/rpcbind %{_bindir}/rpcinfo +%if "%{_sbindir}" != "%{_bindir}" %{_sbindir}/rpcbind %{_sbindir}/rpcinfo +%endif %{_mandir}/man8/* %{_unitdir}/%{name}.service %{_unitdir}/%{name}.socket @@ -124,6 +135,10 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Thu Apr 11 2024 Zbigniew JÄ™drzejewski-Szmek - 1.2.6-5.rc3 +- Prepare for bin-sbin merge + (https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin) + * Mon Mar 18 2024 Steve Dickson 1.2.6-4.rc3 - Updated to latest upstream RC release: rpcbind-1_2_7-rc3 From 425689735df954dc0693eddd205439759d2fb268 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 18:46:38 +0000 Subject: [PATCH 41/51] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index b5986f9..bc9bd2e 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.6 -Release: 5.rc3%{?dist} +Release: 5.rc3%{?dist}.1 Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -135,6 +135,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 1.2.6-5.rc3.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Apr 11 2024 Zbigniew JÄ™drzejewski-Szmek - 1.2.6-5.rc3 - Prepare for bin-sbin merge (https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin) From fc619cdcef7a6bd76c6b16630e75763fb197a6f9 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Fri, 26 Jul 2024 08:25:52 -0400 Subject: [PATCH 42/51] Updated to latest upstream release: rpcbind-1.2.7 Signed-off-by: Steve Dickson --- .gitignore | 4 ++-- rpcbind-0.2.3-systemd-tmpfiles.patch | 20 ++++++++--------- rpcbind-0.2.4-runstatdir.patch | 32 ++++++++++++++-------------- rpcbind.spec | 11 +++++----- sources | 2 +- 5 files changed, 34 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index f5d986e..0cd980a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ x86_64 Makefile -/rpcbind-1.2.6.tar.bz2 -rpcbind-1.2.6/ +rpcbind-1.2.7/ +/rpcbind-1.2.7.tar.bz2 diff --git a/rpcbind-0.2.3-systemd-tmpfiles.patch b/rpcbind-0.2.3-systemd-tmpfiles.patch index f574fdf..20f57b1 100644 --- a/rpcbind-0.2.3-systemd-tmpfiles.patch +++ b/rpcbind-0.2.3-systemd-tmpfiles.patch @@ -1,7 +1,7 @@ -diff -up rpcbind-1.2.6/configure.ac.orig rpcbind-1.2.6/configure.ac ---- rpcbind-1.2.6/configure.ac.orig 2022-07-12 16:21:09.682728993 -0400 -+++ rpcbind-1.2.6/configure.ac 2022-07-12 16:21:41.137875815 -0400 -@@ -62,6 +62,17 @@ AC_ARG_WITH([systemdsystemunitdir], +diff -up rpcbind-1.2.7/configure.ac.orig rpcbind-1.2.7/configure.ac +--- rpcbind-1.2.7/configure.ac.orig 2024-07-25 11:55:23.000000000 -0400 ++++ rpcbind-1.2.7/configure.ac 2024-07-25 16:55:38.334208493 -0400 +@@ -73,6 +73,17 @@ AC_ARG_WITH([systemdsystemunitdir], fi AM_CONDITIONAL(SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) @@ -19,9 +19,9 @@ diff -up rpcbind-1.2.6/configure.ac.orig rpcbind-1.2.6/configure.ac AS_IF([test x$enable_libwrap = xyes], [ AC_CHECK_LIB([wrap], [hosts_access], , AC_MSG_ERROR([libwrap support requested but unable to find libwrap])) -diff -up rpcbind-1.2.6/Makefile.am.orig rpcbind-1.2.6/Makefile.am ---- rpcbind-1.2.6/Makefile.am.orig 2021-05-10 13:10:19.000000000 -0400 -+++ rpcbind-1.2.6/Makefile.am 2022-07-12 16:21:41.137875815 -0400 +diff -up rpcbind-1.2.7/Makefile.am.orig rpcbind-1.2.7/Makefile.am +--- rpcbind-1.2.7/Makefile.am.orig 2024-07-25 11:55:23.000000000 -0400 ++++ rpcbind-1.2.7/Makefile.am 2024-07-25 16:55:38.335208500 -0400 @@ -59,6 +59,9 @@ rpcbind_LDADD += $(SYSTEMD_LIBS) systemdsystemunit_DATA = \ systemd/rpcbind.service \ @@ -32,9 +32,9 @@ diff -up rpcbind-1.2.6/Makefile.am.orig rpcbind-1.2.6/Makefile.am endif rpcinfo_SOURCES = src/rpcinfo.c -diff -up rpcbind-1.2.6/systemd/rpcbind.conf.orig rpcbind-1.2.6/systemd/rpcbind.conf ---- rpcbind-1.2.6/systemd/rpcbind.conf.orig 2022-07-12 16:21:41.137875815 -0400 -+++ rpcbind-1.2.6/systemd/rpcbind.conf 2022-07-12 16:21:41.137875815 -0400 +diff -up rpcbind-1.2.7/systemd/rpcbind.conf.orig rpcbind-1.2.7/systemd/rpcbind.conf +--- rpcbind-1.2.7/systemd/rpcbind.conf.orig 2024-07-25 16:55:38.335208500 -0400 ++++ rpcbind-1.2.7/systemd/rpcbind.conf 2024-07-25 16:55:38.335208500 -0400 @@ -0,0 +1,2 @@ +#Type Path Mode UID GID Age Argument +D /run/rpcbind 0700 rpc rpc - - diff --git a/rpcbind-0.2.4-runstatdir.patch b/rpcbind-0.2.4-runstatdir.patch index 462cf39..04337b8 100644 --- a/rpcbind-0.2.4-runstatdir.patch +++ b/rpcbind-0.2.4-runstatdir.patch @@ -1,6 +1,6 @@ -diff -up rpcbind-1.2.6/configure.ac.orig rpcbind-1.2.6/configure.ac ---- rpcbind-1.2.6/configure.ac.orig 2022-07-12 16:23:15.409315832 -0400 -+++ rpcbind-1.2.6/configure.ac 2022-07-12 16:23:33.242399069 -0400 +diff -up rpcbind-1.2.7/configure.ac.orig rpcbind-1.2.7/configure.ac +--- rpcbind-1.2.7/configure.ac.orig 2024-07-25 16:56:29.960551776 -0400 ++++ rpcbind-1.2.7/configure.ac 2024-07-25 16:57:25.650922094 -0400 @@ -32,8 +32,8 @@ AC_ARG_ENABLE([rmtcalls], AM_CONDITIONAL(RMTCALLS, test x$enable_rmtcalls = xyes) @@ -12,10 +12,10 @@ diff -up rpcbind-1.2.6/configure.ac.orig rpcbind-1.2.6/configure.ac AC_SUBST([statedir], [$with_statedir]) AC_ARG_WITH([rpcuser], -diff -up rpcbind-1.2.6/configure.orig rpcbind-1.2.6/configure ---- rpcbind-1.2.6/configure.orig 2021-05-10 13:13:18.000000000 -0400 -+++ rpcbind-1.2.6/configure 2022-07-12 16:23:33.244399078 -0400 -@@ -1391,7 +1391,7 @@ Optional Features: +diff -up rpcbind-1.2.7/configure.orig rpcbind-1.2.7/configure +--- rpcbind-1.2.7/configure.orig 2024-07-25 16:49:00.000000000 -0400 ++++ rpcbind-1.2.7/configure 2024-07-25 17:00:43.509219008 -0400 +@@ -1429,7 +1429,7 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) @@ -24,18 +24,18 @@ diff -up rpcbind-1.2.6/configure.orig rpcbind-1.2.6/configure --with-rpcuser=ARG use ARG for RPC [default=root] -@@ -3901,7 +3901,7 @@ fi - if test "${with_statedir+set}" = set; then : +@@ -4440,7 +4440,7 @@ if test ${with_statedir+y} + then : withval=$with_statedir; - else + else $as_nop - with_statedir=/var/run/rpcbind + with_statedir=/run/rpcbind fi statedir=$with_statedir -diff -up rpcbind-1.2.6/man/rpcbind-fr.8.orig rpcbind-1.2.6/man/rpcbind-fr.8 ---- rpcbind-1.2.6/man/rpcbind-fr.8.orig 2021-05-10 13:10:19.000000000 -0400 -+++ rpcbind-1.2.6/man/rpcbind-fr.8 2022-07-12 16:23:33.244399078 -0400 +diff -up rpcbind-1.2.7/man/rpcbind-fr.8.orig rpcbind-1.2.7/man/rpcbind-fr.8 +--- rpcbind-1.2.7/man/rpcbind-fr.8.orig 2024-07-25 11:55:23.000000000 -0400 ++++ rpcbind-1.2.7/man/rpcbind-fr.8 2024-07-25 16:57:25.653922113 -0400 @@ -138,8 +138,8 @@ est redémarré. .Xr rpcbind 3 , .Xr rpcinfo 8 @@ -47,9 +47,9 @@ diff -up rpcbind-1.2.6/man/rpcbind-fr.8.orig rpcbind-1.2.6/man/rpcbind-fr.8 .Sh TRADUCTION Aurelien CHARBON (Sept 2003) .El -diff -up rpcbind-1.2.6/src/rpcbind.c.orig rpcbind-1.2.6/src/rpcbind.c ---- rpcbind-1.2.6/src/rpcbind.c.orig 2022-07-12 16:23:15.407315823 -0400 -+++ rpcbind-1.2.6/src/rpcbind.c 2022-07-12 16:23:33.244399078 -0400 +diff -up rpcbind-1.2.7/src/rpcbind.c.orig rpcbind-1.2.7/src/rpcbind.c +--- rpcbind-1.2.7/src/rpcbind.c.orig 2024-07-25 11:55:23.000000000 -0400 ++++ rpcbind-1.2.7/src/rpcbind.c 2024-07-25 16:57:25.653922113 -0400 @@ -105,7 +105,7 @@ char *nss_modules = "files"; /* who to suid to if -s is given */ #define RUN_AS "daemon" diff --git a/rpcbind.spec b/rpcbind.spec index bc9bd2e..936ba3b 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -3,8 +3,8 @@ %global rpcbind_state_dir %{_rundir}/rpcbind Name: rpcbind -Version: 1.2.6 -Release: 5.rc3%{?dist}.1 +Version: 1.2.7 +Release: 0%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -22,8 +22,6 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd coreutils -Patch001: rpcbind-1.2.7-rc3.patch - Patch100: rpcbind-0.2.3-systemd-envfile.patch Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch Patch102: rpcbind-0.2.4-runstatdir.patch @@ -49,8 +47,6 @@ RPC calls on a server on that machine. %prep %setup -q -%patch 001 -p1 - %patch 100 -p1 %patch 101 -p1 %patch 102 -p1 @@ -135,6 +131,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Thu Jul 25 2024 Steve Dickson 1.2.7-0 +- Updated to latest upstream release: rpcbind-1_2_7 + * Fri Jul 19 2024 Fedora Release Engineering - 1.2.6-5.rc3.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index 638c1b1..81a9c45 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rpcbind-1.2.6.tar.bz2) = fb89c61be4c533fe2e6057749d97079a2d1c9fac0d35d6be1a159a0edbf86092b3fc121f19fa920e75aac5ecdd3f59f5978e6401d5cad16cd438c977736206a7 +SHA512 (rpcbind-1.2.7.tar.bz2) = ca1517bdab86221d13c645042cc31b25b4d2b574d63ebaa20da4f5392b611cf58811f267214293e953f504d364e5daaa5875eab7aa68a04b89e68fd5508e3926 From a2291b98bb23fd571487c59f7fd0795009786188 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 13 Aug 2024 11:07:30 -0400 Subject: [PATCH 43/51] Added Requirement for libtirpc (bz 2304327) Signed-off-by: Steve Dickson --- rpcbind.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 936ba3b..a5a2f18 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.7 -Release: 0%{?dist} +Release: 1%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -13,6 +13,7 @@ Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar. Source1: %{name}.sysconfig Requires: glibc-common setup +Requires: libtirpc >= 1.3.5 Conflicts: man-pages < 2.43-12 BuildRequires: make BuildRequires: automake, autoconf, libtool, systemd, systemd-devel @@ -131,6 +132,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Tue Aug 13 2024 Steve Dickson 1.2.7-1 +- Added Requirement for libtirpc (bz 2304327) + * Thu Jul 25 2024 Steve Dickson 1.2.7-0 - Updated to latest upstream release: rpcbind-1_2_7 From bf5e416b3004f1b693da770c1065dd64cf3290e8 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Mon, 9 Sep 2024 06:45:35 -0400 Subject: [PATCH 44/51] Updated to latest upstream RC release: rpcbind-1_2_8-rc1 Signed-off-by: Steve Dickson --- rpcbind-0.2.3-systemd-envfile.patch | 11 ----- rpcbind-0.2.4-runstatdir.patch | 61 ---------------------------- rpcbind-0.2.4-systemd-service.patch | 13 ------ rpcbind-1.2.8-rc1.patch | 63 +++++++++++++++++++++++++++++ rpcbind.spec | 22 +++++----- 5 files changed, 72 insertions(+), 98 deletions(-) delete mode 100644 rpcbind-0.2.3-systemd-envfile.patch delete mode 100644 rpcbind-0.2.4-runstatdir.patch delete mode 100644 rpcbind-0.2.4-systemd-service.patch create mode 100644 rpcbind-1.2.8-rc1.patch diff --git a/rpcbind-0.2.3-systemd-envfile.patch b/rpcbind-0.2.3-systemd-envfile.patch deleted file mode 100644 index 60da4c6..0000000 --- a/rpcbind-0.2.3-systemd-envfile.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up rpcbind-1.2.6/systemd/rpcbind.service.in.orig rpcbind-1.2.6/systemd/rpcbind.service.in ---- rpcbind-1.2.6/systemd/rpcbind.service.in.orig 2022-07-12 16:18:16.272919592 -0400 -+++ rpcbind-1.2.6/systemd/rpcbind.service.in 2022-07-12 16:19:14.153189756 -0400 -@@ -12,6 +12,7 @@ Wants=rpcbind.target - [Service] - Type=notify - # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. -+EnvironmentFile=/etc/sysconfig/rpcbind - ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f - - [Install] diff --git a/rpcbind-0.2.4-runstatdir.patch b/rpcbind-0.2.4-runstatdir.patch deleted file mode 100644 index 04337b8..0000000 --- a/rpcbind-0.2.4-runstatdir.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -up rpcbind-1.2.7/configure.ac.orig rpcbind-1.2.7/configure.ac ---- rpcbind-1.2.7/configure.ac.orig 2024-07-25 16:56:29.960551776 -0400 -+++ rpcbind-1.2.7/configure.ac 2024-07-25 16:57:25.650922094 -0400 -@@ -32,8 +32,8 @@ AC_ARG_ENABLE([rmtcalls], - AM_CONDITIONAL(RMTCALLS, test x$enable_rmtcalls = xyes) - - AC_ARG_WITH([statedir], -- AS_HELP_STRING([--with-statedir=ARG], [use ARG as state dir @<:@default=/var/run/rpcbind@:>@]) -- ,, [with_statedir=/var/run/rpcbind]) -+ AS_HELP_STRING([--with-statedir=ARG], [use ARG as state dir @<:@default=/run/rpcbind@:>@]) -+ ,, [with_statedir=/run/rpcbind]) - AC_SUBST([statedir], [$with_statedir]) - - AC_ARG_WITH([rpcuser], -diff -up rpcbind-1.2.7/configure.orig rpcbind-1.2.7/configure ---- rpcbind-1.2.7/configure.orig 2024-07-25 16:49:00.000000000 -0400 -+++ rpcbind-1.2.7/configure 2024-07-25 17:00:43.509219008 -0400 -@@ -1429,7 +1429,7 @@ Optional Features: - Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) -- --with-statedir=ARG use ARG as state dir [default=/var/run/rpcbind] -+ --with-statedir=ARG use ARG as state dir [default=/run/rpcbind] - - --with-rpcuser=ARG use ARG for RPC [default=root] - -@@ -4440,7 +4440,7 @@ if test ${with_statedir+y} - then : - withval=$with_statedir; - else $as_nop -- with_statedir=/var/run/rpcbind -+ with_statedir=/run/rpcbind - fi - - statedir=$with_statedir -diff -up rpcbind-1.2.7/man/rpcbind-fr.8.orig rpcbind-1.2.7/man/rpcbind-fr.8 ---- rpcbind-1.2.7/man/rpcbind-fr.8.orig 2024-07-25 11:55:23.000000000 -0400 -+++ rpcbind-1.2.7/man/rpcbind-fr.8 2024-07-25 16:57:25.653922113 -0400 -@@ -138,8 +138,8 @@ est redémarré. - .Xr rpcbind 3 , - .Xr rpcinfo 8 - .Sh FILES --.Bl -tag -width /var/run/rpcbind.sock -compact --.It Pa /var/run/rpcbind.sock -+.Bl -tag -width /run/rpcbind.sock -compact -+.It Pa /run/rpcbind.sock - .Sh TRADUCTION - Aurelien CHARBON (Sept 2003) - .El -diff -up rpcbind-1.2.7/src/rpcbind.c.orig rpcbind-1.2.7/src/rpcbind.c ---- rpcbind-1.2.7/src/rpcbind.c.orig 2024-07-25 11:55:23.000000000 -0400 -+++ rpcbind-1.2.7/src/rpcbind.c 2024-07-25 16:57:25.653922113 -0400 -@@ -105,7 +105,7 @@ char *nss_modules = "files"; - /* who to suid to if -s is given */ - #define RUN_AS "daemon" - --#define RPCBINDDLOCK "/var/run/rpcbind.lock" -+#define RPCBINDDLOCK RPCBIND_STATEDIR "/rpcbind.lock" - - int runasdaemon = 0; - int insecure = 0; diff --git a/rpcbind-0.2.4-systemd-service.patch b/rpcbind-0.2.4-systemd-service.patch deleted file mode 100644 index 0350020..0000000 --- a/rpcbind-0.2.4-systemd-service.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up rpcbind-0.2.4/systemd/rpcbind.service.in.orig rpcbind-0.2.4/systemd/rpcbind.service.in ---- rpcbind-0.2.4/systemd/rpcbind.service.in.orig 2017-12-16 15:46:12.896270101 -0500 -+++ rpcbind-0.2.4/systemd/rpcbind.service.in 2017-12-16 15:46:43.672027210 -0500 -@@ -7,7 +7,8 @@ RequiresMountsFor=@statedir@ - # Make sure we use the IP addresses listed for - # rpcbind.socket, no matter how this unit is started. - Requires=rpcbind.socket --Wants=rpcbind.target -+Wants=rpcbind.target systemd-tmpfiles-setup.service -+After=systemd-tmpfiles-setup.service - - [Service] - Type=notify diff --git a/rpcbind-1.2.8-rc1.patch b/rpcbind-1.2.8-rc1.patch new file mode 100644 index 0000000..c22b471 --- /dev/null +++ b/rpcbind-1.2.8-rc1.patch @@ -0,0 +1,63 @@ +diff --git a/man/rpcbind.8 b/man/rpcbind.8 +index fbf0ace..cdcdcfd 100644 +--- a/man/rpcbind.8 ++++ b/man/rpcbind.8 +@@ -150,6 +150,14 @@ starts up. The state file is created when + .Nm + terminates. + .El ++.Sh FILES ++The ++.Nm ++utility tries to load configuration file in following order: ++.Bd -literal ++.Pa /etc/rpcbind.conf ++.Pa /etc/default/rpcbind ++.Pa /etc/sysconfig/rpcbind + .Sh NOTES + All RPC servers must be restarted if + .Nm +diff --git a/src/rpcbind.c b/src/rpcbind.c +index ecebe97..9887b82 100644 +--- a/src/rpcbind.c ++++ b/src/rpcbind.c +@@ -105,7 +105,7 @@ char *nss_modules = "files"; + /* who to suid to if -s is given */ + #define RUN_AS "daemon" + +-#define RPCBINDDLOCK "/var/run/rpcbind.lock" ++#define RPCBINDDLOCK "/run/rpcbind.lock" + + int runasdaemon = 0; + int insecure = 0; +diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in +index c892ca8..771b944 100644 +--- a/systemd/rpcbind.service.in ++++ b/systemd/rpcbind.service.in +@@ -7,11 +7,25 @@ RequiresMountsFor=@statedir@ + # Make sure we use the IP addresses listed for + # rpcbind.socket, no matter how this unit is started. + Requires=rpcbind.socket +-Wants=rpcbind.target ++Wants=rpcbind.target systemd-tmpfiles-setup.service ++After=systemd-tmpfiles-setup.service + + [Service] ++ProtectSystem=full ++ProtectHome=true ++PrivateDevices=true ++ProtectHostname=true ++ProtectClock=true ++ProtectKernelTunables=true ++ProtectKernelModules=true ++ProtectKernelLogs=true ++ProtectControlGroups=true ++RestrictRealtime=true + Type=notify + # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. ++EnvironmentFile=-/etc/rpcbind.conf ++EnvironmentFile=-/etc/default/rpcbind ++EnvironmentFile=-/etc/sysconfig/rpcbind + ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f + + [Install] diff --git a/rpcbind.spec b/rpcbind.spec index a5a2f18..a91fe65 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.7 -Release: 1%{?dist} +Release: 1.rc1%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -23,11 +23,10 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd coreutils -Patch100: rpcbind-0.2.3-systemd-envfile.patch -Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch -Patch102: rpcbind-0.2.4-runstatdir.patch -Patch103: rpcbind-0.2.4-systemd-service.patch -Patch104: rpcbind-0.2.4-systemd-rundir.patch +Patch001: rpcbind-1.2.8-rc1.patch + +Patch100: rpcbind-0.2.3-systemd-tmpfiles.patch +Patch101: rpcbind-0.2.4-systemd-rundir.patch Provides: portmap = %{version}-%{release} Obsoletes: portmap <= 4.0-65.3 @@ -46,13 +45,7 @@ universal addresses. It must be running on the host to be able to make RPC calls on a server on that machine. %prep -%setup -q - -%patch 100 -p1 -%patch 101 -p1 -%patch 102 -p1 -%patch 103 -p1 -%patch 104 -p1 +%autosetup -p1 %build autoreconf -fisv @@ -132,6 +125,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Mon Sep 9 2024 Steve Dickson 1.2.8-rc1 +- Updated to latest upstream RC release: rpcbind-1_2_8-rc1 + * Tue Aug 13 2024 Steve Dickson 1.2.7-1 - Added Requirement for libtirpc (bz 2304327) From 38448bc8b7b4ec841c6f62e9206378cc44bdb968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 12 Jan 2025 14:40:42 +0100 Subject: [PATCH 45/51] Rebuilt for the bin-sbin merge (2nd attempt) https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index a91fe65..fd42e86 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.7 -Release: 1.rc1%{?dist} +Release: 1.rc1%{?dist}.1 Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -125,6 +125,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Sun Jan 12 2025 Zbigniew JÄ™drzejewski-Szmek - 1.2.7-1.rc1.1 +- Rebuilt for the bin-sbin merge (2nd attempt) + * Mon Sep 9 2024 Steve Dickson 1.2.8-rc1 - Updated to latest upstream RC release: rpcbind-1_2_8-rc1 From 58b2707a1da95f540f943b00022beb7bda39f775 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 14 Jan 2025 10:28:37 +0200 Subject: [PATCH 46/51] Add provides for the manually created rpc user and group The provides are necessary to fix this compose failure: https://pagure.io/releng/failed-composes/issue/7706 Such provides are normally auto-generated from sysusers.d config but since the user is manually created, we need to manually add the provide too. --- rpcbind.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index fd42e86..3f4cbaf 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.7 -Release: 1.rc1%{?dist}.1 +Release: 1.rc1%{?dist}.2 Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -22,6 +22,8 @@ Requires(pre): coreutils shadow-utils Requires(post): systemd Requires(preun): systemd Requires(postun): systemd coreutils +Provides: user(rpc) +Provides: group(rpc) Patch001: rpcbind-1.2.8-rc1.patch @@ -125,6 +127,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Tue Jan 14 2025 Panu Matilainen - 1.2.7-1.rc1.2 +- Add provides for the manually created rpc user and group + * Sun Jan 12 2025 Zbigniew JÄ™drzejewski-Szmek - 1.2.7-1.rc1.1 - Rebuilt for the bin-sbin merge (2nd attempt) From 33d953ba508384084e43357ac99c7d7a96b14acf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 22:39:42 +0000 Subject: [PATCH 47/51] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 3f4cbaf..b5b2c6e 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.7 -Release: 1.rc1%{?dist}.2 +Release: 1.rc1%{?dist}.3 Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -127,6 +127,9 @@ fi %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 1.2.7-1.rc1.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Tue Jan 14 2025 Panu Matilainen - 1.2.7-1.rc1.2 - Add provides for the manually created rpc user and group From 71db4a383198aa08ccdb81d9426e9606163e7448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 29 Jan 2025 15:07:52 +0100 Subject: [PATCH 48/51] Add sysusers.d config file to allow rpm to create users/groups automatically See https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers. Previously, a non-system user was created :(, sysusers does not support this. --- rpcbind.spec | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/rpcbind.spec b/rpcbind.spec index b5b2c6e..f3ac1bf 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.7 -Release: 1.rc1%{?dist}.3 +Release: 1.rc1%{?dist}.4 Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -18,12 +18,10 @@ Conflicts: man-pages < 2.43-12 BuildRequires: make BuildRequires: automake, autoconf, libtool, systemd, systemd-devel BuildRequires: libtirpc-devel, quota-devel -Requires(pre): coreutils shadow-utils +Requires(pre): coreutils Requires(post): systemd Requires(preun): systemd Requires(postun): systemd coreutils -Provides: user(rpc) -Provides: group(rpc) Patch001: rpcbind-1.2.8-rc1.patch @@ -49,6 +47,11 @@ RPC calls on a server on that machine. %prep %autosetup -p1 +# Create a sysusers.d config file +cat >rpcbind.sysusers.conf </dev/null || groupadd -f -g 32 -r rpc -if ! getent passwd rpc >/dev/null ; then - if ! getent passwd 32 >/dev/null ; then - useradd -l -c "Rpcbind Daemon" -d /var/lib/rpcbind \ - -g rpc -M -s /sbin/nologin -o -u 32 rpc > /dev/null 2>&1 - else - useradd -l -c "Rpcbind Daemon" -d /var/lib/rpcbind \ - -g rpc -M -s /sbin/nologin rpc > /dev/null 2>&1 - fi -fi +install -m0644 -D rpcbind.sysusers.conf %{buildroot}%{_sysusersdir}/rpcbind.conf %post %systemd_post rpcbind.service rpcbind.socket @@ -125,8 +116,12 @@ fi %{_unitdir}/%{name}.socket %{_tmpfilesdir}/%{name}.conf %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} +%{_sysusersdir}/rpcbind.conf %changelog +* Wed Jan 29 2025 Zbigniew JÄ™drzejewski-Szmek - 1.2.7-1.rc1.4 +- Add sysusers.d config file to allow rpm to create users/groups automatically + * Sat Jan 18 2025 Fedora Release Engineering - 1.2.7-1.rc1.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 03a3b8332ece0e3904a70e744a880d9f76f952d8 Mon Sep 17 00:00:00 2001 From: Scott Mayhew Date: Thu, 8 May 2025 11:14:56 -0400 Subject: [PATCH 49/51] Fix rpm scriptlets to remove excessive restarts during upgrade Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson --- rpcbind.spec | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/rpcbind.spec b/rpcbind.spec index f3ac1bf..bc4f076 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.7 -Release: 1.rc1%{?dist}.4 +Release: 2.rc1%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -91,15 +91,16 @@ install -m0644 -D rpcbind.sysusers.conf %{buildroot}%{_sysusersdir}/rpcbind.conf %preun %systemd_preun rpcbind.service rpcbind.socket +# NOTE: We only restart rpcbind.socket in the %postun scriptlet in order to +# avoid the race described in: +# +# https://github.com/systemd/systemd/issues/13271 +# https://github.com/systemd/systemd/issues/8102 +# +# Restarting rpcbind.socket causes rpcbind.service to be restarted automatically +# due to "Requires=rpcbind.socket" in the rpcbind.service unit file. %postun -%systemd_postun_with_restart rpcbind.service rpcbind.socket - -%triggerin -- rpcbind > 0.2.2-2.0 -if systemctl -q is-enabled rpcbind.socket -then - /bin/systemctl reenable rpcbind.socket >/dev/null 2>&1 || : - /bin/systemctl restart rpcbind.socket >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart rpcbind.socket %files %license COPYING @@ -119,6 +120,9 @@ fi %{_sysusersdir}/rpcbind.conf %changelog +* Wed May 7 2025 Scott Mayhew - 1.2.7-2.rc1 +- Fix rpm scriptlets to remove excessive restarts during upgrade + * Wed Jan 29 2025 Zbigniew JÄ™drzejewski-Szmek - 1.2.7-1.rc1.4 - Add sysusers.d config file to allow rpm to create users/groups automatically From 466d52c13d676757fcaf9ef974d301018b3a737c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 12:05:17 +0000 Subject: [PATCH 50/51] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- rpcbind.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index bc4f076..1a18f08 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -4,7 +4,7 @@ Name: rpcbind Version: 1.2.7 -Release: 2.rc1%{?dist} +Release: 2.rc1%{?dist}.1 Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -120,6 +120,9 @@ install -m0644 -D rpcbind.sysusers.conf %{buildroot}%{_sysusersdir}/rpcbind.conf %{_sysusersdir}/rpcbind.conf %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1.2.7-2.rc1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed May 7 2025 Scott Mayhew - 1.2.7-2.rc1 - Fix rpm scriptlets to remove excessive restarts during upgrade From 333233b7d5ddda1aa97fab84a0c40b8023bfd270 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 29 Jul 2025 08:14:42 -0400 Subject: [PATCH 51/51] Updated to latest upstream release: rpcbind-1_2_8 (bz 2300081) Signed-off-by: Steve Dickson --- .gitignore | 4 +- rpcbind-0.2.4-systemd-rundir.patch | 14 +-- rpcbind-1.2.7-rc2.patch | 46 -------- rpcbind-1.2.7-rc3.patch | 177 ----------------------------- rpcbind-1.2.8-rc1.patch | 63 ---------- rpcbind.spec | 9 +- sources | 2 +- 7 files changed, 15 insertions(+), 300 deletions(-) delete mode 100644 rpcbind-1.2.7-rc2.patch delete mode 100644 rpcbind-1.2.7-rc3.patch delete mode 100644 rpcbind-1.2.8-rc1.patch diff --git a/.gitignore b/.gitignore index 0cd980a..1a0073b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ x86_64 Makefile -rpcbind-1.2.7/ -/rpcbind-1.2.7.tar.bz2 +rpcbind-1.2.8-build/ +/rpcbind-1.2.8.tar.bz2 diff --git a/rpcbind-0.2.4-systemd-rundir.patch b/rpcbind-0.2.4-systemd-rundir.patch index a3dc01f..ffecb53 100644 --- a/rpcbind-0.2.4-systemd-rundir.patch +++ b/rpcbind-0.2.4-systemd-rundir.patch @@ -1,16 +1,16 @@ -diff -up rpcbind-1.2.6/src/rpcbind.c.orig rpcbind-1.2.6/src/rpcbind.c ---- rpcbind-1.2.6/src/rpcbind.c.orig 2022-07-12 16:25:36.422972803 -0400 -+++ rpcbind-1.2.6/src/rpcbind.c 2022-07-12 16:26:00.679085433 -0400 -@@ -143,6 +143,8 @@ static void rbllist_add(rpcprog_t, rpcve - static void terminate(int); - static void parseargs(int, char *[]); +diff -up rpcbind-1.2.8/src/rpcbind.c.orig rpcbind-1.2.8/src/rpcbind.c +--- rpcbind-1.2.8/src/rpcbind.c.orig 2025-07-26 16:57:24.000000000 -0400 ++++ rpcbind-1.2.8/src/rpcbind.c 2025-07-26 17:15:51.933467872 -0400 +@@ -214,6 +214,8 @@ static void version() + fprintf(stderr, "\n"); + } +char *systemdtmp = "/usr/bin/systemd-tmpfiles --create rpcbind.conf"; + int main(int argc, char *argv[]) { -@@ -150,13 +152,21 @@ main(int argc, char *argv[]) +@@ -221,13 +223,21 @@ main(int argc, char *argv[]) void *nc_handle; /* Net config handle */ struct rlimit rl; int maxrec = RPC_MAXDATASIZE; diff --git a/rpcbind-1.2.7-rc2.patch b/rpcbind-1.2.7-rc2.patch deleted file mode 100644 index 4c1749d..0000000 --- a/rpcbind-1.2.7-rc2.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index c0ef896..c2069a2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -20,6 +20,12 @@ AM_CONDITIONAL(LIBSETDEBUG, test x$lib_setdebug = xyes) - AC_ARG_ENABLE([warmstarts], - AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts @<:@default=no@:>@])) - AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes) -+AS_IF([test x$enable_warmstarts = xyes], [ -+ warmstarts_opt=-w -+], [ -+ warmstarts_opt= -+]) -+AC_SUBST([warmstarts_opt], [$warmstarts_opt]) - - AC_ARG_ENABLE([rmtcalls], - AS_HELP_STRING([--enable-rmtcalls], [Enables Remote Calls @<:@default=no@:>@])) -diff --git a/src/rpcbind.c b/src/rpcbind.c -index 25d8a90..ecebe97 100644 ---- a/src/rpcbind.c -+++ b/src/rpcbind.c -@@ -552,8 +552,10 @@ init_transport(struct netconfig *nconf) - syslog(LOG_ERR, "cannot bind %s on %s: %m", - (hosts[nhostsbak] == NULL) ? "*" : - hosts[nhostsbak], nconf->nc_netid); -- if (res != NULL) -+ if (res != NULL) { - freeaddrinfo(res); -+ res = NULL; -+ } - continue; - } else - checkbind++; -diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in -index 7b1c74b..c892ca8 100644 ---- a/systemd/rpcbind.service.in -+++ b/systemd/rpcbind.service.in -@@ -12,7 +12,7 @@ Wants=rpcbind.target - [Service] - Type=notify - # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. --ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f -+ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f - - [Install] - WantedBy=multi-user.target diff --git a/rpcbind-1.2.7-rc3.patch b/rpcbind-1.2.7-rc3.patch deleted file mode 100644 index 3e11c03..0000000 --- a/rpcbind-1.2.7-rc3.patch +++ /dev/null @@ -1,177 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index c0ef896..573e4fd 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -20,6 +20,12 @@ AM_CONDITIONAL(LIBSETDEBUG, test x$lib_setdebug = xyes) - AC_ARG_ENABLE([warmstarts], - AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts @<:@default=no@:>@])) - AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes) -+AS_IF([test x$enable_warmstarts = xyes], [ -+ warmstarts_opt=-w -+], [ -+ warmstarts_opt= -+]) -+AC_SUBST([warmstarts_opt], [$warmstarts_opt]) - - AC_ARG_ENABLE([rmtcalls], - AS_HELP_STRING([--enable-rmtcalls], [Enables Remote Calls @<:@default=no@:>@])) -@@ -44,6 +50,17 @@ AC_SUBST([nss_modules], [$with_nss_modules]) - - PKG_CHECK_MODULES([TIRPC], [libtirpc]) - -+CPPFLAGS=$TIRPC_CFLAGS -+AC_MSG_CHECKING([for abstract socket support in libtirpc]) -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ -+#include -+],[ -+char *path = _PATH_RPCBINDSOCK_ABSTRACT; -+])], [have_abstract=yes], [have_abstract=no]) -+CPPFLAGS= -+AC_MSG_RESULT([$have_abstract]) -+AM_CONDITIONAL(ABSTRACT, [ test "x$have_abstract" = "xyes" ]) -+ - PKG_PROG_PKG_CONFIG - AC_ARG_WITH([systemdsystemunitdir], - AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), -@@ -70,4 +87,4 @@ AC_CHECK_HEADERS([nss.h]) - AC_SUBST([_sbindir]) - AC_CONFIG_COMMANDS_PRE([eval eval _sbindir=$sbindir]) - --AC_OUTPUT([Makefile systemd/rpcbind.service]) -+AC_OUTPUT([Makefile systemd/rpcbind.service systemd/rpcbind.socket]) -diff --git a/src/rpcbind.c b/src/rpcbind.c -index 25d8a90..ecebe97 100644 ---- a/src/rpcbind.c -+++ b/src/rpcbind.c -@@ -552,8 +552,10 @@ init_transport(struct netconfig *nconf) - syslog(LOG_ERR, "cannot bind %s on %s: %m", - (hosts[nhostsbak] == NULL) ? "*" : - hosts[nhostsbak], nconf->nc_netid); -- if (res != NULL) -+ if (res != NULL) { - freeaddrinfo(res); -+ res = NULL; -+ } - continue; - } else - checkbind++; -diff --git a/src/rpcinfo.c b/src/rpcinfo.c -index 0e14f78..006057a 100644 ---- a/src/rpcinfo.c -+++ b/src/rpcinfo.c -@@ -311,29 +311,17 @@ main (int argc, char **argv) - return (0); - } - -+/* Evaluate to actual length of the `sockaddr_un' structure, whether -+ * abstract or not. -+ */ -+#include -+#define SUN_LEN_A(ptr) (offsetof(struct sockaddr_un, sun_path) \ -+ + 1 + strlen((ptr)->sun_path + 1)) -+ - static CLIENT * - local_rpcb (rpcprog_t prog, rpcvers_t vers) - { --#if 0 -- void *localhandle; -- struct netconfig *nconf; - CLIENT *clnt; -- -- localhandle = setnetconfig(); -- while ((nconf = getnetconfig(localhandle)) != NULL) { -- if (nconf->nc_protofmly != NULL && -- strcmp(nconf->nc_protofmly, NC_LOOPBACK) == 0) -- break; -- } -- if (nconf == NULL) { -- warnx("getnetconfig: %s", nc_sperror()); -- return (NULL); -- } -- -- clnt = clnt_tp_create (/* "localhost"*/ NULL, prog, vers, nconf); -- endnetconfig(localhandle); -- return clnt; --#else - struct netbuf nbuf; - struct sockaddr_un sun; - int sock; -@@ -344,13 +332,26 @@ local_rpcb (rpcprog_t prog, rpcvers_t vers) - return NULL; - - sun.sun_family = AF_LOCAL; -+ -+#ifdef _PATH_RPCBINDSOCK_ABSTRACT -+ memcpy(sun.sun_path, _PATH_RPCBINDSOCK_ABSTRACT, -+ sizeof(_PATH_RPCBINDSOCK_ABSTRACT)); -+ nbuf.len = SUN_LEN_A (&sun); -+ nbuf.maxlen = sizeof (struct sockaddr_un); -+ nbuf.buf = &sun; -+ -+ clnt = clnt_vc_create (sock, &nbuf, prog, vers, 0, 0); -+ if (clnt) -+ return clnt; -+#endif -+ - strcpy (sun.sun_path, _PATH_RPCBINDSOCK); - nbuf.len = SUN_LEN (&sun); - nbuf.maxlen = sizeof (struct sockaddr_un); - nbuf.buf = &sun; - -- return clnt_vc_create (sock, &nbuf, prog, vers, 0, 0); --#endif -+ clnt = clnt_vc_create (sock, &nbuf, prog, vers, 0, 0); -+ return clnt; - } - - #ifdef PORTMAP -diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in -index 7b1c74b..c892ca8 100644 ---- a/systemd/rpcbind.service.in -+++ b/systemd/rpcbind.service.in -@@ -12,7 +12,7 @@ Wants=rpcbind.target - [Service] - Type=notify - # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. --ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f -+ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f - - [Install] - WantedBy=multi-user.target -diff --git a/systemd/rpcbind.socket b/systemd/rpcbind.socket -index 3b1a936..685341c 100644 ---- a/systemd/rpcbind.socket -+++ b/systemd/rpcbind.socket -@@ -6,6 +6,7 @@ Before=rpcbind.target - - [Socket] - ListenStream=/run/rpcbind.sock -+#ListenStream=@/run/rpcbind.sock - - # RPC netconfig can't handle ipv6/ipv4 dual sockets - BindIPv6Only=ipv6-only -diff --git a/systemd/rpcbind.socket.in b/systemd/rpcbind.socket.in -new file mode 100644 -index 0000000..5dd09a1 ---- /dev/null -+++ b/systemd/rpcbind.socket.in -@@ -0,0 +1,19 @@ -+[Unit] -+Description=RPCbind Server Activation Socket -+DefaultDependencies=no -+Wants=rpcbind.target -+Before=rpcbind.target -+ -+[Socket] -+ListenStream=/run/rpcbind.sock -+@ABSTRACT_TRUE@ListenStream=@/run/rpcbind.sock -+ -+# RPC netconfig can't handle ipv6/ipv4 dual sockets -+BindIPv6Only=ipv6-only -+ListenStream=0.0.0.0:111 -+ListenDatagram=0.0.0.0:111 -+ListenStream=[::]:111 -+ListenDatagram=[::]:111 -+ -+[Install] -+WantedBy=sockets.target diff --git a/rpcbind-1.2.8-rc1.patch b/rpcbind-1.2.8-rc1.patch deleted file mode 100644 index c22b471..0000000 --- a/rpcbind-1.2.8-rc1.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff --git a/man/rpcbind.8 b/man/rpcbind.8 -index fbf0ace..cdcdcfd 100644 ---- a/man/rpcbind.8 -+++ b/man/rpcbind.8 -@@ -150,6 +150,14 @@ starts up. The state file is created when - .Nm - terminates. - .El -+.Sh FILES -+The -+.Nm -+utility tries to load configuration file in following order: -+.Bd -literal -+.Pa /etc/rpcbind.conf -+.Pa /etc/default/rpcbind -+.Pa /etc/sysconfig/rpcbind - .Sh NOTES - All RPC servers must be restarted if - .Nm -diff --git a/src/rpcbind.c b/src/rpcbind.c -index ecebe97..9887b82 100644 ---- a/src/rpcbind.c -+++ b/src/rpcbind.c -@@ -105,7 +105,7 @@ char *nss_modules = "files"; - /* who to suid to if -s is given */ - #define RUN_AS "daemon" - --#define RPCBINDDLOCK "/var/run/rpcbind.lock" -+#define RPCBINDDLOCK "/run/rpcbind.lock" - - int runasdaemon = 0; - int insecure = 0; -diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in -index c892ca8..771b944 100644 ---- a/systemd/rpcbind.service.in -+++ b/systemd/rpcbind.service.in -@@ -7,11 +7,25 @@ RequiresMountsFor=@statedir@ - # Make sure we use the IP addresses listed for - # rpcbind.socket, no matter how this unit is started. - Requires=rpcbind.socket --Wants=rpcbind.target -+Wants=rpcbind.target systemd-tmpfiles-setup.service -+After=systemd-tmpfiles-setup.service - - [Service] -+ProtectSystem=full -+ProtectHome=true -+PrivateDevices=true -+ProtectHostname=true -+ProtectClock=true -+ProtectKernelTunables=true -+ProtectKernelModules=true -+ProtectKernelLogs=true -+ProtectControlGroups=true -+RestrictRealtime=true - Type=notify - # distro can provide a drop-in adding EnvironmentFile=-/??? if needed. -+EnvironmentFile=-/etc/rpcbind.conf -+EnvironmentFile=-/etc/default/rpcbind -+EnvironmentFile=-/etc/sysconfig/rpcbind - ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f - - [Install] diff --git a/rpcbind.spec b/rpcbind.spec index 1a18f08..0676bb2 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -3,8 +3,8 @@ %global rpcbind_state_dir %{_rundir}/rpcbind Name: rpcbind -Version: 1.2.7 -Release: 2.rc1%{?dist}.1 +Version: 1.2.8 +Release: 0%{?dist} Summary: Universal Addresses to RPC Program Number Mapper License: BSD-3-Clause URL: http://nfsv4.bullopensource.org @@ -23,8 +23,6 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd coreutils -Patch001: rpcbind-1.2.8-rc1.patch - Patch100: rpcbind-0.2.3-systemd-tmpfiles.patch Patch101: rpcbind-0.2.4-systemd-rundir.patch @@ -120,6 +118,9 @@ install -m0644 -D rpcbind.sysusers.conf %{buildroot}%{_sysusersdir}/rpcbind.conf %{_sysusersdir}/rpcbind.conf %changelog +* Sat Jul 26 2025 Steve Dickson 1.2.8-0 +- Updated to latest upstream release: rpcbind-1_2_8 (bz 2300081) + * Fri Jul 25 2025 Fedora Release Engineering - 1.2.7-2.rc1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 81a9c45..26c4f09 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rpcbind-1.2.7.tar.bz2) = ca1517bdab86221d13c645042cc31b25b4d2b574d63ebaa20da4f5392b611cf58811f267214293e953f504d364e5daaa5875eab7aa68a04b89e68fd5508e3926 +SHA512 (rpcbind-1.2.8.tar.bz2) = 66f3955a67c4d0142ec635614ceafbc9bdbea985f2edaeec903f17efaf3c2e98f6483e8e6b7f1358cf8d2c1c877b281d153a3bf1b6748b6d259ae7ad1465ee71