Compare commits

...

No commits in common. "c8" and "c10s" have entirely different histories.
c8 ... c10s

21 changed files with 399 additions and 290 deletions

5
.gitignore vendored
View File

@ -1 +1,4 @@
SOURCES/rpcbind-1.2.5.tar.bz2
x86_64
Makefile
rpcbind-1.2.7/
/rpcbind-1.2.7.tar.bz2

View File

@ -1 +0,0 @@
e9f8046b69b45efe2396a8cca1c1f090644c6d31 SOURCES/rpcbind-1.2.5.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,94 +0,0 @@
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 2020-02-06 14:19:34.199330296 -0500
+++ rpcbind-1.2.5/src/rpcbind.c 2020-02-06 14:20:19.069973902 -0500
@@ -350,7 +350,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 ? */
@@ -827,8 +827,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 2020-02-06 14:20:19.073973959 -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/rpcinfo.c.orig rpcbind-1.2.5/src/rpcinfo.c
--- rpcbind-1.2.5/src/rpcinfo.c.orig 2020-02-06 14:19:34.193330210 -0500
+++ rpcbind-1.2.5/src/rpcinfo.c 2020-02-06 14:20:19.073973959 -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);
}
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 2020-02-06 14:20:51.564439986 -0500
+++ rpcbind-1.2.5/src/util.c 2020-02-06 14:20:39.994274027 -0500
@@ -322,13 +322,20 @@ 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);
s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
+ if (s < 0) {
+ if (debugging)
+ fprintf(stderr, "socket(AF_INET6) failed: %s\n", strerror(errno));
+ freeaddrinfo (res);
+ return;
+ }
/*
* Loop through all interfaces. For each IPv6 multicast-capable
@@ -351,9 +358,9 @@ network_init()
if (debugging)
perror("setsockopt v6 multicast");
}
+ close(s);
#endif
-
- /* close(s); */
+ freeaddrinfo (res);
}
struct sockaddr *

View File

@ -1,15 +0,0 @@
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 2022-08-04 15:56:21.398070276 -0400
+++ rpcbind-1.2.5/src/rpcbind.c 2022-08-04 15:56:57.255699229 -0400
@@ -563,8 +563,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++;

View File

