From: Ulrich Drepper Date: Wed, 12 Aug 1998 12:29:15 +0000 (+0000) Subject: (internal_getent): In case of an read error do not trust errno value, X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12eabbb53ea4175e6985023c7eca82a8446646f8;p=thirdparty%2Fglibc.git (internal_getent): In case of an read error do not trust errno value, set it to ENOENT. --- diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c index c1e716d3d00..8ea6dc2eaec 100644 --- a/nss/nss_files/files-XXX.c +++ b/nss/nss_files/files-XXX.c @@ -185,6 +185,7 @@ internal_getent (struct STRUCTURE *result, if (p == NULL && feof (stream)) { /* End of file or read error. */ + __set_errno (ENOENT); H_ERRNO_SET (HOST_NOT_FOUND); return NSS_STATUS_NOTFOUND; }