1 From: Werner Koch <wk@gnupg.org>
2 Date: Mon, 3 Apr 2017 20:20:27 +0200
3 Subject: dirmngr: Always print a warning for a missing /etc/hosts.
5 * dirmngr/dns-stuff.c (libdns_init): No Windows specific handling of a
9 My last comment on this was flawed. Windows seems to always have its
10 version of /etc/hosts. Only the en passant fixed bad escaping led me
11 assume that this was the case. Thanks to Andre for complaining about
14 Signed-off-by: Werner Koch <wk@gnupg.org>
15 (cherry picked from commit 35c843c815306f36d1efbc52f5e2f6bac3f67aec)
17 dirmngr/dns-stuff.c | 11 +----------
18 1 file changed, 1 insertion(+), 10 deletions(-)
20 diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
21 index c2d5488..150237e 100644
22 --- a/dirmngr/dns-stuff.c
23 +++ b/dirmngr/dns-stuff.c
24 @@ -550,24 +550,15 @@ libdns_init (void)
26 derr = dns_hosts_loadpath (ld.hosts, hosts_path);
30 - err = libdns_error_to_gpg_error (derr);
31 - /* Most Windows systems don't have a hosts files. So do not
32 - * report in this case. */
33 - if (gpg_err_code (err) != GPG_ERR_ENOENT)
34 - log_error ("failed to load hosts file: %s\n", gpg_strerror (err));
35 - err = 0; /* Do not bail out. */
38 derr = dns_hosts_loadpath (ld.hosts, "/etc/hosts");
42 err = libdns_error_to_gpg_error (derr);
43 log_error ("failed to load hosts file: %s\n", gpg_strerror (err));
44 err = 0; /* Do not bail out - having no /etc/hosts is legal. */
49 /* dns_hints_local for stub mode, dns_hints_root for recursive. */