Hello community,

here is the log from the commit of package rpcbind for openSUSE:Factory checked 
in at 2018-04-04 11:03:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rpcbind (Old)
 and      /work/SRC/openSUSE:Factory/.rpcbind.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rpcbind"

Wed Apr  4 11:03:37 2018 rev:56 rq:593305 version:0.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/rpcbind/rpcbind.changes  2017-11-29 
10:49:54.358644864 +0100
+++ /work/SRC/openSUSE:Factory/.rpcbind.new/rpcbind.changes     2018-04-04 
11:03:43.655716933 +0200
@@ -1,0 +2,31 @@
+Tue Apr  3 12:06:36 UTC 2018 - [email protected]
+
+- Correctly rebase 0001-systemd-unit-files.patch: Since upstream
+  now ships systemd service files, we must no longer create full
+  unit files, but only correct the existing ones (adding
+  EnvironmentFile statement).
+
+-------------------------------------------------------------------
+Mon Mar 26 17:11:19 CEST 2018 - [email protected]
+
+- Use %license instead of %doc [bsc#1082318]
+
+-------------------------------------------------------------------
+Sun Feb 18 19:48:56 UTC 2018 - [email protected]
+
+- Update to 0.2.4:
+  + Memory corruption fix
+  + Moved the default state directory to /var/run
+  + Systemd unit files were added.
+- cleanup with spec-cleaner
+- don't ship NEWS or ChangeLog, these are not maintained
+- rebase 0001-systemd-unit-files.patch
+- remove upstreamed patches
+  * drop 0002-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
+  * drop 0003-Delete-the-unix-socket-only-if-we-have-created-it.patch
+  * drop 0004-Fix-memory-corruption-in-PMAP_CALLIT-code.patch
+  * drop 0005-security.c-removed-warning.patch
+  * drop 0006-don-t-use-svc_fdset.patch
+  * drop 0012-Move-default-state-dir-to-a-subdirectory-of-var-run.patch
+
+-------------------------------------------------------------------

Old:
----
  0002-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
  0003-Delete-the-unix-socket-only-if-we-have-created-it.patch
  0004-Fix-memory-corruption-in-PMAP_CALLIT-code.patch
  0005-security.c-removed-warning.patch
  0006-don-t-use-svc_fdset.patch
  0012-Move-default-state-dir-to-a-subdirectory-of-var-run.patch
  rpcbind-0.2.3.tar.bz2

New:
----
  rpcbind-0.2.4.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rpcbind.spec ++++++
--- /var/tmp/diff_new_pack.kUv8g5/_old  2018-04-04 11:03:44.711678660 +0200
+++ /var/tmp/diff_new_pack.kUv8g5/_new  2018-04-04 11:03:44.715678515 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rpcbind
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,53 +18,45 @@
 
 #Compat macro for new _fillupdir macro introduced in Nov 2017
 %if ! %{defined _fillupdir}
-  %define _fillupdir /var/adm/fillup-templates
+  %define _fillupdir %{_localstatedir}/adm/fillup-templates
 %endif
-
 Name:           rpcbind
-Version:        0.2.3
+Version:        0.2.4
 Release:        0
 Summary:        Transport independent RPC portmapper
+# Git-Web:      http://git.linux-nfs.org/?p=steved/rpcbind.git;a=summary
 License:        BSD-4-Clause
 Group:          Productivity/Networking/System
-Url:            git://git.infradead.org/users/steved/rpcbind.git
-Source:         %{name}-%{version}.tar.bz2
+Url:            http://rpcbind.sourceforge.net
+Source:         
https://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
 Source2:        sysconfig.rpcbind
 Source3:        rpcbind.xml
 Source4:        pmap_set.c
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-%if 0%{?suse_version} >= 1330
-BuildRequires:  libnsl-devel
-%endif
-BuildRequires:  libtirpc-devel >= 1.0.1
-BuildRequires:  libtool
-BuildRequires:  pkgconfig
-BuildRequires:  systemd-rpm-macros
-BuildRequires:  tcpd-devel
-BuildRequires:  pkgconfig(libsystemd)
-PreReq:         %fillup_prereq
-Requires(pre):  /usr/sbin/useradd
-%if 0%{?suse_version} >= 1330
-Requires(pre):  group(nobody)
-%endif
 Patch1:         0001-systemd-unit-files.patch
-Patch2:         0002-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
-Patch3:         0003-Delete-the-unix-socket-only-if-we-have-created-it.patch
-Patch4:         0004-Fix-memory-corruption-in-PMAP_CALLIT-code.patch
-Patch5:         0005-security.c-removed-warning.patch
-Patch6:         0006-don-t-use-svc_fdset.patch
 Patch8:         0008-First-part-of-init_transport-refactoring.patch
 Patch9:         0009-init_transport-move-the-registration-code-into-a-sep.patch
 Patch10:        0010-Fix-the-behavior-when-specifying-the-h-option.patch
 Patch11:        0011-Clean-up-the-way-we-handle-the-h-option-in-init_tran.patch
-Patch12:        0012-Move-default-state-dir-to-a-subdirectory-of-var-run.patch
 Patch14:        0014-When-using-systemd-redirect-syslog-calls-to-the-syst.patch
 Patch30:        0030-systemd-fix-rmtcall.patch
 Patch31:        0031-rpcbind-manpage.patch
 Patch32:        svc-freeargs.patch
-
-%{?systemd_requires}
+BuildRequires:  libtirpc-devel >= 1.0.1
+BuildRequires:  libtool
+BuildRequires:  pkgconfig
+BuildRequires:  systemd-rpm-macros
+BuildRequires:  tcpd-devel
+BuildRequires:  pkgconfig(libsystemd)
+PreReq:         %fillup_prereq
+Requires(pre):  %{_sbindir}/useradd
 Provides:       portmap
+%{?systemd_requires}
+%if 0%{?suse_version} >= 1330
+BuildRequires:  libnsl-devel
+%endif
+%if 0%{?suse_version} >= 1330
+Requires(pre):  group(nobody)
+%endif
 
 %description
 Rpcbind is a replacement for portmap. Whereas portmap supports only UDP
@@ -77,16 +69,10 @@
 %setup -q
 cp %{SOURCE4} .
 %patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
 #%patch8 -p1
 #%patch9 -p1
 #%patch10 -p1
 #%patch11 -p1
-%patch12 -p1
 #%patch14 -p1
 #%patch30 -p1
 %patch31 -p1
@@ -94,41 +80,38 @@
 
 %build
 autoreconf -fiv
-export  CFLAGS="$RPM_OPT_FLAGS -fpie"
+export  CFLAGS="%{optflags} -fpie"
 export LDFLAGS="-pie -Wl,-z,relro,-z,now"
 %configure \
            --bindir=/sbin \
            --enable-libwrap \
            --enable-warmstarts \
            --disable-debug \
-           --with-statedir=%{_rundir}/rpcbind \
+           --with-statedir=%{_rundir}/%{name} \
            --with-rpcuser=rpc \
            --with-systemdsystemunitdir=%{_unitdir}
 
-%{__make} %{?jobs:-j%jobs}
-%{__cc} -I/usr/include/tirpc -pie -fpie -fwhole-program -Wl,-z,relro,-z,now 
%{optflags} pmap_set.c -o pmap_set -ltirpc
+make %{?_smp_mflags}
+gcc -I/usr/include/tirpc -pie -fpie -fwhole-program -Wl,-z,relro,-z,now 
%{optflags} pmap_set.c -o pmap_set -ltirpc
 
 %install
-make install DESTDIR=$RPM_BUILD_ROOT
+%make_install
 # fillup template
-mkdir -p $RPM_BUILD_ROOT%{_fillupdir}
-install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_fillupdir}/
-mkdir -p $RPM_BUILD_ROOT%_datadir/omc/svcinfo.d
-install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%_datadir/omc/svcinfo.d/
+mkdir -p %{buildroot}%{_fillupdir}
+install -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/
+mkdir -p %{buildroot}%{_datadir}/omc/svcinfo.d
+install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/omc/svcinfo.d/
 #
