diff options
author | NIIBE Yutaka <[email protected]> | 2022-04-27 04:49:30 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2022-04-27 04:49:30 +0000 |
commit | bd5dbdb8131cde182c79070e12f9e64a549643cd (patch) | |
tree | 50d2acfde4506af445141d03099daa94a6f8d629 /kbx/backend-support.c | |
parent | gpg: Look up user ID to revoke by UID hash (diff) | |
download | gnupg-bd5dbdb8131cde182c79070e12f9e64a549643cd.tar.gz gnupg-bd5dbdb8131cde182c79070e12f9e64a549643cd.zip |
kbx: Fix a race condition which results no status report.
* kbx/keyboxd.h (kbxd_status_printf): New.
* kbx/backend-support.c (be_return_pubkey): Use kbxd_status_printf.
* kbx/kbxserver.c (kbxd_status_printf): New.
* kbxd_start_command_handler (kbxd_start_command_handler): Don't
use set_assuan_context_func, because the function pointer is
shared by multiple threads.
--
GnuPG-bug-id: 5948
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'kbx/backend-support.c')
-rw-r--r-- | kbx/backend-support.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kbx/backend-support.c b/kbx/backend-support.c index 1821129ea..7ab63985c 100644 --- a/kbx/backend-support.c +++ b/kbx/backend-support.c @@ -173,18 +173,18 @@ be_return_pubkey (ctrl_t ctrl, const void *buffer, size_t buflen, char hexubid[2*UBID_LEN+1]; bin2hex (ubid, UBID_LEN, hexubid); - err = status_printf (ctrl, "PUBKEY_INFO", "%d %s %c%c %d %d", - pubkey_type, hexubid, - is_ephemeral? 'e':'-', - is_revoked? 'r':'-', - uid_no, pk_no); + err = kbxd_status_printf (ctrl, "PUBKEY_INFO", "%d %s %c%c %d %d", + pubkey_type, hexubid, + is_ephemeral? 'e':'-', + is_revoked? 'r':'-', + uid_no, pk_no); if (err) goto leave; if (ctrl->no_data_return) err = 0; else - err = kbxd_write_data_line(ctrl, buffer, buflen); + err = kbxd_write_data_line (ctrl, buffer, buflen); leave: return err; |