[git] GnuPG - branch, master, updated. gnupg-2.1.18-73-gdee026d
by Werner Koch
cvs at cvs.gnupg.org
Mon Feb 13 20:15:49 CET 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, master has been updated
via dee026d761ae3d7594c3dbc5b3fa842df53cc189 (commit)
via 30dac0486b6357e84fbe79c612eea940b654e4d1 (commit)
via 810adfd47801fc01e45fb71af9f05c91f7890cdb (commit)
from f8ce31a7bf1ee85e5010b628a66e6f69486e5213 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit dee026d761ae3d7594c3dbc5b3fa842df53cc189
Author: Werner Koch <wk at gnupg.org>
Date: Mon Feb 13 20:09:26 2017 +0100
dirmngr: Do a DNS lookup even if it is missing from nsswitch.conf.
* dirmngr/dns-stuff.c (libdns_init): Do not print error message for a
missing nsswitch.conf. Make sure that tehre is a DNS entry.
--
GnuPG-bug-id: 2948
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index f0de357..e57ddc7 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -498,12 +498,10 @@ libdns_init (void)
(dns_nssconf_loadpath (ld.resolv_conf, fname));
if (err)
{
- log_error ("failed to load '%s': %s\n", fname, gpg_strerror (err));
- /* not fatal, nsswitch.conf is not used on all systems; assume
- * classic behavior instead. Our dns library states "bf" which tries
- * DNS then Files, which is not classic; FreeBSD
- * /usr/src/lib/libc/net/gethostnamadr.c defines default_src[] which
- * is Files then DNS, which is. */
+ /* This is not a fatal error: nsswitch.conf is not used on
+ * all systems; assume classic behavior instead. */
+ if (gpg_err_code (err) != GPG_ERR_ENOENT)
+ log_error ("failed to load '%s': %s\n", fname, gpg_strerror (err));
if (opt_debug)
log_debug ("dns: fallback resolution order, files then DNS\n");
ld.resolv_conf->lookup[0] = 'f';
@@ -511,6 +509,23 @@ libdns_init (void)
ld.resolv_conf->lookup[2] = '\0';
err = GPG_ERR_NO_ERROR;
}
+ else if (!strchr (ld.resolv_conf->lookup, 'b'))
+ {
+ /* No DNS resulution type found in the list. This might be
+ * due to systemd based systems which allow for custom
+ * keywords which are not known to us and thus we do not
+ * know whether DNS is wanted or not. Becuase DNS is
+ * important for our infrastructure, we forcefully append
+ * DNS to the end of the list. */
+ if (strlen (ld.resolv_conf->lookup)+2 < sizeof ld.resolv_conf->lookup)
+ {
+ if (opt_debug)
+ log_debug ("dns: appending DNS to resolution order\n");
+ strcat (ld.resolv_conf->lookup, "b");
+ }
+ else
+ log_error ("failed to append DNS to resolution order\n");
+ }
#endif /* Unix */
}
commit 30dac0486b6357e84fbe79c612eea940b654e4d1
Author: Werner Koch <wk at gnupg.org>
Date: Mon Feb 13 19:38:53 2017 +0100
gpgconf: No ENOENT warning with --change-options et al.
* tools/gpgconf-comp.c (retrieve_options_from_program): Check ERRNO
before printing a warning.
--
It is common that a conf files does not exist - thus we should not
print a warning.
GnuPG-bug-id: 2944
BTW: The error messages in gpgconf should be reworked to match those
of the other components.
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index 20e8411..d1144b2 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -2164,8 +2164,11 @@ retrieve_options_from_program (gc_component_t component, gc_backend_t backend)
config = es_fopen (config_filename, "r");
if (!config)
- gc_error (0, errno, "warning: can not open config file %s",
- config_filename);
+ {
+ if (errno != ENOENT)
+ gc_error (0, errno, "warning: can not open config file %s",
+ config_filename);
+ }
else
{
while ((length = es_read_line (config, &line, &line_len, NULL)) > 0)
commit 810adfd47801fc01e45fb71af9f05c91f7890cdb
Author: Werner Koch <wk at gnupg.org>
Date: Mon Feb 13 13:09:51 2017 +0100
gpg: Print a warning if no command has been given.
* g10/gpg.c (main): Print in the default case.
--
GnuPG-bug-id: 2943
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/g10/gpg.c b/g10/gpg.c
index 66a2055..0c5a167 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -4894,8 +4894,12 @@ main (int argc, char **argv)
#endif /*USE_TOFU*/
break;
- case aListPackets:
default:
+ if (!opt.quiet)
+ log_info (_("WARNING: no command supplied."
+ " Trying to guess what you mean ...\n"));
+ /*FALLTHU*/
+ case aListPackets:
if( argc > 1 )
wrong_args("[filename]");
/* Issue some output for the unix newbie */
-----------------------------------------------------------------------
Summary of changes:
dirmngr/dns-stuff.c | 27 +++++++++++++++++++++------
g10/gpg.c | 6 +++++-
tools/gpgconf-comp.c | 7 +++++--
3 files changed, 31 insertions(+), 9 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list