-install -m 755 pmap_set $RPM_BUILD_ROOT/sbin/pmap_set2
+install -m 755 pmap_set %{buildroot}/sbin/pmap_set2
 # create symlink for rcrpcbind
-mkdir -p $RPM_BUILD_ROOT%{_sbindir}
-ln -s /sbin/service $RPM_BUILD_ROOT%{_sbindir}/rcrpcbind
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+mkdir -p %{buildroot}%{_sbindir}
+ln -s /sbin/service %{buildroot}%{_sbindir}/rc%{name}
 
 %pre
 %service_add_pre %{name}.service %{name}.socket
 
 # Add "rpc" user
-getent passwd rpc >/dev/null || /usr/sbin/useradd -r -g nobody -d 
/var/lib/empty -s /sbin/nologin -c "user for rpcbind" rpc
+getent passwd rpc >/dev/null || %{_sbindir}/useradd -r -g nobody -d 
%{_localstatedir}/lib/empty -s /sbin/nologin -c "user for rpcbind" rpc
 exit 0
 
 %preun
@@ -142,15 +125,15 @@
 %service_del_postun %{name}.service %{name}.socket
 
 %files
-%defattr(-,root,root)
-%doc AUTHORS ChangeLog COPYING NEWS README
+%license COPYING
+%doc AUTHORS README
 /sbin/pmap_set2
