[Pkg-gnupg-commit] [gnupg2] 114/124: dirmngr: Always print a warning for a missing /etc/hosts.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Apr 5 15:55:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 35c843c815306f36d1efbc52f5e2f6bac3f67aec
Author: Werner Koch <wk at gnupg.org>
Date: Mon Apr 3 20:20:27 2017 +0200
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 <wk at gnupg.org>
---
dirmngr/dns-stuff.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index a88e833..c9ce40a 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. */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list