aboutsummaryrefslogtreecommitdiffstats
path: root/sm
diff options
context:
space:
mode:
authorPhilip Le <[email protected]>2026-08-25 15:46:46 +0200
committerPhilip Le <[email protected]>2026-08-25 15:58:41 +0200
commite338ea3de2d151fe718c11d7dcd2a2178b10a22e (patch)
tree1ca6e1cd807bb3d69fae4777c4f96f41a191416e /sm
parentgpgconf: Print a warning on Windows on insufficent /etc permissions. (diff)
downloadgnupg-e338ea3de2d151fe718c11d7dcd2a2178b10a22e.tar.gz
gnupg-e338ea3de2d151fe718c11d7dcd2a2178b10a22e.zip
gpgsm: Check keyboxd usage in keydb_get_flags.
* sm/keydb.c (keydb_get_flags): Add condition that keyboxd is not used. -- The KEYDB_HANDLE variables FOUND and USED are only valid if the keyboxd is not used. Therefore USE_KEYBOXD has to be checked too. GnuPG-bug-id: 8048 Updates-commit: 766e9773cbc2a03d0392c2a2c94d0fe237741c5b
Diffstat (limited to 'sm')
-rw-r--r--sm/keydb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sm/keydb.c b/sm/keydb.c
index 0507c98fc..eeecc5acd 100644
--- a/sm/keydb.c
+++ b/sm/keydb.c
@@ -1076,7 +1076,7 @@ keydb_get_flags (KEYDB_HANDLE hd, int which, int idx, unsigned int *value)
if (DBG_CLOCK)
log_clock ("%s: enter (hd=%p)\n", __func__, hd);
- if ( hd->found < 0 || hd->found >= hd->used)
+ if (!hd->use_keyboxd && (hd->found < 0 || hd->found >= hd->used))
{
err = gpg_error (GPG_ERR_NOTHING_FOUND);
goto leave;