diff options
author | Steve Langasek <vorlon@debian.org> | 2009-10-29 22:04:58 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-10-29 22:04:58 -0700 |
commit | 5c53736b52d5032171813d813d4a7ad505102b61 (patch) | |
tree | 0e541daa503b523f8feef1bb637dcbdd373dd675 /nss/nss_files | |
parent | ee6f35389c751b93fd7298ec02f642587d996c71 (diff) | |
download | glibc-5c53736b52d5032171813d813d4a7ad505102b61.tar.gz |
Fix nss_files if /etc/hosts is missing.
Diffstat (limited to 'nss/nss_files')
-rw-r--r-- | nss/nss_files/files-hosts.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nss/nss_files/files-hosts.c b/nss/nss_files/files-hosts.c index 7b69d47fcb..68fb969937 100644 --- a/nss/nss_files/files-hosts.c +++ b/nss/nss_files/files-hosts.c @@ -1,5 +1,5 @@ /* Hosts file parser in nss_files module. - Copyright (C) 1996-2001, 2003-2007, 2008 Free Software Foundation, Inc. + Copyright (C) 1996-2001, 2003-2008, 2009 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 @@ -423,6 +423,11 @@ _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat, if (! keep_stream) internal_endent (); } + else + { + *errnop = errno; + *herrnop = NO_DATA; + } __libc_lock_unlock (lock); |