@ -1,30 +0,0 @@
From 7be92b30e47801c651e5316217d1651454653f68 Mon Sep 17 00:00:00 2001
From: Roberto Bergantinos Corpas <rbergant@redhat.com>
Date: Mon, 16 Nov 2020 08:39:36 -0500
Subject: [PATCH] security: dowgrade priority for non-libwrap CALLIT logging
Use aswell auth.warning for non-libwrap CALLIT logging, otherwise
we'll broadcast everywhere for a call that is not allowed anyway
Signed-off-by: Roberto Bergantinos Corpas <rbergant@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
src/security.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/security.c b/src/security.c
index 329c53d..38967dd 100644
--- a/src/security.c
+++ b/src/security.c
@@ -346,7 +346,7 @@ deny:
logit(deny_severity, sa, args->rmt_proc, args->rmt_prog,
": indirect call not allowed");
#else
- logit(0, sa, args->rmt_proc, args->rmt_prog,
+ logit(LOG_AUTH|LOG_WARNING, sa, args->rmt_proc, args->rmt_prog,
": indirect call not allowed");
#endif
return 0;
--
2.26.2

View File

@ -1,12 +0,0 @@
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 2022-05-31 08:47:51.624211564 -0400
+++ rpcbind-1.2.5/src/util.c 2022-05-31 08:49:54.577060858 -0400
@@ -287,7 +287,7 @@ network_init()
int s;
#endif
int ecode;
- struct addrinfo hints, *res;
+ struct addrinfo hints, *res = NULL;
memset(&hints, 0, sizeof hints);
hints.ai_family = AF_INET;

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -0,0 +1,138 @@
commit 1805cdb116bd076dc5746beeb6dc79067a79d094
Author: NeilBrown <neilb@suse.com>
Date: Wed Nov 16 10:53:07 2016 -0500
Move default state-dir to a subdirectory of /var/run
rpcbind can save state in a file to allow restart without forgetting
about running services.
The default location is currently "/tmp" which is
not ideal for system files. It is particularly unpleasant
to put simple files there rather than creating a directory
to contain them.
On a modern Linux system it is preferable to use /run, and there it is
even more consistent with practice to use a subdirectory.
This directory needs to be create one each boot, and while there are
tools (e.g. systemd-tmpfiles) which can do that it is cleaner to keep
rpcbind self-contained and have it create the directory.
So change the default location to /var/run/rpcbind, and create that
directory. If a different user-id is used, we need to create
and chown the directory before dropping privileges. We do this
with care so avoid chowning the wrong thing by mistake.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/configure.ac b/configure.ac
index f84921e..acc6914 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,8 +22,8 @@ AC_ARG_ENABLE([warmstarts],
AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes)
AC_ARG_WITH([statedir],
- AS_HELP_STRING([--with-statedir=ARG], [use ARG as state dir @<:@default=/tmp@:>@])
- ,, [with_statedir=/tmp])
+ AS_HELP_STRING([--with-statedir=ARG], [use ARG as state dir @<:@default=/var/run/rpcbind@:>@])
+ ,, [with_statedir=/var/run/rpcbind])
AC_SUBST([statedir], [$with_statedir])
AC_ARG_WITH([rpcuser],
diff --git a/src/rpcbind.c b/src/rpcbind.c
index 87ccdc2..8db8dfc 100644
--- a/src/rpcbind.c
+++ b/src/rpcbind.c
@@ -263,6 +263,11 @@ main(int argc, char *argv[])
syslog(LOG_ERR, "cannot get uid of '%s': %m", id);
exit(1);
}
+#ifdef WARMSTART
+ if (warmstart) {
+ mkdir_warmstart(p->pw_uid);
+ }
+#endif
if (setgid(p->pw_gid) == -1) {
syslog(LOG_ERR, "setgid to '%s' (%d) failed: %m", id, p->pw_gid);
exit(1);
diff --git a/src/rpcbind.h b/src/rpcbind.h
index 74f9591..5b1a9bb 100644
--- a/src/rpcbind.h
+++ b/src/rpcbind.h
@@ -129,6 +129,7 @@ int is_localroot(struct netbuf *);
extern void pmap_service(struct svc_req *, SVCXPRT *);
#endif
+void mkdir_warmstart(int uid);
void write_warmstart(void);
void read_warmstart(void);
diff --git a/src/warmstart.c b/src/warmstart.c
index 122a058..aafcb61 100644
--- a/src/warmstart.c
+++ b/src/warmstart.c
@@ -45,19 +45,23 @@
#include <syslog.h>
#include <unistd.h>
#include <errno.h>
+#include <fcntl.h>
#include "rpcbind.h"
-#ifndef RPCBIND_STATEDIR
-#define RPCBIND_STATEDIR "/tmp"
-#endif
-
/* These files keep the pmap_list and rpcb_list in XDR format */
#define RPCBFILE RPCBIND_STATEDIR "/rpcbind.xdr"
#ifdef PORTMAP
#define PMAPFILE RPCBIND_STATEDIR "/portmap.xdr"
#endif
+#ifndef O_DIRECTORY
+#define O_DIRECTORY 0
+#endif
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW 0
+#endif
+
static bool_t write_struct(char *, xdrproc_t, void *);
static bool_t read_struct(char *, xdrproc_t, void *);
@@ -139,8 +143,33 @@ error:
}
void
+mkdir_warmstart(int uid)
+{
+ /* Already exists? */
+ if (access(RPCBIND_STATEDIR, X_OK) == 0)
+ return;
+
+ if (mkdir(RPCBIND_STATEDIR, 0770) == 0) {
+ int fd = open(RPCBIND_STATEDIR, O_RDONLY | O_DIRECTORY | O_NOFOLLOW);
+ if (fd >= 0) {
+ if (fchown(fd, uid, -1) < 0) {
+ syslog(LOG_ERR,
+ "mkdir_warmstart: open failed '%s', errno %d (%s)",
+ RPCBIND_STATEDIR, errno, strerror(errno));
+ }
+ close(fd);
+ } else
+ syslog(LOG_ERR, "mkdir_warmstart: open failed '%s', errno %d (%s)",
+ RPCBIND_STATEDIR, errno, strerror(errno));
+ } else
+ syslog(LOG_ERR, "mkdir_warmstart: mkdir failed '%s', errno %d (%s)",
+ RPCBIND_STATEDIR, errno, strerror(errno));
+}
+
+void
write_warmstart()
{
+ (void) mkdir(RPCBIND_STATEDIR, 0770);
(void) write_struct(RPCBFILE, (xdrproc_t)xdr_rpcblist_ptr, &list_rbl);
#ifdef PORTMAP
(void) write_struct(PMAPFILE, (xdrproc_t)xdr_pmaplist_ptr, &list_pml);

View File

@ -0,0 +1,11 @@
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]

