[git] GnuPG - branch, master, updated. gnupg-2.1.11-104-g1aad5c6
by Werner Koch
cvs at cvs.gnupg.org
Thu Mar 17 15:16:08 CET 2016
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 1aad5c6277ea3852ff57bbf680f61c9136ce4d5c (commit)
from 1dc7f55a4095ee42ce2d8c3eb41b7162edf2ca2e (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 1aad5c6277ea3852ff57bbf680f61c9136ce4d5c
Author: Werner Koch <wk at gnupg.org>
Date: Thu Mar 17 15:15:48 2016 +0100
sm: Always create a keybox header when creating a new keybox.
* sm/keydb.c (maybe_create_keybox): Create the header blob.
--
This is required so that g10/keydb.c can properly detect that a keybox
file is actually there. Just writing a 0 zero length keybox file is
not sufficient because a file with that name may also be an old-style
OpenPGP keyring.
GnuPG-bug-id: 2275
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/sm/keydb.c b/sm/keydb.c
index f5705cb..495eb49 100644
--- a/sm/keydb.c
+++ b/sm/keydb.c
@@ -213,6 +213,18 @@ maybe_create_keybox (char *filename, int force, int *r_created)
}
umask (oldmask);
+ /* Make sure that at least one record is in a new keybox file, so
+ that the detection magic for OpenPGP keyboxes works the next time
+ it is used. */
+ rc = _keybox_write_header_blob (fp, 0);
+ if (rc)
+ {
+ fclose (fp);
+ log_error (_("error creating keybox '%s': %s\n"),
+ filename, gpg_strerror (rc));
+ goto leave;
+ }
+
if (!opt.quiet)
log_info (_("keybox '%s' created\n"), filename);
if (r_created)
-----------------------------------------------------------------------
Summary of changes:
sm/keydb.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list