-/sbin/rpcbind
+/sbin/%{name}
 /sbin/rpcinfo
-%{_sbindir}/rcrpcbind
+%{_sbindir}/rc%{name}
 %{_mandir}/*/*
-%{_fillupdir}/sysconfig.rpcbind
-%{_datadir}/omc/svcinfo.d/rpcbind.xml
+%{_fillupdir}/sysconfig.%{name}
+%{_datadir}/omc/svcinfo.d/%{name}.xml
 %{_unitdir}/%{name}.service
 %{_unitdir}/%{name}.socket
 

++++++ 0001-systemd-unit-files.patch ++++++
--- /var/tmp/diff_new_pack.kUv8g5/_old  2018-04-04 11:03:44.743677500 +0200
+++ /var/tmp/diff_new_pack.kUv8g5/_new  2018-04-04 11:03:44.743677500 +0200
@@ -1,65 +1,14 @@
-Add systemd unit files
+Add EnvironmentFile=-/etc/sysconfig/rpcbind to rpcbind.service
 
-Signed-off-by: Thorsten Kukuk <[email protected]>
-
---- a/Makefile.am
-+++ b/Makefile.am      2014/12/10 13:27:31
-@@ -45,6 +45,14 @@
- AM_CPPFLAGS += $(SYSTEMD_CFLAGS) -DSYSTEMD
- 
- rpcbind_LDADD += $(SYSTEMD_LIBS)
-+
-+systemd/rpcbind.service: systemd/rpcbind.service.in Makefile
-+      sed -e 's,@bindir\@,$(bindir),g' \
-+              < $< > $@ || rm $@
-+
-+systemdsystemunit_DATA = \
-+      systemd/rpcbind.service \
-+      systemd/rpcbind.socket
- endif
- 
- rpcinfo_SOURCES =       src/rpcinfo.c
---- a/systemd/.gitignore
-+++ b/systemd/.gitignore       2014/12/10 13:27:31
-@@ -0,0 +1 @@
-+rpcbind.service
---- a/systemd/rpcbind.service.in
-+++ b/systemd/rpcbind.service.in       2014/12/10 13:27:31
-@@ -0,0 +1,16 @@
-+[Unit]
-+Description=RPC Bind
-+Documentation=man:rpcbind(8)
-+DefaultDependencies=no
-+Requires=rpcbind.socket
-+Wants=var-run.mount
-+After=var-run.mount
-+
-+[Service]
-+Type=notify
+Index: rpcbind-0.2.4/systemd/rpcbind.service.in
+===================================================================
+--- rpcbind-0.2.4.orig/systemd/rpcbind.service.in
++++ rpcbind-0.2.4/systemd/rpcbind.service.in
+@@ -11,6 +11,7 @@ After=rpcbind.socket
+ [Service]
+ Type=notify
+ # distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
 +EnvironmentFile=-/etc/sysconfig/rpcbind
-+ExecStart=@bindir@/rpcbind $RPCBIND_OPTIONS -w -f
-+
-+[Install]
-+WantedBy=multi-user.target
-+Also=rpcbind.socket
---- a/systemd/rpcbind.socket
-+++ b/systemd/rpcbind.socket   2014/12/10 13:27:58
-@@ -0,0 +1,18 @@
-+[Unit]
-+Description=RPCbind Server Activation Socket
-+DefaultDependencies=no
-+Wants=rpcbind.target
-+Before=rpcbind.target
-+
-+[Socket]
-+ListenStream=/run/rpcbind.sock
-+
-+# RPC netconfig can't handle ipv6/ipv4 dual sockets
-+BindIPv6Only=ipv6-only
-+ListenStream=0.0.0.0:111
-+ListenDatagram=0.0.0.0:111
-+ListenStream=[::]:111
-+ListenDatagram=[::]:111
-+
-+[Install]
-+WantedBy=sockets.target
+ ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f
+ 
+ [Install]

++++++ rpcbind-0.2.3.tar.bz2 -> rpcbind-0.2.4.tar.bz2 ++++++
++++ 2067 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/.gitignore new/rpcbind-0.2.4/.gitignore
--- old/rpcbind-0.2.3/.gitignore        2015-04-27 16:07:43.000000000 +0200
+++ new/rpcbind-0.2.4/.gitignore        2016-11-28 21:47:28.000000000 +0100
@@ -27,3 +27,4 @@
 rpcinfo
 # cscope database files
 cscope.*
+systemd/rpcbind.service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/Makefile.am new/rpcbind-0.2.4/Makefile.am
--- old/rpcbind-0.2.3/Makefile.am       2015-04-27 16:07:43.000000000 +0200
+++ new/rpcbind-0.2.4/Makefile.am       2016-11-28 21:47:28.000000000 +0100
@@ -50,6 +50,10 @@
 AM_CPPFLAGS += $(SYSTEMD_CFLAGS) -DSYSTEMD
 
 rpcbind_LDADD += $(SYSTEMD_LIBS)
+
+systemdsystemunit_DATA = \
+       systemd/rpcbind.service \
+       systemd/rpcbind.socket
 endif
 
 rpcinfo_SOURCES =       src/rpcinfo.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/compile new/rpcbind-0.2.4/compile
--- old/rpcbind-0.2.3/compile   2015-04-27 16:09:07.000000000 +0200
+++ new/rpcbind-0.2.4/compile   2016-11-30 15:03:59.000000000 +0100
@@ -3,7 +3,7 @@
 
 scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 # Written by Tom Tromey <[email protected]>.
 #
 # This program is free software; you can redistribute it and/or modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/configure.ac new/rpcbind-0.2.4/configure.ac
--- old/rpcbind-0.2.3/configure.ac      2015-04-27 16:07:43.000000000 +0200
+++ new/rpcbind-0.2.4/configure.ac      2016-11-28 21:47:28.000000000 +0100
@@ -1,4 +1,4 @@
-AC_INIT(rpcbind, 0.2.3)
+AC_INIT(rpcbind, 0.2.4)
  
 AM_INIT_AUTOMAKE
 AC_CONFIG_SRCDIR([src/rpcbind.c])
@@ -22,8 +22,8 @@
 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],
@@ -61,4 +61,9 @@
 
 AC_CHECK_HEADERS([nss.h rpcsvc/mount.h])
 
-AC_OUTPUT([Makefile])
+# make bindir available for substitution in config file
+# 2 "evals" needed to expand variable names
+AC_SUBST([_bindir])
+AC_CONFIG_COMMANDS_PRE([eval eval _bindir=$bindir])
+
+AC_OUTPUT([Makefile systemd/rpcbind.service])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/missing new/rpcbind-0.2.4/missing
--- old/rpcbind-0.2.3/missing   2015-04-27 16:09:07.000000000 +0200
+++ new/rpcbind-0.2.4/missing   2016-11-30 15:03:59.000000000 +0100
@@ -3,7 +3,7 @@
 
 scriptversion=2013-10-28.13; # UTC
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <[email protected]>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/src/check_bound.c new/rpcbind-0.2.4/src/check_bound.c
--- old/rpcbind-0.2.3/src/check_bound.c 2015-04-27 16:07:43.000000000 +0200
+++ new/rpcbind-0.2.4/src/check_bound.c 2016-11-28 21:47:28.000000000 +0100
@@ -70,7 +70,7 @@
 static struct fdlist *fdtail;
 static char *nullstring = "";
 
-static bool_t check_bound __P((struct fdlist *, char *uaddr));
+static bool_t check_bound(struct fdlist *, char *uaddr);
 
 /*
  * Returns 1 if the given address is bound for the given addr & transport
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/src/pmap_svc.c new/rpcbind-0.2.4/src/pmap_svc.c
--- old/rpcbind-0.2.3/src/pmap_svc.c    2015-04-27 16:07:43.000000000 +0200
+++ new/rpcbind-0.2.4/src/pmap_svc.c    2016-11-28 21:47:28.000000000 +0100
@@ -60,11 +60,11 @@
 #include "rpcbind.h"
 #include "xlog.h"
 #include <rpc/svc_soc.h> /* svc_getcaller routine definition */
