Accepting request 143563 from network

- Move rpcbind.sock and rpcbind.lock to /run to not interfere with
  systemd. (forwarded request 143416 from rmilasan)

OBS-URL: https://build.opensuse.org/request/show/143563
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpcbind?expand=0&rev=28
This commit is contained in:
Stephan Kulow 2012-11-30 11:26:37 +00:00 committed by Git OBS Bridge
commit ca0df05154
4 changed files with 37 additions and 10 deletions

View File

@ -0,0 +1,13 @@
Index: rpcbind-0.2.0_git201103171419/src/rpcbind.c
===================================================================
--- rpcbind-0.2.0_git201103171419.orig/src/rpcbind.c
+++ rpcbind-0.2.0_git201103171419/src/rpcbind.c
@@ -93,7 +93,7 @@ char *rpcbinduser = NULL;
/* who to suid to if -s is given */
#define RUN_AS "daemon"
-#define RPCBINDDLOCK "/var/run/rpcbind.lock"
+#define RPCBINDDLOCK "/run/rpcbind.lock"
int runasdaemon = 0;
int insecure = 0;

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Nov 28 14:44:15 UTC 2012 - rmilasan@suse.com
- Move rpcbind.sock and rpcbind.lock to /run to not interfere with
systemd.
-------------------------------------------------------------------
Thu Oct 25 21:29:15 UTC 2012 - crrodriguez@opensuse.org

View File

@ -43,6 +43,7 @@ Patch0: 0001-systemd-add-support-for-system-bus-activation.patch
Patch1: socket-activation-don-t-unlink-socket-we-didn-t-create
Patch2: socket-activation-fix-rpcbind-service-to-use-separate-sockets
Patch3: rpcbind-journal.patch
Patch4: move-lock-file-to-run-fs.patch
%define statefile /var/lib/portmap.state
%if 0%{?suse_version} > 1140
BuildRequires: systemd-devel
@ -71,6 +72,8 @@ cp %{SOURCE4} .
%patch1 -p1
%patch2 -p1
%patch3
%patch4 -p1
%build
autoreconf -fiv
export CFLAGS="$RPM_OPT_FLAGS -fpie"

View File

@ -16,8 +16,10 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
systemd/rpcbind.socket | 9 +++++++--
2 files changed, 38 insertions(+), 3 deletions(-)
--- a/src/rpcbind.c
+++ b/src/rpcbind.c
Index: rpcbind-0.2.0_git201103171419/src/rpcbind.c
===================================================================
--- rpcbind-0.2.0_git201103171419.orig/src/rpcbind.c
+++ rpcbind-0.2.0_git201103171419/src/rpcbind.c
@@ -50,6 +50,7 @@
#include <sys/file.h>
#include <sys/socket.h>
@ -26,7 +28,7 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
#include <rpc/rpc.h>
#include <rpc/rpc_com.h>
#ifdef PORTMAP
@@ -262,6 +264,32 @@ main(int argc, char *argv[])
@@ -263,6 +264,32 @@ main(int argc, char *argv[])
}
/*
@ -59,7 +61,7 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
* Adds the entry into the rpcbind database.
* If PORTMAP, then for UDP and TCP, it adds the entries for version 2 also
* Returns 0 if succeeds, else fails
@@ -313,7 +341,7 @@ init_transport(struct netconfig *nconf)
@@ -314,7 +341,7 @@ init_transport(struct netconfig *nconf)
#ifdef SYSTEMD
n = sd_listen_fds(0);
if (n < 0) {
@ -68,7 +70,7 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
return 1;
}
@@ -347,6 +375,9 @@ init_transport(struct netconfig *nconf)
@@ -348,6 +375,9 @@ init_transport(struct netconfig *nconf)
goto error;
}
@ -78,14 +80,18 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
/* Copy the address */
taddr.addr.maxlen = taddr.addr.len = addrlen;
taddr.addr.buf = malloc(addrlen);
--- a/systemd/rpcbind.socket
+++ b/systemd/rpcbind.socket
@@ -5,8 +5,13 @@ Before=rpcbind.target
Index: rpcbind-0.2.0_git201103171419/systemd/rpcbind.socket
===================================================================
--- rpcbind-0.2.0_git201103171419.orig/systemd/rpcbind.socket
+++ rpcbind-0.2.0_git201103171419/systemd/rpcbind.socket
@@ -4,9 +4,14 @@ Wants=rpcbind.target
Before=rpcbind.target
[Socket]
ListenStream=/var/run/rpcbind.sock
-ListenStream=/var/run/rpcbind.sock
-ListenStream=111
-ListenDatagram=111
+ListenStream=/run/rpcbind.sock
+
+# RPC netconfig can't handle ipv6/ipv4 dual sockets
+BindIPv6Only=ipv6-only
@ -96,4 +102,3 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
[Install]
WantedBy=sockets.target