File: run-migration

package info (click to toggle)
rpcbind 1.2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 956 kB
  • sloc: ansic: 5,628; sh: 1,371; makefile: 77
file content (40 lines) | stat: -rw-r--r-- 1,223 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Author: Steve Langasek <steve.langasek@canonical.com>
Description: Fix to look directly in /run instead of via the /var/run symlink
 Because /var may be a separate partition, and could even be mounted via NFS,
 and in wheezy and later /var/run is a symlink to /run, look up our files in
 /run directly.  This ensures rpcbind can be started early in boot without
 any races.
--- a/src/rpcbind.c
+++ b/src/rpcbind.c
@@ -106,7 +106,14 @@
 /* who to suid to if -s is given */
 #define RUN_AS  "daemon"
 
-#define RPCBINDDLOCK "/var/run/rpcbind.lock"
+#define RPCBINDDLOCK "/run/rpcbind.lock"
+
+/* Bypass the libtirpc definition, because we know that /var/run is a compat
+ * symlink to /run. */
+#ifdef _PATH_RPCBINDSOCK
+#undef _PATH_RPCBINDSOCK
+#endif
+#define _PATH_RPCBINDSOCK "/run/rpcbind.sock"
 
 int runasdaemon = 0;
 int insecure = 0;
--- a/src/rpcinfo.c
+++ b/src/rpcinfo.c
@@ -75,6 +75,13 @@
 #define	MAX_VERS	((u_long)4294967295UL)
 #define	UNKNOWN		"unknown"
 
+/* Bypass the libtirpc definition, because we know that /var/run is a compat
+ * symlink to /run. */
+#ifdef _PATH_RPCBINDSOCK
+#undef _PATH_RPCBINDSOCK
+#endif
+#define _PATH_RPCBINDSOCK "/run/rpcbind.sock"
+
 /*
  * Functions to be performed.
  */