diff options
author | Werner Koch <[email protected]> | 2017-04-03 18:20:27 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2017-04-03 18:20:49 +0000 |
commit | 35c843c815306f36d1efbc52f5e2f6bac3f67aec (patch) | |
tree | 752eaa322992976b81256b25f7ed2e06aa56f6f7 /dirmngr/dns-stuff.c | |
parent | dirmngr: Do not assume that /etc/hosts exists. (diff) | |
download | gnupg-35c843c815306f36d1efbc52f5e2f6bac3f67aec.tar.gz gnupg-35c843c815306f36d1efbc52f5e2f6bac3f67aec.zip |
dirmngr: Always print a warning for a missing /etc/hosts.
* dirmngr/dns-stuff.c (libdns_init): No Windows specific handling of a
missing /etc/hosts.
--
My last comment on this was flawed. Windows seems to always have its
version of /etc/hosts. Only the en passant fixed bad escaping led me
assume that this was the case. Thanks to Andre for complaining about
my comment remark.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | dirmngr/dns-stuff.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c index a88e83311..c9ce40a2c 100644 --- a/dirmngr/dns-stuff.c +++ b/dirmngr/dns-stuff.c @@ -550,24 +550,15 @@ libdns_init (void) derr = dns_hosts_loadpath (ld.hosts, hosts_path); xfree (hosts_path); - if (derr) - { - err = libdns_error_to_gpg_error (derr); - /* Most Windows systems don't have a hosts files. So do not - * report in this case. */ - if (gpg_err_code (err) != GPG_ERR_ENOENT) - log_error ("failed to load hosts file: %s\n", gpg_strerror (err)); - err = 0; /* Do not bail out. */ - } #else derr = dns_hosts_loadpath (ld.hosts, "/etc/hosts"); +#endif if (derr) { err = libdns_error_to_gpg_error (derr); log_error ("failed to load hosts file: %s\n", gpg_strerror (err)); err = 0; /* Do not bail out - having no /etc/hosts is legal. */ } -#endif } /* dns_hints_local for stub mode, dns_hints_root for recursive. */ |