From: Ulrich Drepper Date: Tue, 9 Dec 1997 23:43:56 +0000 (+0000) Subject: If buffer is to small, set the file handle for /etc/shadow back in X-Git-Tag: cvs/glibc-2_0_6pre3~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4628e9b01efe820adb9d1073a9a0468cf3c8e8da;p=thirdparty%2Fglibc.git If buffer is to small, set the file handle for /etc/shadow back in some more cases. --- diff --git a/nis/nss_compat/compat-spwd.c b/nis/nss_compat/compat-spwd.c index 86aa347abe4..1560a72bf6f 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') {