]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
If buffer is to small, set the file handle for /etc/shadow back in
authorUlrich Drepper <drepper@redhat.com>
Tue, 9 Dec 1997 23:43:56 +0000 (23:43 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 9 Dec 1997 23:43:56 +0000 (23:43 +0000)
some more cases.

nis/nss_compat/compat-spwd.c

index 86aa347abe442251baaae50ec451e19aca001fbd..1560a72bf6f16b75be8b910ced180e6ffa599545 100644 (file)
@@ -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')
        {