Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/rpcbind Write the "warm start" file to /var/run rat...



details:   https://anonhg.NetBSD.org/src/rev/d16ee1b97aaa
branches:  trunk
changeset: 826138:d16ee1b97aaa
user:      ginsbach <ginsbach%NetBSD.org@localhost>
date:      Wed Aug 16 23:38:16 2017 +0000

description:
Write the "warm start" file to /var/run rather than /tmp.
(Restore changes clobbered by merge of FreeBSD changes. Hi christos!)

diffstat:

 usr.sbin/rpcbind/Makefile    |  3 ++-
 usr.sbin/rpcbind/warmstart.c |  7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (46 lines):

diff -r 5b81ec73bf7b -r d16ee1b97aaa usr.sbin/rpcbind/Makefile
--- a/usr.sbin/rpcbind/Makefile Wed Aug 16 22:52:40 2017 +0000
+++ b/usr.sbin/rpcbind/Makefile Wed Aug 16 23:38:16 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.12 2009/04/22 15:23:07 lukem Exp $
+#      $NetBSD: Makefile,v 1.13 2017/08/16 23:38:16 ginsbach Exp $
 
 .include <bsd.own.mk>
 
@@ -21,6 +21,7 @@
 # Uncomment these to get any useful output from 'rpcbind -d'
 # CPPFLAGS+=   -DRPCBIND_DEBUG
 # CPPFLAGS+=   -DSVC_RUN_DEBUG
+CPPFLAGS+= -DWARMSTART
 
 LDADD+= -lwrap -lutil
 DPADD+= ${LIBWRAP} ${LIBUTIL}
diff -r 5b81ec73bf7b -r d16ee1b97aaa usr.sbin/rpcbind/warmstart.c
--- a/usr.sbin/rpcbind/warmstart.c      Wed Aug 16 22:52:40 2017 +0000
+++ b/usr.sbin/rpcbind/warmstart.c      Wed Aug 16 23:38:16 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: warmstart.c,v 1.6 2017/08/16 08:44:40 christos Exp $   */
+/*     $NetBSD: warmstart.c,v 1.7 2017/08/16 23:38:16 ginsbach Exp $   */
 /* $FreeBSD: head/usr.sbin/rpcbind/warmstart.c 258564 2013-11-25 16:44:02Z hrs $*/
 
 /*-
@@ -42,6 +42,7 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <err.h>
+#include <paths.h>
 #include <rpc/rpc.h>
 #include <rpc/rpcb_prot.h>
 #include <rpc/xdr.h>
@@ -61,9 +62,9 @@
 
 
 /* These files keep the pmap_list and rpcb_list in XDR format */
-#define        RPCBFILE        "/tmp/rpcbind.file"
+#define        RPCBFILE        _PATH_VARRUN "rpcbind.file"
 #ifdef PORTMAP
-#define        PMAPFILE        "/tmp/portmap.file"
+#define        PMAPFILE        _PATH_VARRUN "portmap.file"
 #endif
 
 static bool_t write_struct(const char *, xdrproc_t, void *);



Home | Main Index | Thread Index | Old Index