summary refs log tree commit diff
path: root/nss/nss_files
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-06-24 17:43:22 +0000
committerUlrich Drepper <drepper@redhat.com>1998-06-24 17:43:22 +0000
commitd47aac39992cb1dd705d8c584f4d3979d7ce4602 (patch)
tree00f122d0949ace189446bb9e8f4939ce170dcfde /nss/nss_files
parente951d34052a3e76fa3045de7b9368e65115b1345 (diff)
downloadglibc-d47aac39992cb1dd705d8c584f4d3979d7ce4602.tar.gz
glibc-d47aac39992cb1dd705d8c584f4d3979d7ce4602.tar.xz
glibc-d47aac39992cb1dd705d8c584f4d3979d7ce4602.zip
Update.
1998-06-24  Ulrich Drepper  <drepper@cygnus.com>

	* manager.c (pthread_free): Undo patch from 980430.
	Reported by David Wragg <dpw@doc.ic.ac.uk>.
Diffstat (limited to 'nss/nss_files')
-rw-r--r--nss/nss_files/files-XXX.c11
1 files changed, 10 insertions, 1 deletions
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)
     {