summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypserv/yp_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ypserv/yp_server.c')
-rw-r--r--usr.sbin/ypserv/yp_server.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/ypserv/yp_server.c b/usr.sbin/ypserv/yp_server.c
index da1a73b..8d9c19c 100644
--- a/usr.sbin/ypserv/yp_server.c
+++ b/usr.sbin/ypserv/yp_server.c
@@ -45,7 +45,7 @@
#include <rpc/rpc.h>
#ifndef lint
-static const char rcsid[] = "$Id: yp_server.c,v 1.3 1996/12/24 18:43:53 wpaul Exp $";
+static const char rcsid[] = "$Id: yp_server.c,v 1.4 1997/01/07 04:10:51 wpaul Exp $";
#endif /* not lint */
int forked = 0;
@@ -466,6 +466,16 @@ ypproc_all_2_svc(ypreq_nokey *argp, struct svc_req *rqstp)
}
/*
+ * XXX If we hit the child limit, fail the request.
+ * If we don't, and the map is large, we could block for
+ * a long time in the parent.
+ */
+ if (children >= MAX_CHILDREN) {
+ result.ypresp_all_u.val.stat = YP_YPERR;
+ return(&result);
+ }
+
+ /*
* The ypproc_all procedure can take a while to complete.
* Best to handle it in a subprocess so the parent doesn't
* block. (Is there a better way to do this? Maybe with
OpenPOWER on IntegriCloud