-static struct pmaplist *find_service_pmap __P((rpcprog_t, rpcvers_t,
-                                              rpcprot_t));
-static bool_t pmapproc_change __P((struct svc_req *, SVCXPRT *, u_long));
-static bool_t pmapproc_getport __P((struct svc_req *, SVCXPRT *));
-static bool_t pmapproc_dump __P((struct svc_req *, SVCXPRT *));
+static struct pmaplist *find_service_pmap(rpcprog_t, rpcvers_t,
+                                              rpcprot_t);
+static bool_t pmapproc_change(struct svc_req *, SVCXPRT *, u_long);
+static bool_t pmapproc_getport(struct svc_req *, SVCXPRT *);
+static bool_t pmapproc_dump(struct svc_req *, SVCXPRT *);
 
 /*
  * Called for all the version 2 inquiries.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/src/rpcb_svc.c new/rpcbind-0.2.4/src/rpcb_svc.c
--- old/rpcbind-0.2.3/src/rpcb_svc.c    2015-04-27 16:07:43.000000000 +0200
+++ new/rpcbind-0.2.4/src/rpcb_svc.c    2016-11-28 21:47:28.000000000 +0100
@@ -53,10 +53,10 @@
 #include "rpcbind.h"
 #include "xlog.h"
 
-static void *rpcbproc_getaddr_3_local __P((void *, struct svc_req *, SVCXPRT *,
-                                          rpcvers_t));
-static void *rpcbproc_dump_3_local __P((void *, struct svc_req *, SVCXPRT *,
-                                       rpcvers_t));
+static void *rpcbproc_getaddr_3_local(void *, struct svc_req *, SVCXPRT *,
+                                          rpcvers_t);
+static void *rpcbproc_dump_3_local(void *, struct svc_req *, SVCXPRT *,
+                                       rpcvers_t);
 
 /*
  * Called by svc_getreqset. There is a separate server handle for
@@ -75,7 +75,7 @@
        } argument;
        char *result;
        xdrproc_t xdr_argument, xdr_result;
-       void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
+       void *(*local)(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
        rpcprog_t setprog = 0;
 
        rpcbs_procinfo(RPCBVERS_3_STAT, rqstp->rq_proc);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/src/rpcb_svc_4.c new/rpcbind-0.2.4/src/rpcb_svc_4.c
--- old/rpcbind-0.2.3/src/rpcb_svc_4.c  2015-04-27 16:07:43.000000000 +0200
+++ new/rpcbind-0.2.4/src/rpcb_svc_4.c  2016-11-28 21:47:28.000000000 +0100
@@ -54,13 +54,11 @@
 #include "rpcbind.h"
 #include "xlog.h"
 
-static void *rpcbproc_getaddr_4_local __P((void *, struct svc_req *, SVCXPRT *,
-                                     rpcvers_t));
-static void *rpcbproc_getversaddr_4_local __P((void *, struct svc_req *, 
SVCXPRT *, rpcvers_t));
-static void *rpcbproc_getaddrlist_4_local
-       __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
-static void free_rpcb_entry_list __P((rpcb_entry_list_ptr *));
-static void *rpcbproc_dump_4_local __P((void *, struct svc_req *, SVCXPRT *, 
rpcvers_t));
+static void *rpcbproc_getaddr_4_local(void *, struct svc_req *, SVCXPRT *, 
rpcvers_t);
+static void *rpcbproc_getversaddr_4_local(void *, struct svc_req *, SVCXPRT *, 
rpcvers_t);
+static void *rpcbproc_getaddrlist_4_local(void *, struct svc_req *, SVCXPRT *, 
rpcvers_t);
+static void free_rpcb_entry_list(rpcb_entry_list_ptr *);
+static void *rpcbproc_dump_4_local(void *, struct svc_req *, SVCXPRT *, 
rpcvers_t);
 
 /*
  * Called by svc_getreqset. There is a separate server handle for
@@ -78,7 +76,7 @@
        } argument;
        char *result;
        xdrproc_t xdr_argument, xdr_result;
-       void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
+       void *(*local)(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
        rpcprog_t setprog = 0;
 
        rpcbs_procinfo(RPCBVERS_4_STAT, rqstp->rq_proc);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/src/rpcb_svc_com.c new/rpcbind-0.2.4/src/rpcb_svc_com.c
--- old/rpcbind-0.2.3/src/rpcb_svc_com.c        2015-04-27 16:07:43.000000000 
+0200
+++ new/rpcbind-0.2.4/src/rpcb_svc_com.c        2016-11-28 21:47:28.000000000 
+0100
@@ -100,29 +100,29 @@
 static struct finfo     FINFO[NFORWARD];
 
 
-static bool_t xdr_encap_parms __P((XDR *, struct encap_parms *));
-static bool_t xdr_rmtcall_args __P((XDR *, struct r_rmtcall_args *));
-static bool_t xdr_rmtcall_result __P((XDR *, struct r_rmtcall_args *));
-static bool_t xdr_opaque_parms __P((XDR *, struct r_rmtcall_args *));
-static int find_rmtcallfd_by_netid __P((char *));
-static SVCXPRT *find_rmtcallxprt_by_fd __P((int));
-static int forward_register __P((u_int32_t, struct netbuf *, int, char *,
-    rpcproc_t, rpcvers_t, u_int32_t *));
-static struct finfo *forward_find __P((u_int32_t));
-static int free_slot_by_xid __P((u_int32_t));
-static int free_slot_by_index __P((int));
-static int netbufcmp __P((struct netbuf *, struct netbuf *));
-static struct netbuf *netbufdup __P((struct netbuf *));
-static void netbuffree __P((struct netbuf *));
-static int check_rmtcalls __P((struct pollfd *, int));
-static void xprt_set_caller __P((SVCXPRT *, struct finfo *));
-static void send_svcsyserr __P((SVCXPRT *, struct finfo *));
-static void handle_reply __P((int, SVCXPRT *));
-static void find_versions __P((rpcprog_t, char *, rpcvers_t *, rpcvers_t *));
-static rpcblist_ptr find_service __P((rpcprog_t, rpcvers_t, char *));
-static char *getowner __P((SVCXPRT *, char *, size_t));
-static int add_pmaplist __P((RPCB *));
-static int del_pmaplist __P((RPCB *));
+static bool_t xdr_encap_parms(XDR *, struct encap_parms *);
+static bool_t xdr_rmtcall_args(XDR *, struct r_rmtcall_args *);
+static bool_t xdr_rmtcall_result(XDR *, struct r_rmtcall_args *);
+static bool_t xdr_opaque_parms(XDR *, struct r_rmtcall_args *);
+static int find_rmtcallfd_by_netid(char *);
+static SVCXPRT *find_rmtcallxprt_by_fd(int);
+static int forward_register(u_int32_t, struct netbuf *, int, char *,
+    rpcproc_t, rpcvers_t, u_int32_t *);
+static struct finfo *forward_find(u_int32_t);
+static int free_slot_by_xid(u_int32_t);
+static int free_slot_by_index(int);
+static int netbufcmp(struct netbuf *, struct netbuf *);
+static struct netbuf *netbufdup(struct netbuf *);
+static void netbuffree(struct netbuf *);
+static int check_rmtcalls(struct pollfd *, int);
+static void xprt_set_caller(SVCXPRT *, struct finfo *);
+static void send_svcsyserr(SVCXPRT *, struct finfo *);
+static void handle_reply(int, SVCXPRT *);
+static void find_versions(rpcprog_t, char *, rpcvers_t *, rpcvers_t *);
+static rpcblist_ptr find_service(rpcprog_t, rpcvers_t, char *);
+static char *getowner(SVCXPRT *, char *, size_t);
+static int add_pmaplist(RPCB *);
+static int del_pmaplist(RPCB *);
 
 /*
  * Set a mapping of program, version, netid
@@ -536,10 +536,6 @@
                rmttail->next = rmt;
                rmttail = rmt;
        }
-       /* XXX not threadsafe */
-       if (fd > svc_maxfd)
-               svc_maxfd = fd;
-       FD_SET(fd, &svc_fdset);
        return (fd);
 }
 
