aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2005-01-18 09:51:58 +0000
committerWerner Koch <[email protected]>2005-01-18 09:51:58 +0000
commit79161ef7b9686b48ddbf95cb51c5e31564b40a1f (patch)
treef635b3b45ba14ef0172b11046a3b2e84d14977bc
parent* gpgkeys_curl.c (main): Only allow specified protocols to use the (diff)
downloadgnupg-79161ef7b9686b48ddbf95cb51c5e31564b40a1f.tar.gz
gnupg-79161ef7b9686b48ddbf95cb51c5e31564b40a1f.zip
(public_key_list): Do a trustdb staleness check before
opening the keyring. (secret_key_list): Ditto.
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog6
-rw-r--r--g10/keylist.c9
2 files changed, 15 insertions, 0 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 385c338d4..bc37588c5 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,9 @@
+2005-01-18 Werner Koch <[email protected]>
+
+ * keylist.c (public_key_list): Do a trustdb staleness check before
+ opening the keyring.
+ (secret_key_list): Ditto.
+
2005-01-10 David Shaw <[email protected]>
* keyedit.c (keyedit_menu): Move command strings outside the
diff --git a/g10/keylist.c b/g10/keylist.c
index feae6963a..b712aa466 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -95,6 +95,13 @@ public_key_list( STRLIST list )
printf("\n");
}
+ /* We need to do the stale check right here because it might need to
+ update the keyring while we already have the keyring open. This
+ is very bad for W32 because of a sharing violation. For real OSes
+ it might lead to false results if we are later listing a keyring
+ which is associated with the inode of a deleted file. */
+ check_trustdb_stale ();
+
if( !list )
list_all(0);
else
@@ -104,6 +111,8 @@ public_key_list( STRLIST list )
void
secret_key_list( STRLIST list )
{
+ check_trustdb_stale ();
+
if( !list )
list_all(1);
else /* List by user id */