From 0c6cee5d656d933100b86b7d58803bdbd549e456 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Aug 1998 23:27:30 +0000 Subject: Update. 1998-08-18 Ulrich Drepper * include/features.h: Define __USE_EXTERN_INLINES for recent enough gcc. * argp/argp.h: Define extern inline functions only if __USE_EXTERN_INLINES is defined. * libio/stdio.h: Likewise. * math/math.h: Likewise. * stdlib/stdlib.h: Likewise. * string/argz.h: Likewise. * sysdeps/generic/bits/sigset.h: Likewise. * sysdeps/unix/sysv/linux/bits/sigset.h: Likewise. * sysdeps/unix/sysv/sysv4/bits/sigset.h: Likewise. * sysdeps/wordsize-32/inttypes.h: Likewise. * sysdeps/wordsize-64/inttypes.h: Likewise. * wcsmbs/wchar.h: Likewise. * sysdeps/generic/bits/glob.c [_LIBC]: Define __stat using __xstat to allow compilation without optimization. 1998-08-14 Thorsten Kukuk * nis/nss_compat/compat-grp.c: Set errno to ENOENT if we have no more entries. * nis/nss_compat/compat-initgroups.c: Likewise. * nis/nss_compat/compat-pwd.c: Likewise. * nis/nss_compat/compat-spwd.c: Likewise. * nis/nss_nis/nis-alias.c: Likewise. * nis/nss_nis/nis-ethers.c: Likewise. * nis/nss_nis/nis-grp.c: Likewise. * nis/nss_nis/nis-hosts.c: Likewise. * nis/nss_nis/nis-initgroups.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * nis/nss_nis/nis-proto.c: Likewise. * nis/nss_nis/nis-pwd.c: Likewise. * nis/nss_nis/nis-rpc.c: Likewise. * nis/nss_nis/nis-service.c: Likewise. * nis/nss_nis/nis-spwd.c: Likewise. * nis/rpcsvc/yp.h: Generate new without 1024 byte limits. * nis/ypclnt.c: Try binding dir only first time, could be to old. * nis/yp_xdr.c: Remove 1024 byte limit. * nis/ypupdate_xdr.c: Likewise. * nis/nss_nis/nis-publickey.c: Make sure, nobody could send wrong data. --- nis/nss_nis/nis-ethers.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'nis/nss_nis/nis-ethers.c') 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 , 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; } -- cgit v1.2.3