public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Scott Mayhew <smayhew@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpcbind] f44: rpcbind: rename RPCBIND_ARGS to RPCBIND_OPTIONS in /etc/sysconfig/rpcbind
Date: Wed, 01 Jul 2026 15:43:06 GMT	[thread overview]
Message-ID: <178292058649.1.1119785258365819388.rpms-rpcbind-dbdd84359764@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/rpcbind
            Branch : f44
            Commit : dbdd8435976475965e82b11362e0130a95b42d75
            Author : Scott Mayhew <smayhew@redhat.com>
            Date   : 2026-07-01T08:33:57-04:00
            Stats  : +5/-305 in 5 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpcbind/c/dbdd8435976475965e82b11362e0130a95b42d75?branch=f44

            Log:
            rpcbind: rename RPCBIND_ARGS to RPCBIND_OPTIONS in /etc/sysconfig/rpcbind

rpcbind.service uses RPCBIND_OPTIONS, but /etc/sysconfig/rpcbind uses
RPCBIND_ARGS, resulting in this error in the journal on startup:

rpcbind.service: Referenced but unset environment variable evaluates to an empty string: RPCBIND_OPTIONS

as well as settings being placed in /etc/sysconfig/rpcbind having no
effect.

Also clean up unused patches rpcbind-0.2.3-create-statdir.patch and
rpcbind-1.2.5-rpcinfo-bufoverflow.patch, as well as unused source file
rpcbind.init.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>

---
diff --git a/rpcbind-0.2.3-create-statdir.patch b/rpcbind-0.2.3-create-statdir.patch
deleted file mode 100644
index ec6a8e9..0000000
--- a/rpcbind-0.2.3-create-statdir.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-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);

diff --git a/rpcbind-1.2.5-rpcinfo-bufoverflow.patch b/rpcbind-1.2.5-rpcinfo-bufoverflow.patch
deleted file mode 100644
index e9cd522..0000000
--- a/rpcbind-1.2.5-rpcinfo-bufoverflow.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-commit 0bc1c0ae7ce61a7ac8a8e9a9b2086268f011abf0
-Author: Steve Dickson <steved@redhat.com>
-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 <chuck.lever@oracle.com>
-    Signed-off-by: Thomas Blume <thomas.blume@suse.com>
-    Signed-off-by: Steve Dickson <steved@redhat.com>
-
-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.init b/rpcbind.init
deleted file mode 100755
index 54bff53..0000000
--- a/rpcbind.init
+++ /dev/null
@@ -1,101 +0,0 @@
-#! /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

diff --git a/rpcbind.spec b/rpcbind.spec
index e051d65..b6850e4 100644
--- a/rpcbind.spec
+++ b/rpcbind.spec
@@ -4,7 +4,7 @@
 
 Name:           rpcbind
 Version:        1.2.9
-Release:        0%{?dist}
+Release:        1%{?dist}
 Summary:        Universal Addresses to RPC Program Number Mapper
 License:        BSD-3-Clause
 URL:            https://sourceforge.net/projects/rpcbind
@@ -118,6 +118,9 @@ install -m0644 -D rpcbind.sysusers.conf %{buildroot}%{_sysusersdir}/rpcbind.conf
 %{_sysusersdir}/rpcbind.conf
 
 %changelog
+* Tue Jun 30 2026 Scott Mayhew <smayhew@redhat.com> 1.2.9-1
+- Renamed RPCBIND_ARGS to RPCBIND_OPTIONS in /etc/sysconfig/rpcbind
+
 * Sat Jun 13 2026 Steve Dickson <steved@redhat.com> 1.2.9-0
 - Updated to latest upstream release: rpcbind-1_2_9 (bz 2482426)
 

diff --git a/rpcbind.sysconfig b/rpcbind.sysconfig
index 4b35e37..af48d11 100644
--- a/rpcbind.sysconfig
+++ b/rpcbind.sysconfig
@@ -1,3 +1,3 @@
 #
 # Optional arguments passed to rpcbind. See rpcbind(8)
-RPCBIND_ARGS=""
+RPCBIND_OPTIONS=""

                 reply	other threads:[~2026-07-01 15:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178292058649.1.1119785258365819388.rpms-rpcbind-dbdd84359764@fedoraproject.org \
    --to=smayhew@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox