mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Fix output in case of a corrupted trustdb.
* g10/tdbdump.c (list_trustdb): Add arg FP and change callers to pass es_stdout. * g10/tdbio.c (upd_hashtable): On a corrupted trustdb call list_trustdb only in verbose > 1 mode and let it dump to stderr. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
840f807a90
commit
bf06d04f53
4 changed files with 14 additions and 13 deletions
|
@ -1132,7 +1132,8 @@ upd_hashtable (ulong table, byte *key, int keylen, ulong newrecnum)
|
|||
{
|
||||
log_error ("hashtbl %lu: %lu/%d points to an invalid record %lu\n",
|
||||
table, hashrec, (msb % ITEMS_PER_HTBL_RECORD), item);
|
||||
list_trustdb (NULL); /*FIXME: Bad - prints to stdout!!! */
|
||||
if (opt.verbose > 1)
|
||||
list_trustdb (es_stderr, NULL);
|
||||
return GPG_ERR_TRUSTDB;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue