diff options
author | wpaul <wpaul@FreeBSD.org> | 1999-02-10 20:04:22 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1999-02-10 20:04:22 +0000 |
commit | 7a6606c859d9f4ed1eaca3bb258a41fd732971b9 (patch) | |
tree | 1ab9d9ca39c75c6608d5f385aee5c589d466f53b /usr.sbin/ypbind | |
parent | 609cf46404374da7de2acdbceb224bacc02348cb (diff) | |
download | FreeBSD-src-7a6606c859d9f4ed1eaca3bb258a41fd732971b9.zip FreeBSD-src-7a6606c859d9f4ed1eaca3bb258a41fd732971b9.tar.gz |
The ypbind_setdom_2 procedure returns NULL in the success case. This is
incorrect; returning NULL here means that the dispatcher won't send any
response back to the caller, which means the caller will sit there waiting
until it times out. I don't know how this ever worked before. The effect
is that using 'ypset foo' to get the local ypbind to change servers would
work, but would sit there hanging for a long time for no reason.
Diffstat (limited to 'usr.sbin/ypbind')
-rw-r--r-- | usr.sbin/ypbind/ypbind.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c index 752ff93..52aaad1 100644 --- a/usr.sbin/ypbind/ypbind.c +++ b/usr.sbin/ypbind/ypbind.c @@ -29,7 +29,7 @@ #ifndef lint static const char rcsid[] = - "$Id: ypbind.c,v 1.26 1997/10/27 07:45:47 charnier Exp $"; + "$Id: ypbind.c,v 1.27 1998/01/19 23:31:38 wpaul Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -247,6 +247,7 @@ ypbind_setdom *argp; CLIENT *clnt; { struct sockaddr_in *fromsin, bindsin; + static char *result = NULL; if (strchr(argp->ypsetdom_domain, '/')) { syslog(LOG_WARNING, "Domain name '%s' has embedded slash -- \ @@ -286,7 +287,7 @@ rejecting.", argp->ypsetdom_domain); bindsin.sin_port = *(u_short *)argp->ypsetdom_binding.ypbind_binding_port; rpc_received(argp->ypsetdom_domain, &bindsin, 1); - return(NULL); + return((void *) &result); } static void |