diff options
author | Werner Koch <wk@gnupg.org> | 2009-04-03 12:34:22 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2009-04-03 12:34:22 +0200 |
commit | 7c98dad98e838d089261716a3823b7be53728fd3 (patch) | |
tree | 995baac48b0d8845cab6cf522eb1a43d16e325b8 /g10/gpgv.c | |
parent | Print the card's S/N in a secret key listing. (diff) | |
download | gnupg2-7c98dad98e838d089261716a3823b7be53728fd3.tar.xz gnupg2-7c98dad98e838d089261716a3823b7be53728fd3.zip |
Make gpgv error message about a missing keyring more useful. This fixes
Debian#494040. Also implement readonly semantic for extra safety.
Diffstat (limited to 'g10/gpgv.c')
-rw-r--r-- | g10/gpgv.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/g10/gpgv.c b/g10/gpgv.c index 88baaabab..2797139e3 100644 --- a/g10/gpgv.c +++ b/g10/gpgv.c @@ -193,12 +193,13 @@ main( int argc, char **argv ) if (opt.verbose > 1) set_packet_list_mode(1); - - if (!nrings) /* no keyring given: use default one */ - keydb_add_resource ("trustedkeys" EXTSEP_S "gpg", 0, 0); + + /* Note: We open all keyrings in read-only mode (flag value: 8). */ + if (!nrings) /* No keyring given: use default one. */ + keydb_add_resource ("trustedkeys" EXTSEP_S "gpg", 8, 0); for (sl = nrings; sl; sl = sl->next) - keydb_add_resource (sl->d, 0, 0 ); - + keydb_add_resource (sl->d, 8, 0 ); + FREE_STRLIST (nrings); if ( (rc = verify_signatures( argc, argv ) )) |