diff options
Diffstat (limited to 'scd/scdaemon.c')
-rw-r--r-- | scd/scdaemon.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/scd/scdaemon.c b/scd/scdaemon.c index 7fe9b478d..5b7ecf21f 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -53,7 +53,6 @@ #include "mkdtemp.h" #include "gc-opt-flags.h" - enum cmd_and_opt_values { aNull = 0, oCsh = 'c', @@ -204,6 +203,8 @@ static void *start_connection_thread (void *arg); static void handle_connections (int listen_fd); /* Pth wrapper function definitions. */ +ASSUAN_SYSTEM_PTH_IMPL; + GCRY_THREAD_OPTION_PTH_IMPL; static int fixed_gcry_pth_init (void) { @@ -393,7 +394,8 @@ main (int argc, char **argv ) const char *config_filename = NULL; int allow_coredump = 0; int standard_socket = 0; - + struct assuan_malloc_hooks malloc_hooks; + set_strusage (my_strusage); gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN); /* Please note that we may running SUID(ROOT), so be very CAREFUL @@ -426,10 +428,14 @@ main (int argc, char **argv ) ksba_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free); - assuan_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free); - assuan_set_assuan_log_stream (log_get_stream ()); + malloc_hooks.malloc = gcry_malloc; + malloc_hooks.realloc = gcry_realloc; + malloc_hooks.free = gcry_free; + assuan_set_malloc_hooks (&malloc_hooks); assuan_set_assuan_log_prefix (log_get_prefix (NULL)); - assuan_set_assuan_err_source (GPG_ERR_SOURCE_DEFAULT); + assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT); + assuan_set_system_hooks (ASSUAN_SYSTEM_PTH); + assuan_sock_init (); setup_libgcrypt_logging (); gcry_control (GCRYCTL_USE_SECURE_RNDPOOL); |