aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/rpc.yppasswdd
diff options
context:
space:
mode:
authorMartin Blapp <mbr@FreeBSD.org>2003-01-16 07:27:30 +0000
committerMartin Blapp <mbr@FreeBSD.org>2003-01-16 07:27:30 +0000
commitbcb53b16068cf226b69d1af946341d2dafd23c97 (patch)
tree9666afecfbd20dd475ac216552d1c46a292cf343 /usr.sbin/rpc.yppasswdd
parentcf2acbc3a2ad3100bf102bc412352a9068240ce8 (diff)
Implement nonblocking tpc-connections. rpcgen -m does still
produce backcompatible code. Reviewed by: rwatson Obtained from: NetBSD MFC after: 1 day
Notes
Notes: svn path=/head/; revision=109363
Diffstat (limited to 'usr.sbin/rpc.yppasswdd')
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
index 2f7e1e25c401..7c9b011fb5b3 100644
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
+++ b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
@@ -56,6 +56,7 @@ static const char rcsid[] =
#include <unistd.h>
#include <rpc/rpc.h>
+#include <rpc/rpc_com.h>
#include <rpc/pmap_clnt.h> /* for pmap_unset */
#include <rpcsvc/yp.h>
struct dom_binding {};
@@ -171,6 +172,7 @@ main(int argc, char *argv[])
int ch;
char *mastername;
char myname[MAXHOSTNAMELEN + 2];
+ int maxrec = RPC_MAXDATASIZE;
extern int debug;
@@ -273,6 +275,8 @@ the %s domain -- aborting", yppasswd_domain);
rpcb_unset(YPPASSWDPROG, YPPASSWDVERS, NULL);
rpcb_unset(MASTER_YPPASSWDPROG, MASTER_YPPASSWDVERS, NULL);
+ rpc_control(RPC_SVC_CONNMAXREC_SET, &maxrec);
+
if (svc_create(yppasswdprog_1, YPPASSWDPROG, YPPASSWDVERS, "netpath") == 0) {
yp_error("cannot create yppasswd service.");
exit(1);