mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
kbx: Fix keyboxd searching with multiple patterns.
* kbx/keybox-search-desc.h (struct keydb_search_desc): New flag name_used. * common/userids.c (classify_user_id): Set flag. * kbx/kbxserver.c (struct search_backing_store_s): New. (cmd_search): use a backing store for the const pointers. (kbxd_start_command_handler): Release the backing store. -- Well, the search object partly uses buffers but also const pointers (for strings and the serial number). This when assigning such objects to an another one we should really take a deep copy and not just copy the pointer. The more clean solution would have been to provide a storage option the search object but that needs checking the code at too many places so that I decided to use a separate backing store array here. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
044e5a3c38
commit
101ba4f18a
3 changed files with 95 additions and 10 deletions
|
@ -83,6 +83,7 @@ struct keydb_search_desc
|
|||
unsigned char grip[KEYGRIP_LEN];
|
||||
unsigned char ubid[UBID_LEN];
|
||||
} u;
|
||||
byte name_used;/* The union uses NAME. */
|
||||
byte snhex; /* SN above is a hexstring and not binary. */
|
||||
byte fprlen; /* Only used with KEYDB_SEARCH_MODE_FPR. */
|
||||
int exact; /* Use exactly this key ('!' suffix in gpg). */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue