summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypserv
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-04-30 16:59:48 +0000
committerwpaul <wpaul@FreeBSD.org>1999-04-30 16:59:48 +0000
commitcb9c9b65b7962e7b78fc8d47dc3406ef7874c29d (patch)
tree13454c004d06f55cd58c195012160bca2c2b3a10 /usr.sbin/ypserv
parent981525b53794b17ca5717384c1c75af4a24fca8b (diff)
downloadFreeBSD-src-cb9c9b65b7962e7b78fc8d47dc3406ef7874c29d.zip
FreeBSD-src-cb9c9b65b7962e7b78fc8d47dc3406ef7874c29d.tar.gz
Close PR #10971: flush the database cache after forking in ypproc_all_2_svc()
so that parent and child don't share DB handles.
Diffstat (limited to 'usr.sbin/ypserv')
-rw-r--r--usr.sbin/ypserv/yp_server.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr.sbin/ypserv/yp_server.c b/usr.sbin/ypserv/yp_server.c
index aeaa84d..41e76a1 100644
--- a/usr.sbin/ypserv/yp_server.c
+++ b/usr.sbin/ypserv/yp_server.c
@@ -537,6 +537,14 @@ ypproc_all_2_svc(ypreq_nokey *argp, struct svc_req *rqstp)
}
}
+ /*
+ * Fix for PR #10971: don't let the child ypserv share
+ * DB handles with the parent process.
+ */
+#ifdef DB_CACHE
+ yp_flush_all();
+#endif
+
if (yp_select_map(argp->map, argp->domain,
&result.ypresp_all_u.val.key, 0) != YP_TRUE) {
result.ypresp_all_u.val.stat = yp_errno;
OpenPOWER on IntegriCloud