From: Ulrich Drepper Date: Mon, 10 Aug 1998 00:16:35 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/glibc-4-egcs-1_1~15 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=0e94359046d83b56f1b15ff00c4b2f75499bf8c3;p=glibc.git Update. 1998-08-10 Ulrich Drepper * nss/nss_db/db-XXX.c (_nss_db_getXXX): If buffer is too small decrement `entidx' to allow retrieving the same entry again. --- diff --git a/ChangeLog b/ChangeLog index 4bc0035c1f..a71f1bd6de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1998-08-10 Ulrich Drepper + + * nss/nss_db/db-XXX.c (_nss_db_getXXX): If buffer is too small + decrement `entidx' to allow retrieving the same entry again. + 1998-08-09 22:32 Ulrich Drepper * sysdeps/powerpc/ffs.c: Fix typo. Add support for ffsl. diff --git a/nss/nss_db/db-XXX.c b/nss/nss_db/db-XXX.c index 62c7a251f1..3839940028 100644 --- a/nss/nss_db/db-XXX.c +++ b/nss/nss_db/db-XXX.c @@ -282,6 +282,14 @@ CONCAT(_nss_db_get,ENTNAME_r) (struct STRUCTURE *result, char *buffer, { key.size = snprintf (key.data = buf, sizeof buf, "0%u", entidx++); status = lookup (&key, result, buffer, buflen, errnop H_ERRNO_ARG); + if (status == NSS_STATUS_TRYAGAIN +#ifdef NEED_H_ERRNO + && *herrnop == NETDB_INTERNAL +#endif + && *errnop == ERANGE) + /* Give the user a chance to get the same entry with a larger + buffer. */ + --entidx; } while (status == NSS_STATUS_RETURN);