@@ -1056,9 +1052,6 @@
        fi = &FINFO[index];
        if (fi->flag & FINFO_ACTIVE) {
                netbuffree(fi->caller_addr);
-               /* XXX may be too big, but can't access xprt array here */
-               if (fi->forward_fd >= svc_maxfd)
-                       svc_maxfd--;
                free(fi->uaddr);
                fi->flag &= ~FINFO_ACTIVE;
                rpcb_rmtcalls--;
@@ -1097,35 +1090,28 @@
 }
 
 
-#define        MASKVAL (POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND)
-extern bool_t __svc_clean_idle(fd_set *, int, bool_t);
-
 void
 my_svc_run()
 {
-       size_t nfds;
-       struct pollfd pollfds[FD_SETSIZE];
        int poll_ret, check_ret;
        int n;
-#ifdef SVC_RUN_DEBUG
-       int i;
-#endif
-       register struct pollfd  *p;
-       fd_set cleanfds;
 
        for (;;) {
-               p = pollfds;
-               for (n = 0; n <= svc_maxfd; n++) {
-                       if (FD_ISSET(n, &svc_fdset)) {
-                               p->fd = n;
-                               p->events = MASKVAL;
-                               p++;
-                       }
-               }
-               nfds = p - pollfds;
-               poll_ret = 0;
+               struct pollfd my_pollfd[svc_max_pollfd];
+               int i;
+
+               if (svc_max_pollfd == 0 && svc_pollfd == NULL)
+                 return;
 
-               switch (poll_ret = poll(pollfds, nfds, 30 * 1000)) {
+
+               for (i = 0; i < svc_max_pollfd; ++i)
+                 {
+                   my_pollfd[i].fd = svc_pollfd[i].fd;
+                   my_pollfd[i].events = svc_pollfd[i].events;
+                   my_pollfd[i].revents = 0;
+                 }
+
+               switch (poll_ret = poll(my_pollfd, svc_max_pollfd, 30 * 1000)) {
                case -1:
                        /*
                         * We ignore all errors, continuing with the assumption
@@ -1133,8 +1119,6 @@
                         * other outside event) and not caused by poll().
                         */
                case 0:
-                       cleanfds = svc_fdset;
-                       __svc_clean_idle(&cleanfds, 30, FALSE);
                        continue;
                default:
                        /*
@@ -1144,10 +1128,10 @@
                         * don't call svc_getreq_poll.  Otherwise, there
                         * must be another so we must call svc_getreq_poll.
                         */
-                       if ((check_ret = check_rmtcalls(pollfds, nfds)) ==
+                       if ((check_ret = check_rmtcalls(my_pollfd, 
svc_max_pollfd)) ==
                            poll_ret)
                                continue;
-                       svc_getreq_poll(pollfds, poll_ret-check_ret);
+                       svc_getreq_poll(my_pollfd, poll_ret-check_ret);
                }
        }
 }
@@ -1183,12 +1167,33 @@
        return (ncallbacks_found);
 }
 
+/*
+ * This is really a helper function defined in libtirpc, 
+ * but unfortunately, it hasn't been exported yet.
+ */
+static struct netbuf *
+__rpc_set_netbuf(struct netbuf *nb, const void *ptr, size_t len)
+{
+       if (nb->len != len) {
+               if (nb->len)
+                       mem_free(nb->buf, nb->len);
+               nb->buf = mem_alloc(len);
+               if (nb->buf == NULL)
+                       return NULL;
+
+               nb->maxlen = nb->len = len;
+       }
+       memcpy(nb->buf, ptr, len);
+       return nb;
+}
+
 static void
 xprt_set_caller(SVCXPRT *xprt, struct finfo *fi)
 {
+       const struct netbuf *caller = fi->caller_addr;
        u_int32_t *xidp;
 
-       *(svc_getrpccaller(xprt)) = *(fi->caller_addr);
+       __rpc_set_netbuf(svc_getrpccaller(xprt), caller->buf, caller->len);
        xidp = __rpcb_get_dg_xidp(xprt);
        *xidp = fi->caller_xid;
 }
@@ -1274,10 +1279,17 @@
        a.rmt_localvers = fi->versnum;
 
        xprt_set_caller(xprt, fi);
+#if defined(SVC_XP_AUTH)
+       SVC_XP_AUTH(xprt) = svc_auth_none;
+#else 
        xprt->xp_auth = &svc_auth_none;
+#endif
        svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a);