View File

@ -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.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,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.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 \
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.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 - -

View File

@ -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-21 13:16:53.778658897 -0400
+++ rpcbind-1.2.5/configure.ac 2018-08-21 13:18:30.810307201 -0400
@@ -26,8 +26,8 @@ AC_ARG_ENABLE([rmtcalls],
diff -up rpcbind-1.2.7/configure.ac.orig rpcbind-1.2.7/configure.ac
--- rpcbind-1.2.7/configure.ac.orig 2024-07-30 10:57:07.374738667 -0400
+++ rpcbind-1.2.7/configure.ac 2024-07-30 10:59:36.195668928 -0400
@@ -32,8 +32,8 @@ AC_ARG_ENABLE([rmtcalls],
AM_CONDITIONAL(RMTCALLS, test x$enable_rmtcalls = xyes)
AC_ARG_WITH([statedir],
@ -12,10 +12,10 @@ 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-21 13:18:30.811307187 -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-30 11:01:42.660459442 -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.5/configure.orig rpcbind-1.2.5/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.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-21 13:18:30.812307174 -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-30 10:59:36.198668946 -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-21 13:18:30.812307174 -0400
@@ -106,7 +106,7 @@ char *nss_modules = "files";
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-30 10:57:07.404738854 -0400
+++ rpcbind-1.2.7/src/rpcbind.c 2024-07-30 10:59:36.198668946 -0400
@@ -105,7 +105,7 @@ char *nss_modules = "files";
/* who to suid to if -s is given */
#define RUN_AS "daemon"

View File

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

View File

@ -1,6 +1,6 @@
diff -up rpcbind-1.2.5/systemd/rpcbind.service.in.orig rpcbind-1.2.5/systemd/rpcbind.service.in
--- rpcbind-1.2.5/systemd/rpcbind.service.in.orig 2020-01-16 11:40:30.329120662 -0500
+++ rpcbind-1.2.5/systemd/rpcbind.service.in 2020-01-16 11:44:26.605895713 -0500
diff -up rpcbind-1.2.7/systemd/rpcbind.service.in.orig rpcbind-1.2.7/systemd/rpcbind.service.in
--- rpcbind-1.2.7/systemd/rpcbind.service.in.orig 2024-08-06 15:49:22.161273198 -0400
+++ rpcbind-1.2.7/systemd/rpcbind.service.in 2024-08-06 15:49:49.210454941 -0400
@@ -7,13 +7,14 @@ RequiresMountsFor=@statedir@
# Make sure we use the IP addresses listed for
# rpcbind.socket, no matter how this unit is started.
@ -13,8 +13,8 @@ diff -up rpcbind-1.2.5/systemd/rpcbind.service.in.orig rpcbind-1.2.5/systemd/rpc
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_ARGS -w -f
-ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f
+ExecStart=@_sbindir@/rpcbind $RPCBIND_ARGS @warmstarts_opt@ -f
[Install]
WantedBy=multi-user.target

101
rpcbind.init Executable file
View File

@ -0,0 +1,101 @@
#! /bin/sh
#
# rpcbind Start/Stop RPCbind
#
# chkconfig: 2345 13 87
# 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 RPC calls on a server on that machine.
#
# processname: rpcbind
# probe: true
# config: /etc/sysconfig/rpcbind
# This is an interactive program, we need the current locale
[ -f /etc/profile.d/lang.sh ] && . /etc/profile.d/lang.sh
# We can't Japanese on normal console at boot time, so force LANG=C.
if [ "$LANG" = "ja" -o "$LANG" = "ja_JP.eucJP" ]; then
if [ "$TERM" = "linux" ] ; then
LANG=C
fi
fi
# Source function library.
. /etc/init.d/functions
# Source networking configuration.
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
prog="rpcbind"
[ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
RETVAL=0
uid=`id | cut -d\( -f1 | cut -d= -f2`
start() {
# Check that networking is up.
[ "$NETWORKING" = "yes" ] || exit 6
[ -f /sbin/$prog ] || exit 5
# Make sure the rpcbind is not already running.
if status $prog > /dev/null ; then
exit 0
fi
# Only root can start the service
[ $uid -ne 0 ] && exit 4
echo -n $"Starting $prog: "
daemon $prog $RPCBIND_ARGS $1
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && {
rm -f /var/lock/subsys/$prog
rm -f /var/run/rpcbind*
}
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $prog
RETVAL=$?
;;
restart | reload| force-reload)
$0 stop
$0 start
RETVAL=$?
;;
condrestart | try-restart)
if [ -f /var/lock/subsys/$prog ]; then
$0 stop
$0 start -w
RETVAL=$?
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|try-restart}"
RETVAL=2
;;
esac
exit $RETVAL

View File

@ -3,46 +3,25 @@
%global rpcbind_state_dir %{_rundir}/rpcbind
Name: rpcbind
Version: 1.2.5
Release: 10%{?dist}
Version: 1.2.7
Release: 3%{?dist}
Summary: Universal Addresses to RPC Program Number Mapper
Group: System Environment/Daemons
License: BSD
URL: http://git.linux-nfs.org/?p=steved/rpcbind.git;a=summary
License: BSD-3-Clause
URL: http://nfsv4.bullopensource.org
Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
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
Requires(post): chkconfig systemd policycoreutils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd coreutils
#
# RHEL 8.0
#
Patch001: rpcbind-1.2.5-rpcinfo-bufoverflow.patch
#
# RHEL 8.2
#
Patch002: rpcbind-1.2.5-covscan-resource-leaks.patch
#
# RHEL 8.4
#
Patch003: rpcbind-1.2.5-dowgrade-priority-callit.patch
#
# RHEL 8.7
#
Patch004: rpcbind-1.2.5-network_init.patch
Patch005: rpcbind-1.2.5-double-free.patch
Patch100: rpcbind-0.2.3-systemd-envfile.patch
Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch
Patch102: rpcbind-0.2.4-runstatdir.patch
@ -58,28 +37,8 @@ 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
%autosetup -p1
# 1637565 - rpcinfo: Fix stack buffer overflow
%patch001 -p1
# 1602680 - Please review important issues found by covscan...
%patch002 -p1
# 1897122 - rpcbind : downgrade priority for non-libwrap CALLIT logging
%patch003 -p1
# 1959003 - network_init: initialize response addrinfo list to NULL
%patch004 -p1
# 2115209 - rpcbind: free(): double free detected in tcache 2
%patch005 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%build
autoreconf -fisv
%configure \
@ -93,7 +52,6 @@ autoreconf -fisv
make all
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}{%{_sbindir},%{_bindir},/etc/sysconfig}
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_tmpfilesdir}
@ -133,29 +91,15 @@ 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
/bin/systemctl reenable rpcbind.socket >/dev/null 2>&1 || :
/bin/systemctl restart rpcbind.socket >/dev/null 2>&1 || :
fi
if [ ! -d /var/lib/rpcbind ]
then
mkdir /var/lib/rpcbind
chown rpc:rpc /var/lib/rpcbind
[ -x /usr/sbin/restorecon ] && \
/usr/sbin/restorecon /var/lib/rpcbind
fi
%files
%defattr(-,root,root)
%license COPYING
%config(noreplace) /etc/sysconfig/rpcbind
%doc AUTHORS ChangeLog README
%{_bindir}/rpcbind
@ -169,39 +113,93 @@ fi
%attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir}
%changelog
* Thu Aug 4 2022 Steve Dickson <steved@redhat.com> - 1.2.5-10
- rpcbind: fix double free in init_transport (bz 2115209)
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.2.7-3
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Tue May 31 2022 Steve Dickson <steved@redhat.com> - 1.2.5-9
- network_init: initialize response addrinfo list to NULL (bz 1959003)
* Wed Aug 7 2024 Steve Dickson <steved@redhat.com> rpcbind-1.2.7-2
- Disable remote calls (RHEL-35644)
* Thu Nov 19 2020 Steve Dickson <steved@redhat.com> - 1.2.5-8
- security: dowgrade priority for non-libwrap CALLIT logging (bz 1897122)
* Tue Aug 6 2024 Steve Dickson <steved@redhat.com> rpcbind-1.2.7-1
- The default config RPCBIND_ARGS in /etc/sysconfig/rpcbind is wrong (RHEL-32326)
* Thu Feb 6 2020 Steve Dickson <steved@redhat.com> - 1.2.5-7
- Clean up a error path found by a covscan (bz 1602680)
* Tue Jul 30 2024 Steve Dickson <steved@redhat.com> rpcbind-1.2.7-0
- Updated to latest upstream release: rpcbind-1_2_7 (RHEL-50505)
* Thu Jan 16 2020 Steve Dickson <steved@redhat.com> - 1.2.5-6
- Use sysconfig variable in service file (bz 1764985)
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.2.6-4.rc2.5
- Bump release for June 2024 mass rebuild
* Mon Nov 11 2019 Steve Dickson <steved@redhat.com> - 1.2.5-5
- Removed some issues found by covscan (bz 1602680)
* 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
* Fri Jul 26 2019 Steve Dickson <steved@redhat.com> - 1.2.5-4
- Enable gating using reverse dependency testing of nfs-utils (bz 1681967
* 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
* Sat Oct 20 2018 Steve Dickson <steved@redhat.com> - 1.2.5-3
- Update the URL (bz 1638664)
* Mon Oct 16 2023 Pavel Reichl <preichl@redhat.com> - 1.2.6-4.rc2.2
- Convert License tag to SPDX format
* Mon Oct 15 2018 Josh Boyer <jwboyer@redhat.com> - 1.2.5-2
- Make sure policycoreutils is installed before using it (bz 1628901)
* 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
* Wed Oct 10 2018 Steve Dickson <steved@redhat.com> - 1.2.5-1
- Fixed stack buffer overflow in rpcinfo (bz 1637565)
- Make sure /var/lib/rpcbind exists (bz 1628901)
* 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
* Tue Aug 21 2018 Steve Dickson <steved@redhat.com> - 1.2.5-0
- Updated to upstream lastest release: 1_2_5 (bz 1605131)
* 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
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5-5.rc1.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5-5.rc1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Nov 11 2019 Steve Dickson <steved@redhat.com> - 1.2.5-5.rc1
- Updated to latest upstream RC release: rpcbind-1_2_5-rc1 (bz 1431574)
* Thu Sep 19 2019 Steve Dickson <steved@redhat.com> - 1.2.5-5
- Enable remote calls which are used by NIS and other packages (bz 1630672)
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Oct 17 2018 Peter Robinson <pbrobinson@fedoraproject.org> 1.2.5-2
- Drop old sys-v migration bits
- Ship the license file, minor spec cleanups
* Tue Oct 9 2018 Steve Dickson <steved@redhat.com> - 1.2.5-1
- Fixed stack buffer overflow in rpcinfo (bz 1637562)
* Wed Aug 15 2018 Steve Dickson <steved@redhat.com> - 1.2.5-0
- Updated to latest upstream release: 1_2_5
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-10.rc3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Feb 24 2018 Florian Weimer <fweimer@redhat.com> - 0.2.4-10.rc3
- Use default build flags from redhat-rpm-config

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (rpcbind-1.2.7.tar.bz2) = ca1517bdab86221d13c645042cc31b25b4d2b574d63ebaa20da4f5392b611cf58811f267214293e953f504d364e5daaa5875eab7aa68a04b89e68fd5508e3926

3
tests/scripts/runtest.sh Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/bash
rpcbind
rpcinfo

11
tests/tests.yml Normal file
View File

@ -0,0 +1,11 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- simple:
dir: scripts
run: ./runtest.sh
required_packages:
- rpcbind