summaryrefslogtreecommitdiffstats
path: root/lib/libc/yp
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-07-05 06:04:20 +0000
committerwpaul <wpaul@FreeBSD.org>1995-07-05 06:04:20 +0000
commit590e5a6c7fdf4c2753ac566f4ef8f3772b7b5df8 (patch)
tree07933a8ecbcae308fd6d5b04ada2f2601b7b5171 /lib/libc/yp
parent8d044a31ae66f5b1da099b92bc39b058306c72e6 (diff)
downloadFreeBSD-src-590e5a6c7fdf4c2753ac566f4ef8f3772b7b5df8.zip
FreeBSD-src-590e5a6c7fdf4c2753ac566f4ef8f3772b7b5df8.tar.gz
The ypprot_err() function incorrectly maps YP_NODOM to YPERR_NODOM.
Strange as it sounds, it should map to YPERR_DOMAIN instead. The YP_NODOM protocol error code is generally returned by ypserv when you ask it for data from a domain that it doesn't support. By contrast, the YPERR_NODOM error code means 'local domain name not set.' Consequently, this incorrect mapping leads to yperr_string() generating a very confusing error message. YPERR_DOMAIN says 'couldn't bind to a server which serves this domain' which is much closer to the truth.
Diffstat (limited to 'lib/libc/yp')
-rw-r--r--lib/libc/yp/yplib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c
index b54292e..5e5a655 100644
--- a/lib/libc/yp/yplib.c
+++ b/lib/libc/yp/yplib.c
@@ -28,7 +28,7 @@
*/
#ifndef LINT
-static char *rcsid = "$Id: yplib.c,v 1.9 1995/05/03 18:33:10 wpaul Exp $";
+static char *rcsid = "$Id: yplib.c,v 1.10 1995/05/30 05:42:15 rgrimes Exp $";
#endif
#include <sys/param.h>
@@ -835,7 +835,7 @@ unsigned int incode;
case YP_NOMAP:
return YPERR_MAP;
case YP_NODOM:
- return YPERR_NODOM;
+ return YPERR_DOMAIN;
case YP_NOKEY:
return YPERR_KEY;
case YP_BADOP:
OpenPOWER on IntegriCloud