summaryrefslogtreecommitdiffstats
path: root/sm/delete.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2004-02-02 18:09:35 +0100
committerWerner Koch <wk@gnupg.org>2004-02-02 18:09:35 +0100
commit5bda9a8e74753da5d7ee912c32a0137ebce2abd8 (patch)
tree17d077c8da8a9cba7a1d9919f8021424fcbd9ece /sm/delete.c
parentFix copyright line. (diff)
downloadgnupg2-5bda9a8e74753da5d7ee912c32a0137ebce2abd8.tar.xz
gnupg2-5bda9a8e74753da5d7ee912c32a0137ebce2abd8.zip
* keybox.h (keybox_flag_t): New.
* keybox-search.c (get_flag_from_image, keybox_get_flags): New. (_keybox_get_flag_location): New. * certchain.c (gpgsm_validate_chain): Mark revoked certs in the keybox. * keylist.c (list_cert_colon): New arg VALIDITY; use it to print a revoked flag. (list_internal_keys): Retrieve validity flag. (list_external_cb): Pass 0 as validity flag. * keydb.c (keydb_get_flags, keydb_set_flags): New. (keydb_set_cert_flags): New. (lock_all): Return a proper error code. (keydb_lock): New. (keydb_delete): Don't lock but check that it has been locked. (keydb_update_keyblock): Ditto. * delete.c (delete_one): Take a lock.
Diffstat (limited to 'sm/delete.c')
-rw-r--r--sm/delete.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sm/delete.c b/sm/delete.c
index 8b04bc426..11a0a5476 100644
--- a/sm/delete.c
+++ b/sm/delete.c
@@ -105,7 +105,14 @@ delete_one (CTRL ctrl, const char *username)
goto leave;
}
- /* we need to search again to get back to the right position. */
+ /* We need to search again to get back to the right position. */
+ rc = keydb_lock (kh);
+ if (rc)
+ {
+ log_error (_("error locking keybox: %s\n"), gpg_strerror (rc));
+ goto leave;
+ }
+
do
{
keydb_search_reset (kh);