diff options
Diffstat (limited to 'nis/nss_nis/nis-ethers.c')
-rw-r--r-- | nis/nss_nis/nis-ethers.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/nis/nss_nis/nis-ethers.c b/nis/nss_nis/nis-ethers.c index a5723747fc..c95f766469 100644 --- a/nis/nss_nis/nis-ethers.c +++ b/nis/nss_nis/nis-ethers.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996. @@ -158,7 +158,10 @@ internal_nis_getetherent_r (struct ether *eth, char *buffer, size_t buflen, char *p; if (next == NULL) - return NSS_STATUS_NOTFOUND; + { + *errnop = ENOENT; + return NSS_STATUS_NOTFOUND; + } p = strncpy (buffer, next->val, buflen); while (isspace (*p)) @@ -212,7 +215,9 @@ _nss_nis_gethostton_r (const char *name, struct ether *eth, if (retval != NSS_STATUS_SUCCESS) { - if (retval == NSS_STATUS_TRYAGAIN) + if (retval == NSS_STATUS_NOTFOUND) + *errnop = ENOENT; + else if (retval == NSS_STATUS_TRYAGAIN) *errnop = errno; return retval; } @@ -297,7 +302,10 @@ _nss_nis_getntohost_r (struct ether_addr *addr, struct ether *eth, if (parse_res == -1) return NSS_STATUS_TRYAGAIN; else - return NSS_STATUS_NOTFOUND; + { + *errnop = ENOENT; + return NSS_STATUS_NOTFOUND; + } } return NSS_STATUS_SUCCESS; } |