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.
This commit is contained in:
parent
7bb916c40d
commit
bc8e373c9b
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue