1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

* nis/nis_call.c (nis_server_cache_search): Save errno around stat

call.
	(__nisfind_server): Similar for open readColdStartFile call.
	Patch partially by Jim Meyering.
	* nss/nss_files/files-XXX.c (_nss_files_getXXent_r): Save errno
	around internal_setent call.
This commit is contained in:
Ulrich Drepper
2008-03-24 19:28:00 +00:00
parent 7e570c5520
commit 0facd3df4b
3 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,6 @@
/* Common code for file-based databases in nss_files module.
Copyright (C) 1996-1999,2001,2002,2004,2007 Free Software Foundation, Inc.
Copyright (C) 1996-1999,2001,2002,2004,2007,2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -254,8 +255,12 @@ 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)
{
int save_errno = errno;
status = internal_setent (0);
__set_errno (errno);
if (status == NSS_STATUS_SUCCESS && fgetpos (stream, &position) < 0)
{
fclose (stream);