From cb9c9b65b7962e7b78fc8d47dc3406ef7874c29d Mon Sep 17 00:00:00 2001 From: wpaul Date: Fri, 30 Apr 1999 16:59:48 +0000 Subject: Close PR #10971: flush the database cache after forking in ypproc_all_2_svc() so that parent and child don't share DB handles. --- usr.sbin/ypserv/yp_server.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'usr.sbin') 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; -- cgit v1.1