Accepting request 143416 from home:rmilasan:branches:network
- Move rpcbind.sock and rpcbind.lock to /run to not interfere with systemd. OBS-URL: https://build.opensuse.org/request/show/143416 OBS-URL: https://build.opensuse.org/package/show/network/rpcbind?expand=0&rev=21
This commit is contained in:
parent
f8068eb238
commit
1b644fb852
13
move-lock-file-to-run-fs.patch
Normal file
13
move-lock-file-to-run-fs.patch
Normal 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;
|
@ -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
|
Thu Oct 25 21:29:15 UTC 2012 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
@ -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
|
Patch1: socket-activation-don-t-unlink-socket-we-didn-t-create
|
||||||
Patch2: socket-activation-fix-rpcbind-service-to-use-separate-sockets
|
Patch2: socket-activation-fix-rpcbind-service-to-use-separate-sockets
|
||||||
Patch3: rpcbind-journal.patch
|
Patch3: rpcbind-journal.patch
|
||||||
|
Patch4: move-lock-file-to-run-fs.patch
|
||||||
%define statefile /var/lib/portmap.state
|
%define statefile /var/lib/portmap.state
|
||||||
%if 0%{?suse_version} > 1140
|
%if 0%{?suse_version} > 1140
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
@ -71,6 +72,8 @@ cp %{SOURCE4} .
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3
|
%patch3
|
||||||
|
%patch4 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fiv
|
autoreconf -fiv
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -fpie"
|
export CFLAGS="$RPM_OPT_FLAGS -fpie"
|
||||||
|
@ -16,8 +16,10 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|||||||
systemd/rpcbind.socket | 9 +++++++--
|
systemd/rpcbind.socket | 9 +++++++--
|
||||||
2 files changed, 38 insertions(+), 3 deletions(-)
|
2 files changed, 38 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
--- a/src/rpcbind.c
|
Index: rpcbind-0.2.0_git201103171419/src/rpcbind.c
|
||||||
+++ b/src/rpcbind.c
|
===================================================================
|
||||||
|
--- rpcbind-0.2.0_git201103171419.orig/src/rpcbind.c
|
||||||
|
+++ rpcbind-0.2.0_git201103171419/src/rpcbind.c
|
||||||
@@ -50,6 +50,7 @@
|
@@ -50,6 +50,7 @@
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
@ -26,7 +28,7 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|||||||
#include <rpc/rpc.h>
|
#include <rpc/rpc.h>
|
||||||
#include <rpc/rpc_com.h>
|
#include <rpc/rpc_com.h>
|
||||||
#ifdef PORTMAP
|
#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.
|
* Adds the entry into the rpcbind database.
|
||||||
* If PORTMAP, then for UDP and TCP, it adds the entries for version 2 also
|
* If PORTMAP, then for UDP and TCP, it adds the entries for version 2 also
|
||||||
* Returns 0 if succeeds, else fails
|
* 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
|
#ifdef SYSTEMD
|
||||||
n = sd_listen_fds(0);
|
n = sd_listen_fds(0);
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
@ -68,7 +70,7 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,6 +375,9 @@ init_transport(struct netconfig *nconf)
|
@@ -348,6 +375,9 @@ init_transport(struct netconfig *nconf)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,14 +80,18 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|||||||
/* Copy the address */
|
/* Copy the address */
|
||||||
taddr.addr.maxlen = taddr.addr.len = addrlen;
|
taddr.addr.maxlen = taddr.addr.len = addrlen;
|
||||||
taddr.addr.buf = malloc(addrlen);
|
taddr.addr.buf = malloc(addrlen);
|
||||||
--- a/systemd/rpcbind.socket
|
Index: rpcbind-0.2.0_git201103171419/systemd/rpcbind.socket
|
||||||
+++ b/systemd/rpcbind.socket
|
===================================================================
|
||||||
@@ -5,8 +5,13 @@ Before=rpcbind.target
|
--- 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]
|
[Socket]
|
||||||
ListenStream=/var/run/rpcbind.sock
|
-ListenStream=/var/run/rpcbind.sock
|
||||||
-ListenStream=111
|
-ListenStream=111
|
||||||
-ListenDatagram=111
|
-ListenDatagram=111
|
||||||
|
+ListenStream=/run/rpcbind.sock
|
||||||
+
|
+
|
||||||
+# RPC netconfig can't handle ipv6/ipv4 dual sockets
|
+# RPC netconfig can't handle ipv6/ipv4 dual sockets
|
||||||
+BindIPv6Only=ipv6-only
|
+BindIPv6Only=ipv6-only
|
||||||
@ -96,4 +102,3 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=sockets.target
|
WantedBy=sockets.target
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user