gnupg/g10 (ChangeLog keylist.c)

cvs user wk cvs at cvs.gnupg.org
Tue Jan 18 10:44:23 CET 2005


    Date: Tuesday, January 18, 2005 @ 10:51:58
  Author: wk
    Path: /cvs/gnupg/gnupg/g10

Modified: ChangeLog keylist.c

(public_key_list): Do a trustdb staleness check before
opening the keyring.
(secret_key_list): Ditto.


-----------+
 ChangeLog |    6 ++++++
 keylist.c |    9 +++++++++
 2 files changed, 15 insertions(+)


Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.680 gnupg/g10/ChangeLog:1.681
--- gnupg/g10/ChangeLog:1.680	Tue Jan 11 05:15:55 2005
+++ gnupg/g10/ChangeLog	Tue Jan 18 10:51:58 2005
@@ -1,3 +1,9 @@
+2005-01-18  Werner Koch  <wk at g10code.com>
+
+	* keylist.c (public_key_list): Do a trustdb staleness check before
+	opening the keyring.
+	(secret_key_list): Ditto.
+
 2005-01-10  David Shaw  <dshaw at jabberwocky.com>
 
 	* keyedit.c (keyedit_menu): Move command strings outside the
Index: gnupg/g10/keylist.c
diff -u gnupg/g10/keylist.c:1.93 gnupg/g10/keylist.c:1.94
--- gnupg/g10/keylist.c:1.93	Tue Dec 21 05:19:03 2004
+++ gnupg/g10/keylist.c	Tue Jan 18 10:51:58 2005
@@ -95,6 +95,13 @@
       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 @@
 void
 secret_key_list( STRLIST list )
 {
+    check_trustdb_stale ();
+
     if( !list )
 	list_all(1);
     else  /* List by user id */




More information about the Gnupg-commits mailing list