about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-12-09 23:43:56 +0000
committerUlrich Drepper <drepper@redhat.com>1997-12-09 23:43:56 +0000
commit4628e9b01efe820adb9d1073a9a0468cf3c8e8da (patch)
tree7b3edf248fc36d0fca84dd606e058db7b63bf072
parentee28823eee8bb26ec6326db40a3a69463ed4c51a (diff)
downloadglibc-4628e9b01efe820adb9d1073a9a0468cf3c8e8da.tar.gz
glibc-4628e9b01efe820adb9d1073a9a0468cf3c8e8da.tar.xz
glibc-4628e9b01efe820adb9d1073a9a0468cf3c8e8da.zip
If buffer is to small, set the file handle for /etc/shadow back in
some more cases.
-rw-r--r--nis/nss_compat/compat-spwd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nis/nss_compat/compat-spwd.c b/nis/nss_compat/compat-spwd.c
index 86aa347abe..1560a72bf6 100644
--- a/nis/nss_compat/compat-spwd.c
+++ b/nis/nss_compat/compat-spwd.c
@@ -599,9 +599,13 @@ getspent_next_file (struct spwd *result, ent_t *ent,
             if (status == NSS_STATUS_RETURN) /* We couldn't parse the entry */
               continue;
             else
-              return status;
+	      {
+		if (status == NSS_STATUS_TRYAGAIN)
+		  fsetpos (ent->stream, &pos);
+		return status;
+	      }
 	}
-
+ 
       /* +:... */
       if (result->sp_namp[0] == '+' && result->sp_namp[1] == '\0')
 	{