forked from rpms/rpcbind
Compare commits
No commits in common. "c8" and "c9s" have entirely different histories.
5
.gitignore
vendored
5
.gitignore
vendored
@ -1 +1,4 @@
|
||||
SOURCES/rpcbind-1.2.5.tar.bz2
|
||||
x86_64
|
||||
Makefile
|
||||
/rpcbind-1.2.6.tar.bz2
|
||||
rpcbind-1.2.6/
|
||||
|
@ -1 +0,0 @@
|
||||
e9f8046b69b45efe2396a8cca1c1f090644c6d31 SOURCES/rpcbind-1.2.5.tar.bz2
|
@ -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 *
|
@ -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
|
||||
|
@ -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
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
138
rpcbind-0.2.3-create-statdir.patch
Normal file
138
rpcbind-0.2.3-create-statdir.patch
Normal 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);
|
@ -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 - -
|
@ -1,6 +1,6 @@
|
||||
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
|
||||
--- 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)
|
||||
|
||||
@ -14,7 +14,7 @@ diff -up rpcbind-1.2.5/configure.ac.orig rpcbind-1.2.5/configure.ac
|
||||
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
|
||||
+++ 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]
|
||||
@ -35,7 +35,7 @@ diff -up rpcbind-1.2.5/configure.orig rpcbind-1.2.5/configure
|
||||
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
|
||||
+++ 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
|
||||
@ -49,7 +49,7 @@ diff -up rpcbind-1.2.5/man/rpcbind-fr.8.orig rpcbind-1.2.5/man/rpcbind-fr.8
|
||||
.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
|
||||
+++ 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"
|
@ -1,7 +1,7 @@
|
||||
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)
|
||||
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-08-16 10:16:03.196903368 -0400
|
||||
+++ rpcbind-1.2.6/src/rpcbind.c 2022-08-16 10:16:38.595062481 -0400
|
||||
@@ -562,8 +562,10 @@ init_transport(struct netconfig *nconf)
|
||||
syslog(LOG_ERR, "cannot bind %s on %s: %m",
|
||||
(hosts[nhostsbak] == NULL) ? "*" :
|
||||
hosts[nhostsbak], nconf->nc_netid);
|
@ -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.6/systemd/rpcbind.service.in.orig rpcbind-1.2.6/systemd/rpcbind.service.in
|
||||
--- rpcbind-1.2.6/systemd/rpcbind.service.in.orig 2021-06-23 14:09:47.696252854 -0400
|
||||
+++ rpcbind-1.2.6/systemd/rpcbind.service.in 2021-06-23 14:10:25.279413508 -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.
|
101
rpcbind.init
Executable file
101
rpcbind.init
Executable 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
|
@ -3,50 +3,34 @@
|
||||
%global rpcbind_state_dir %{_rundir}/rpcbind
|
||||
|
||||
Name: rpcbind
|
||||
Version: 1.2.5
|
||||
Release: 10%{?dist}
|
||||
Version: 1.2.6
|
||||
Release: 7%{?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
|
||||
URL: https://sourceforge.net/projects/rpcbind/
|
||||
|
||||
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 policycoreutils
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd coreutils
|
||||
|
||||
#
|
||||
# RHEL 8.0
|
||||
# RHEL9.1
|
||||
#
|
||||
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
|
||||
Patch001: rpcbind-1.2.6-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
|
||||
Patch103: rpcbind-0.2.4-systemd-service.patch
|
||||
Patch103: rpcbind-1.2.6-systemd-service.patch
|
||||
Patch104: rpcbind-0.2.4-systemd-rundir.patch
|
||||
|
||||
Provides: portmap = %{version}-%{release}
|
||||
@ -58,28 +42,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 +57,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,12 +96,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
|
||||
@ -153,9 +110,8 @@ then
|
||||
/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 +125,79 @@ 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)
|
||||
* Thu Feb 15 2024 Pavel Reichl <preichl@redhat.com> - 1.2.6-7
|
||||
- Fix gating - use explicit script name to run the test
|
||||
- Related: RHEL-7884
|
||||
|
||||
* Tue May 31 2022 Steve Dickson <steved@redhat.com> - 1.2.5-9
|
||||
- network_init: initialize response addrinfo list to NULL (bz 1959003)
|
||||
* Mon Feb 12 2024 Pavel Reichl <preichl@redhat.com> - 1.2.6-6
|
||||
- Add support for gating
|
||||
- Related: RHEL-7884
|
||||
|
||||
* Thu Nov 19 2020 Steve Dickson <steved@redhat.com> - 1.2.5-8
|
||||
- security: dowgrade priority for non-libwrap CALLIT logging (bz 1897122)
|
||||
* Tue Sep 6 2022 Steve Dickson <steved@redhat.com> - 1.2.6-5
|
||||
- Fixed a typo in changelog (bz 2115517)
|
||||
|
||||
* 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 Aug 16 2022 Steve Dickson <steved@redhat.com> - 1.2.6-4
|
||||
- Use %autosetup -p1 to make sure patches apply (bz 2115517)
|
||||
|
||||
* Thu Jan 16 2020 Steve Dickson <steved@redhat.com> - 1.2.5-6
|
||||
- Use sysconfig variable in service file (bz 1764985)
|
||||
* Tue Aug 16 2022 Steve Dickson <steved@redhat.com> - 1.2.6-3
|
||||
- Fixed a double free in init_transport (bz 2115517)
|
||||
|
||||
* Mon Nov 11 2019 Steve Dickson <steved@redhat.com> - 1.2.5-5
|
||||
- Removed some issues found by covscan (bz 1602680)
|
||||
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.6-2
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Fri Jul 26 2019 Steve Dickson <steved@redhat.com> - 1.2.5-4
|
||||
- Enable gating using reverse dependency testing of nfs-utils (bz 1681967
|
||||
* Wed Jun 23 2021 Steve Dickson <steved@redhat.com> - 1.2.6-1
|
||||
- Use sysconfig variable in service file (bz 1972094)
|
||||
- Make sure policycoreutils is installed before using it (bz 1972133)
|
||||
- Make sure /var/lib/rpcbind exists (bz 1972133)
|
||||
- Corrected the URL reference (bz 1972117)
|
||||
|
||||
* Sat Oct 20 2018 Steve Dickson <steved@redhat.com> - 1.2.5-3
|
||||
- Update the URL (bz 1638664)
|
||||
* Tue Jun 22 2021 Steve Dickson <steved@redhat.com> - 1.2.6-0
|
||||
- Rebased to latest upstream release: rpcbind-1-2-6 (bz 1959128)
|
||||
|
||||
* Mon Oct 15 2018 Josh Boyer <jwboyer@redhat.com> - 1.2.5-2
|
||||
- Make sure policycoreutils is installed before using it (bz 1628901)
|
||||
* Mon Jun 7 2021 Steve Dickson <steved@redhat.com> - 1.2.5-6.rc1
|
||||
- Disable remote calls (bz 1923041)
|
||||
|
||||
* 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)
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.5-5.rc1.5
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Tue Aug 21 2018 Steve Dickson <steved@redhat.com> - 1.2.5-0
|
||||
- Updated to upstream lastest release: 1_2_5 (bz 1605131)
|
||||
* 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
1
sources
Normal file
@ -0,0 +1 @@
|
||||
SHA512 (rpcbind-1.2.6.tar.bz2) = fb89c61be4c533fe2e6057749d97079a2d1c9fac0d35d6be1a159a0edbf86092b3fc121f19fa920e75aac5ecdd3f59f5978e6401d5cad16cd438c977736206a7
|
18
tests/tests.yml
Normal file
18
tests/tests.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
# Tests that run in classic context
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
use_beakerlib_libraries: yes
|
||||
tags:
|
||||
- classic
|
||||
repositories:
|
||||
- repo: "https://pkgs.devel.redhat.com/git/tests/nfs-utils"
|
||||
dest: "tests"
|
||||
tests:
|
||||
- tests/function/nfs-mount-options-all/main.sh
|
||||
- tests/rpcbind/rpcinfo_common/main.sh
|
||||
- tests/rpcbind/services/systemd/rpcbind/main.sh
|
||||
required_packages:
|
||||
- nfs-utils
|
||||
- redhat-lsb-core # lsb_release is needed by tests
|
Loading…
Reference in New Issue
Block a user