diff options
| -rw-r--r-- | g10/keydb.c | 3 | ||||
| -rw-r--r-- | sm/keydb.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/g10/keydb.c b/g10/keydb.c index 3d95f511a..06c78f048 100644 --- a/g10/keydb.c +++ b/g10/keydb.c @@ -1012,6 +1012,9 @@ lock_all (KEYDB_HANDLE hd) To fix this we need to use a lock file to protect lock_all. */ + if (hd->keep_lock) + return 0; + for (i=0; !rc && i < hd->used; i++) { switch (hd->active[i].type) diff --git a/sm/keydb.c b/sm/keydb.c index 651bbd968..68325113a 100644 --- a/sm/keydb.c +++ b/sm/keydb.c @@ -811,6 +811,9 @@ lock_all (KEYDB_HANDLE hd) if (hd->use_keyboxd) return 0; + if (hd->keep_lock) + return 0; + /* Fixme: This locking scheme may lead to deadlock if the resources are not added in the same order by all processes. We are currently only allowing one resource so it is not a problem. */ |