+#if !defined(SVC_XP_AUTH)
        SVCAUTH_DESTROY(xprt->xp_auth);
        xprt->xp_auth = NULL;
+#endif
+
 done:
        if (buffer)
                free(buffer);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/src/rpcbind.c new/rpcbind-0.2.4/src/rpcbind.c
--- old/rpcbind-0.2.3/src/rpcbind.c     2015-04-27 16:07:43.000000000 +0200
+++ new/rpcbind-0.2.4/src/rpcbind.c     2016-11-28 21:47:28.000000000 +0100
@@ -87,6 +87,7 @@
 int debugging = 0;     /* Tell me what's going on */
 int doabort = 0;       /* When debugging, do an abort on errors */
 int dofork = 1;                /* fork? */
+int createdsocket = 0;  /* Did I create the socket or systemd did it for me? */
 
 rpcblist_ptr list_rbl; /* A list of version 3/4 rpcbind services */
 
@@ -135,13 +136,13 @@
 static char servname[] = "rpcbind";
 static char superuser[] = "superuser";
 
-int main __P((int, char *[]));
+int main(int, char *[]);
 
-static int init_transport __P((struct netconfig *));
-static void rbllist_add __P((rpcprog_t, rpcvers_t, struct netconfig *,
-                            struct netbuf *));
-static void terminate __P((int));
-static void parseargs __P((int, char *[]));
+static int init_transport(struct netconfig *);
+static void rbllist_add(rpcprog_t, rpcvers_t, struct netconfig *,
+                            struct netbuf *);
+static void terminate(int);
+static void parseargs(int, char *[]);
 
 int
 main(int argc, char *argv[])
