1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Log the Windows system error code at more places.

* common/asshelp.c (log_libassuan_system_error): New.
* agent/gpg-agent.c (create_server_socket): Use new log function.
(handle_connections): Log system error code for a failed accept.
* dirmngr/dirmngr.c (handle_connections): Ditto.
* kbx/keyboxd.c (handle_connections): Ditto.
* scd/scdaemon.c (handle_connections): Ditto.
* tpm2d/tpm2daemon.c (handle_connections): Ditto.

* dirmngr/dirmngr.c (main): Log system error code for a failed bin.
* kbx/keyboxd.c (create_server_socket): Ditto.
* scd/scdaemon.c (create_server_socket): Ditto.
* tpm2d/tpm2daemon.c (create_server_socket): Ditto.
This commit is contained in:
Werner Koch 2025-03-05 10:24:14 +01:00
parent c68eca6363
commit 41cf76b8c1
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
7 changed files with 43 additions and 17 deletions

View file

@ -128,6 +128,21 @@ set_libassuan_log_cats (unsigned int newcats)
}
/* Get the last Windows error from an Assuan socket function and print
* the raw error code using log_info. */
void
log_libassuan_system_error (assuan_fd_t fd)
{
int w32err = 0;
if (assuan_sock_get_flag (fd, "w32_error", &w32err))
w32err = -1; /* Old Libassuan or not Windows. */
if (w32err != -1)
log_info ("system error code: %d (0x%x)\n", w32err, w32err);
}
static gpg_error_t
send_one_option (assuan_context_t ctx, gpg_err_source_t errsource,

View file

@ -46,6 +46,8 @@ void setup_libassuan_logging (unsigned int *debug_var_address,
const char *msg));
void set_libassuan_log_cats (unsigned int newcats);
void log_libassuan_system_error (assuan_fd_t fd);
gpg_error_t
send_pinentry_environment (assuan_context_t ctx,