Compare commits

...
Sign in to create a new pull request.

26 commits

Author SHA1 Message Date
Steve Dickson
333233b7d5 Updated to latest upstream release: rpcbind-1_2_8 (bz 2300081)
Signed-off-by: Steve Dickson <steved@redhat.com>
2025-07-29 08:14:42 -04:00
Fedora Release Engineering
466d52c13d Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 12:05:17 +00:00
Scott Mayhew
03a3b8332e Fix rpm scriptlets to remove excessive restarts during upgrade
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
2025-05-08 11:14:56 -04:00
Zbigniew Jędrzejewski-Szmek
71db4a3831 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.
2025-01-29 15:08:33 +01:00
Fedora Release Engineering
33d953ba50 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 22:39:42 +00:00
Panu Matilainen
58b2707a1d 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.
2025-01-14 11:47:01 +02:00
Zbigniew Jędrzejewski-Szmek
38448bc8b7 Rebuilt for the bin-sbin merge (2nd attempt)
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2025-01-12 14:40:42 +01:00
Steve Dickson
bf5e416b30 Updated to latest upstream RC release: rpcbind-1_2_8-rc1
Signed-off-by: Steve Dickson <steved@redhat.com>
2024-09-09 06:45:35 -04:00
Steve Dickson
a2291b98bb Added Requirement for libtirpc (bz 2304327)
Signed-off-by: Steve Dickson <steved@redhat.com>
2024-08-13 11:07:30 -04:00
Steve Dickson
fc619cdcef Updated to latest upstream release: rpcbind-1.2.7
Signed-off-by: Steve Dickson <steved@redhat.com>
2024-07-26 08:32:42 -04:00
Fedora Release Engineering
425689735d Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 18:46:38 +00:00
Zbigniew Jędrzejewski-Szmek
2376822f36 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.
2024-04-11 13:16:28 +02:00
Steve Dickson
48fb6226ed Updated to latest upstream RC release: rpcbind-1_2_7-rc3
Signed-off-by: Steve Dickson <steved@redhat.com>
2024-03-18 16:30:45 -04:00
Fedora Release Engineering
dff6ecad48 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 15:45:44 +00:00
Fedora Release Engineering
44324f80ac Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 11:56:13 +00:00
Pavel Reichl
46ccf3be73 Convert License tag to SPDX format
Related: https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_2
Signed-off-by: Pavel Reichl <preichl@redhat.com>
2023-10-16 05:23:03 +02:00
Fedora Release Engineering
8dc2f3003d Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 17:02:39 +00:00
Steve Dickson
c01c84e6ff Updated to latest upstream RC release: rpcbind-1_2_7-rc2
Signed-off-by: Steve Dickson <steved@redhat.com>
2023-02-28 13:04:39 -05:00
Fedora Release Engineering
85806f502e Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 19:55:08 +00:00
Fedora Release Engineering
6101200022 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 00:59:31 +00:00
Fedora Release Engineering
f9cc7db67b - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-21 17:59:37 +00:00
Fedora Release Engineering
b6cfae01a2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 11:33:51 +00:00
Steve Dickson
e7af3ee141 Updated to latest upstream release: rpcbind-1_2_6 (bz 1959127)
Signed-off-by: Steve Dickson <steved@redhat.com>
2021-05-18 13:20:27 -04:00
Zbigniew Jędrzejewski-Szmek
3d509e2d2c Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
2021-03-02 16:12:51 +01:00
Fedora Release Engineering
106cdc1057 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 15:25:37 +00:00
Tom Stellard
37c6c9056d Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-08 20:52:58 +00:00
9 changed files with 134 additions and 395 deletions

4
.gitignore vendored
View file

@ -1,4 +1,4 @@
x86_64 x86_64
Makefile Makefile
/rpcbind-1.2.5.tar.bz2 rpcbind-1.2.8-build/
rpcbind-1.2.5/ /rpcbind-1.2.8.tar.bz2

View file

@ -1,11 +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: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.
+EnvironmentFile=/etc/sysconfig/rpcbind
ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f
[Install]

View file

@ -1,7 +1,7 @@
diff -up rpcbind-1.2.5/configure.ac.orig rpcbind-1.2.5/configure.ac diff -up rpcbind-1.2.7/configure.ac.orig rpcbind-1.2.7/configure.ac
--- rpcbind-1.2.5/configure.ac.orig 2018-08-15 10:51:19.000000000 -0400 --- rpcbind-1.2.7/configure.ac.orig 2024-07-25 11:55:23.000000000 -0400
+++ rpcbind-1.2.5/configure.ac 2018-08-15 11:14:23.933946110 -0400 +++ rpcbind-1.2.7/configure.ac 2024-07-25 16:55:38.334208493 -0400
@@ -56,6 +56,17 @@ AC_ARG_WITH([systemdsystemunitdir], @@ -73,6 +73,17 @@ AC_ARG_WITH([systemdsystemunitdir],
fi fi
AM_CONDITIONAL(SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) 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], [ AS_IF([test x$enable_libwrap = xyes], [
AC_CHECK_LIB([wrap], [hosts_access], , AC_CHECK_LIB([wrap], [hosts_access], ,
AC_MSG_ERROR([libwrap support requested but unable to find libwrap])) 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 diff -up rpcbind-1.2.7/Makefile.am.orig rpcbind-1.2.7/Makefile.am
--- rpcbind-1.2.5/Makefile.am.orig 2018-08-15 10:51:19.000000000 -0400 --- rpcbind-1.2.7/Makefile.am.orig 2024-07-25 11:55:23.000000000 -0400
+++ rpcbind-1.2.5/Makefile.am 2018-08-15 11:14:23.934946111 -0400 +++ rpcbind-1.2.7/Makefile.am 2024-07-25 16:55:38.335208500 -0400
@@ -59,6 +59,9 @@ rpcbind_LDADD += $(SYSTEMD_LIBS) @@ -59,6 +59,9 @@ rpcbind_LDADD += $(SYSTEMD_LIBS)
systemdsystemunit_DATA = \ systemdsystemunit_DATA = \
systemd/rpcbind.service \ systemd/rpcbind.service \
@ -32,9 +32,9 @@ diff -up rpcbind-1.2.5/Makefile.am.orig rpcbind-1.2.5/Makefile.am
endif endif
rpcinfo_SOURCES = src/rpcinfo.c rpcinfo_SOURCES = src/rpcinfo.c
diff -up rpcbind-1.2.5/systemd/rpcbind.conf.orig rpcbind-1.2.5/systemd/rpcbind.conf diff -up rpcbind-1.2.7/systemd/rpcbind.conf.orig rpcbind-1.2.7/systemd/rpcbind.conf
--- rpcbind-1.2.5/systemd/rpcbind.conf.orig 2018-08-15 11:14:23.934946111 -0400 --- rpcbind-1.2.7/systemd/rpcbind.conf.orig 2024-07-25 16:55:38.335208500 -0400
+++ rpcbind-1.2.5/systemd/rpcbind.conf 2018-08-15 11:14:23.934946111 -0400 +++ rpcbind-1.2.7/systemd/rpcbind.conf 2024-07-25 16:55:38.335208500 -0400
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
+#Type Path Mode UID GID Age Argument +#Type Path Mode UID GID Age Argument
+D /run/rpcbind 0700 rpc rpc - - +D /run/rpcbind 0700 rpc rpc - -

View file

@ -1,61 +0,0 @@
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@:>@])
- ,, [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.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)
- --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]
@@ -3901,7 +3901,7 @@ fi
if test "${with_statedir+set}" = set; then :
withval=$with_statedir;
else
- with_statedir=/var/run/rpcbind
+ with_statedir=/run/rpcbind
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
@@ -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.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"
-#define RPCBINDDLOCK "/var/run/rpcbind.lock"
+#define RPCBINDDLOCK RPCBIND_STATEDIR "/rpcbind.lock"
int runasdaemon = 0;
int insecure = 0;

View file

@ -1,16 +1,16 @@
diff -up rpcbind-0.2.4/src/rpcbind.c.orig rpcbind-0.2.4/src/rpcbind.c diff -up rpcbind-1.2.8/src/rpcbind.c.orig rpcbind-1.2.8/src/rpcbind.c
--- rpcbind-0.2.4/src/rpcbind.c.orig 2017-03-21 10:12:35.005190509 -0400 --- rpcbind-1.2.8/src/rpcbind.c.orig 2025-07-26 16:57:24.000000000 -0400
+++ rpcbind-0.2.4/src/rpcbind.c 2017-03-21 10:36:45.510507649 -0400 +++ rpcbind-1.2.8/src/rpcbind.c 2025-07-26 17:15:51.933467872 -0400
@@ -144,6 +144,8 @@ static void rbllist_add(rpcprog_t, rpcve @@ -214,6 +214,8 @@ static void version()
static void terminate(int); fprintf(stderr, "\n");
static void parseargs(int, char *[]); }
+char *systemdtmp = "/usr/bin/systemd-tmpfiles --create rpcbind.conf"; +char *systemdtmp = "/usr/bin/systemd-tmpfiles --create rpcbind.conf";
+ +
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
@@ -151,13 +153,21 @@ main(int argc, char *argv[]) @@ -221,13 +223,21 @@ main(int argc, char *argv[])
void *nc_handle; /* Net config handle */ void *nc_handle; /* Net config handle */
struct rlimit rl; struct rlimit rl;
int maxrec = RPC_MAXDATASIZE; int maxrec = RPC_MAXDATASIZE;

View file

@ -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

View file

@ -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 <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
+#include <string.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
#include <rpc/rpcb_prot.h>
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 <sys/types.h>
#include <sys/stat.h>
-#include <sys/errno.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include <sys/time.h>
-#include <sys/signal.h>
+#include <signal.h>
#include <sys/file.h>
#include <sys/socket.h>
#include <sys/un.h>
@@ -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 <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <bits/poll.h>
#include <sys/socket.h>
#include <rpc/rpc.h>
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 <net/if.h>
#include <netinet/in.h>
#include <ifaddrs.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <rpc/rpc.h>
#include <errno.h>
#include <stdlib.h>
@@ -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 <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
+#include <string.h>
#include <rpc/rpc.h>
#include <rpc/rpcb_prot.h>
#include <rpc/xdr.h>

View file

@ -3,50 +3,53 @@
%global rpcbind_state_dir %{_rundir}/rpcbind %global rpcbind_state_dir %{_rundir}/rpcbind
Name: rpcbind Name: rpcbind
Version: 1.2.5 Version: 1.2.8
Release: 5.rc1%{?dist}.3 Release: 0%{?dist}
Summary: Universal Addresses to RPC Program Number Mapper Summary: Universal Addresses to RPC Program Number Mapper
License: BSD License: BSD-3-Clause
URL: http://nfsv4.bullopensource.org URL: http://nfsv4.bullopensource.org
Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2 Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
Source1: %{name}.sysconfig Source1: %{name}.sysconfig
Requires: glibc-common setup Requires: glibc-common setup
Requires: libtirpc >= 1.3.5
Conflicts: man-pages < 2.43-12 Conflicts: man-pages < 2.43-12
BuildRequires: make
BuildRequires: automake, autoconf, libtool, systemd, systemd-devel BuildRequires: automake, autoconf, libtool, systemd, systemd-devel
BuildRequires: libtirpc-devel, quota-devel BuildRequires: libtirpc-devel, quota-devel
Requires(pre): coreutils shadow-utils Requires(pre): coreutils
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
Requires(postun): systemd coreutils Requires(postun): systemd coreutils
Patch001: rpcbind-1.2.5-rc1.patch Patch100: rpcbind-0.2.3-systemd-tmpfiles.patch
Patch101: rpcbind-0.2.4-systemd-rundir.patch
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} Provides: portmap = %{version}-%{release}
Obsoletes: portmap <= 4.0-65.3 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 %description
The rpcbind utility is a server that converts RPC program numbers into 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 universal addresses. It must be running on the host to be able to make
RPC calls on a server on that machine. RPC calls on a server on that machine.
%prep %prep
%setup -q %autosetup -p1
# 1637562 - rpcinfo: Fix stack buffer overflow
%patch001 -p1 # Create a sysusers.d config file
cat >rpcbind.sysusers.conf <<EOF
u rpc 32 'Rpcbind Daemon' /var/lib/rpcbind -
EOF
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%build %build
autoreconf -fisv autoreconf -fisv
%configure \ %configure \
@ -70,26 +73,15 @@ make DESTDIR=$RPM_BUILD_ROOT install
install -m644 %{SOURCE1} %{buildroot}/etc/sysconfig/rpcbind install -m644 %{SOURCE1} %{buildroot}/etc/sysconfig/rpcbind
%if "%{_sbindir}" != "%{_bindir}"
# The binaries now live in /usr/bin, moving from /usr/sbin # The binaries now live in /usr/bin, moving from /usr/sbin
# For compatibility create a couple symlinks. # For compatibility create a couple symlinks.
cd ${RPM_BUILD_ROOT}%{_sbindir} cd ${RPM_BUILD_ROOT}%{_sbindir}
ln -sf ../bin/rpcbind ln -sf ../bin/rpcbind
ln -sf ../bin/rpcinfo ln -sf ../bin/rpcinfo
%endif
install -m0644 -D rpcbind.sysusers.conf %{buildroot}%{_sysusersdir}/rpcbind.conf
%pre
# Softly static allocate the rpc uid and gid.
getent group rpc >/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
%post %post
%systemd_post rpcbind.service rpcbind.socket %systemd_post rpcbind.service rpcbind.socket
@ -97,15 +89,16 @@ fi
%preun %preun
%systemd_preun rpcbind.service rpcbind.socket %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 %postun
%systemd_postun_with_restart rpcbind.service rpcbind.socket %systemd_postun_with_restart 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
%files %files
%license COPYING %license COPYING
@ -113,15 +106,95 @@ fi
%doc AUTHORS ChangeLog README %doc AUTHORS ChangeLog README
%{_bindir}/rpcbind %{_bindir}/rpcbind
%{_bindir}/rpcinfo %{_bindir}/rpcinfo
%if "%{_sbindir}" != "%{_bindir}"
%{_sbindir}/rpcbind %{_sbindir}/rpcbind
%{_sbindir}/rpcinfo %{_sbindir}/rpcinfo
%endif
%{_mandir}/man8/* %{_mandir}/man8/*
%{_unitdir}/%{name}.service %{_unitdir}/%{name}.service
%{_unitdir}/%{name}.socket %{_unitdir}/%{name}.socket
%{_tmpfilesdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf
%attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir}
%{_sysusersdir}/rpcbind.conf
%changelog %changelog
* Sat Jul 26 2025 Steve Dickson <steved@redhat.com> 1.2.8-0
- Updated to latest upstream release: rpcbind-1_2_8 (bz 2300081)
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.7-2.rc1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Wed May 7 2025 Scott Mayhew <smayhew@redhat.com> - 1.2.7-2.rc1
- Fix rpm scriptlets to remove excessive restarts during upgrade
* Wed Jan 29 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 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 <releng@fedoraproject.org> - 1.2.7-1.rc1.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Tue Jan 14 2025 Panu Matilainen <pmatilai@redhat.com> - 1.2.7-1.rc1.2
- Add provides for the manually created rpc user and group
* Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.2.7-1.rc1.1
- Rebuilt for the bin-sbin merge (2nd attempt)
* Mon Sep 9 2024 Steve Dickson <steved@redhat.com> 1.2.8-rc1
- Updated to latest upstream RC release: rpcbind-1_2_8-rc1
* Tue Aug 13 2024 Steve Dickson <steved@redhat.com> 1.2.7-1
- Added Requirement for libtirpc (bz 2304327)
* Thu Jul 25 2024 Steve Dickson <steved@redhat.com> 1.2.7-0
- Updated to latest upstream release: rpcbind-1_2_7
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-5.rc3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu Apr 11 2024 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 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 <steved@redhat.com> 1.2.6-4.rc3
- Updated to latest upstream RC release: rpcbind-1_2_7-rc3
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-4.rc2.4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-4.rc2.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Oct 16 2023 Pavel Reichl <preichl@redhat.com> - 1.2.6-4.rc2.2
- Convert License tag to SPDX format
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-4.rc2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Feb 28 2023 Steve Dickson <steved@redhat.com> 1.2.6-4.rc2
- Updated to latest upstream RC release: rpcbind-1_2_7-rc2
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon May 17 2021 Steve Dickson <steved@redhat.com> 1.2.6-0
- Updated to latest upstream release: rpcbind-1_2_6 (bz 1959127)
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 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 <releng@fedoraproject.org> - 1.2.5-5.rc1.4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5-5.rc1.3 * Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5-5.rc1.3
- Second attempt - Rebuilt for - Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (rpcbind-1.2.5.tar.bz2) = e884c4757950ccead0f9a07f50625a63e6f18f9bfae9fcfffa3e5fa4b7a66c3a99d9fa303061848fe8211509d5456f24ff26e4579af6e161a35522268f3ef3e4 SHA512 (rpcbind-1.2.8.tar.bz2) = 66f3955a67c4d0142ec635614ceafbc9bdbea985f2edaeec903f17efaf3c2e98f6483e8e6b7f1358cf8d2c1c877b281d153a3bf1b6748b6d259ae7ad1465ee71