@@ -262,6 +263,11 @@
                        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);
@@ -445,6 +451,7 @@
                memset(&sun, 0, sizeof sun);
                sun.sun_family = AF_LOCAL;
                unlink(_PATH_RPCBINDSOCK);
+               createdsocket = 1; /* We are now in the process of creating the 
unix socket */
                strcpy(sun.sun_path, _PATH_RPCBINDSOCK);
                addrlen = SUN_LEN(&sun);
                sa = (struct sockaddr *)&sun;
@@ -846,7 +853,8 @@
 terminate(int dummy /*__unused*/)
 {
        close(rpcbindlockfd);
-       unlink(_PATH_RPCBINDSOCK);
+       if(createdsocket)
+               unlink(_PATH_RPCBINDSOCK);
        unlink(RPCBINDDLOCK);
 #ifdef WARMSTART
        write_warmstart();      /* Dump yourself */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/src/rpcbind.h new/rpcbind-0.2.4/src/rpcbind.h
--- old/rpcbind-0.2.3/src/rpcbind.h     2015-04-27 16:07:43.000000000 +0200
+++ new/rpcbind-0.2.4/src/rpcbind.h     2016-11-28 21:47:28.000000000 +0100
@@ -129,6 +129,7 @@
 extern void pmap_service(struct svc_req *, SVCXPRT *);
 #endif
 
+void mkdir_warmstart(int uid);
 void write_warmstart(void);
 void read_warmstart(void);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/src/security.c new/rpcbind-0.2.4/src/security.c
--- old/rpcbind-0.2.3/src/security.c    2015-04-27 16:07:43.000000000 +0200
+++ new/rpcbind-0.2.4/src/security.c    2016-11-28 21:47:28.000000000 +0100
@@ -17,6 +17,8 @@
 #include <syslog.h>
 #include <netdb.h>
 
+#include "xlog.h"
+
 /*
  * XXX for special case checks in check_callit.
  */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/src/util.c new/rpcbind-0.2.4/src/util.c
--- old/rpcbind-0.2.3/src/util.c        2015-04-27 16:07:43.000000000 +0200
+++ new/rpcbind-0.2.4/src/util.c        2016-11-28 21:47:28.000000000 +0100
@@ -70,7 +70,7 @@
 static struct sockaddr_in6 *local_in6;
 #endif
 
-static int bitmaskcmp __P((void *, void *, void *, int));
+static int bitmaskcmp(void *, void *, void *, int);
 
 /*
  * For all bits set in "mask", compare the corresponding bits in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/src/warmstart.c new/rpcbind-0.2.4/src/warmstart.c
--- old/rpcbind-0.2.3/src/warmstart.c   2015-04-27 16:07:43.000000000 +0200
+++ new/rpcbind-0.2.4/src/warmstart.c   2016-11-28 21:47:28.000000000 +0100
@@ -45,21 +45,25 @@
 #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
 
-static bool_t write_struct __P((char *, xdrproc_t, void *));
-static bool_t read_struct __P((char *, xdrproc_t, void *));
+#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 *);
 
 static bool_t
 write_struct(char *filename, xdrproc_t structproc, void *list)
@@ -139,8 +143,33 @@
 }
 
 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/systemd/rpcbind.service.in 
new/rpcbind-0.2.4/systemd/rpcbind.service.in
--- old/rpcbind-0.2.3/systemd/rpcbind.service.in        1970-01-01 
01:00:00.000000000 +0100
+++ new/rpcbind-0.2.4/systemd/rpcbind.service.in        2016-11-28 
21:47:28.000000000 +0100
@@ -0,0 +1,17 @@
+[Unit]
+Description=RPC Bind
+Documentation=man:rpcbind(8)
+DefaultDependencies=no
+
+# Make sure we use the IP addresses listed for
+# rpcbind.socket, no matter how this unit is started.
+Wants=rpcbind.socket
+After=rpcbind.socket
+
+[Service]
+Type=notify
+# distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
+ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f
+
+[Install]
+WantedBy=multi-user.target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/rpcbind-0.2.3/systemd/rpcbind.socket 
new/rpcbind-0.2.4/systemd/rpcbind.socket
--- old/rpcbind-0.2.3/systemd/rpcbind.socket    1970-01-01 01:00:00.000000000 
+0100
+++ new/rpcbind-0.2.4/systemd/rpcbind.socket    2016-11-28 21:47:28.000000000 
+0100
@@ -0,0 +1,18 @@
+[Unit]
+Description=RPCbind Server Activation Socket
+DefaultDependencies=no
+Wants=rpcbind.target
+Before=rpcbind.target
+
+[Socket]
+ListenStream=/run/rpcbind.sock
+
+# RPC netconfig can't handle ipv6/ipv4 dual sockets
+BindIPv6Only=ipv6-only
+ListenStream=0.0.0.0:111
+ListenDatagram=0.0.0.0:111
+ListenStream=[::]:111
+ListenDatagram=[::]:111
+
+[Install]
+WantedBy=sockets.target


Reply via email to