Debian Codegraph @

debian/patches/run-migration

raw symbols SCIP
1 Author: Steve Langasek <[email protected]>
2 Description: Fix to look directly in /run instead of via the /var/run symlink
3 Because /var may be a separate partition, and could even be mounted via NFS,
4 and in wheezy and later /var/run is a symlink to /run, look up our files in
5 /run directly. This ensures rpcbind can be started early in boot without
6 any races.
7 --- a/src/rpcbind.c
8 +++ b/src/rpcbind.c
9 @@ -106,7 +106,14 @@
10 /* who to suid to if -s is given */
11 #define RUN_AS "daemon"
12
13 -#define RPCBINDDLOCK "/var/run/rpcbind.lock"
14 +#define RPCBINDDLOCK "/run/rpcbind.lock"
15 +
16 +/* Bypass the libtirpc definition, because we know that /var/run is a compat
17 + * symlink to /run. */
18 +#ifdef _PATH_RPCBINDSOCK
19 +#undef _PATH_RPCBINDSOCK
20 +#endif
21 +#define _PATH_RPCBINDSOCK "/run/rpcbind.sock"
22
23 int runasdaemon = 0;
24 int insecure = 0;
25 --- a/src/rpcinfo.c
26 +++ b/src/rpcinfo.c
27 @@ -75,6 +75,13 @@
28 #define MAX_VERS ((u_long)4294967295UL)
29 #define UNKNOWN "unknown"
30
31 +/* Bypass the libtirpc definition, because we know that /var/run is a compat
32 + * symlink to /run. */
33 +#ifdef _PATH_RPCBINDSOCK
34 +#undef _PATH_RPCBINDSOCK
35 +#endif
36 +#define _PATH_RPCBINDSOCK "/run/rpcbind.sock"
37 +
38 /*
39 * Functions to be performed.
40 */