diff options
author | wpaul <wpaul@FreeBSD.org> | 1995-04-21 18:04:36 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1995-04-21 18:04:36 +0000 |
commit | be813a3b68f7e9be9bfef131c96c99089a98aa39 (patch) | |
tree | e8c95e4950ed2d5368e9f49ee0ff9ef92b373dd1 /usr.sbin/ypbind | |
parent | 79d93cb4f787cfc70f395d40220e021b6d8be7f2 (diff) | |
download | FreeBSD-src-be813a3b68f7e9be9bfef131c96c99089a98aa39.zip FreeBSD-src-be813a3b68f7e9be9bfef131c96c99089a98aa39.tar.gz |
small NIS binding fixes:
ypbind.c: if a client program asks ypbind for the name of the server
for a particular domain, and there isn't a binding for that domain
available yet, ypbind needs to supply a status value along with its
failure message. Set yprespbody.ypbind_error before returning from
a ypbindproc_domain request.
yplib.c: properly handle the error status messages ypbind now has the
ability to send us. Add a ypbinderr_string() function to decode the
error values.
ypwhich.c: handle ypbind errors correctly: yperr_string() can't handle
ypbind_status messages -- use ypbinderr_string instead.
Diffstat (limited to 'usr.sbin/ypbind')
-rw-r--r-- | usr.sbin/ypbind/ypbind.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c index 29f92a0..43c719f 100644 --- a/usr.sbin/ypbind/ypbind.c +++ b/usr.sbin/ypbind/ypbind.c @@ -28,7 +28,7 @@ */ #ifndef LINT -static char rcsid[] = "$Id: ypbind.c,v 1.5 1995/04/02 03:10:55 wpaul Exp $"; +static char rcsid[] = "$Id: ypbind.c,v 1.6 1995/04/15 23:35:46 wpaul Exp $"; #endif #include <sys/param.h> @@ -132,6 +132,7 @@ CLIENT *clnt; bzero((char *)&res, sizeof res); res.ypbind_status = YPBIND_FAIL_VAL; + res.ypbind_respbody.ypbind_error = YPBIND_ERR_NOSERV; for(ypdb=ypbindlist; ypdb; ypdb=ypdb->dom_pnext) if( strcmp(ypdb->dom_domain, argp) == 0) @@ -148,11 +149,11 @@ CLIENT *clnt; unlink(path); ypdb->dom_pnext = ypbindlist; ypbindlist = ypdb; - return NULL; + return &res; } if(ypdb->dom_alive==0) - return NULL; + return &res; #if 0 delta = ypdb->dom_check_t - ypdb->dom_ask_t; |