From d47aac39992cb1dd705d8c584f4d3979d7ce4602 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Jun 1998 17:43:22 +0000 Subject: Update. 1998-06-24 Ulrich Drepper * manager.c (pthread_free): Undo patch from 980430. Reported by David Wragg . --- nss/nss_files/files-XXX.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'nss/nss_files/files-XXX.c') diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c index 6933986026..d6a7911b66 100644 --- a/nss/nss_files/files-XXX.c +++ b/nss/nss_files/files-XXX.c @@ -224,7 +224,16 @@ CONCAT(_nss_files_get,ENTNAME_r) (struct STRUCTURE *result, char *buffer, /* Be prepared that the set*ent function was not called before. */ if (stream == NULL) - status = internal_setent (0); + { + status = internal_setent (0); + + if (status == NSS_STATUS_SUCCESS && fgetpos (stream, &position) < 0) + { + fclose (stream); + stream = NULL; + status = NSS_STATUS_UNAVAIL; + } + } if (status == NSS_STATUS_SUCCESS) { -- cgit 1.4.1