]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Mon, 10 Aug 1998 00:16:35 +0000 (00:16 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 10 Aug 1998 00:16:35 +0000 (00:16 +0000)
1998-08-10  Ulrich Drepper  <drepper@cygnus.com>

* nss/nss_db/db-XXX.c (_nss_db_getXXX): If buffer is too small
decrement `entidx' to allow retrieving the same entry again.

ChangeLog
nss/nss_db/db-XXX.c

index 4bc0035c1f371c6f6d3a18ec6f6c643c914f14d7..a71f1bd6de1f12b055273292e90fc53cd8088a49 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1998-08-10  Ulrich Drepper  <drepper@cygnus.com>
+
+       * 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  <drepper@cygnus.com>
 
        * sysdeps/powerpc/ffs.c: Fix typo.  Add support for ffsl.
index 62c7a251f1166f3dbd7323944c8a0300c43512b0..3839940028a3fd24329c98fa78105adbf7ad12e1 100644 (file)
@@ -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);
 
This page took 0.055107 seconds and 5 git commands to generate.