diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index 624d2972c..afd864295 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -520,9 +520,6 @@ static void handle_connections (gnupg_fd_t listen_fd, static void check_own_socket (void); static int check_for_running_agent (int silent); -/* Pth wrapper function definitions. */ -ASSUAN_SYSTEM_NPTH_IMPL; - /* Functions. @@ -1053,7 +1050,6 @@ static void initialize_modules (void) { thread_init_once (); - assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH); initialize_module_cache (); initialize_module_call_pinentry (); initialize_module_daemon (); @@ -1113,7 +1109,6 @@ main (int argc, char **argv) assuan_set_malloc_hooks (&malloc_hooks); assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT); assuan_sock_init (); - assuan_sock_set_system_hooks (ASSUAN_SYSTEM_NPTH); setup_libassuan_logging (&opt.debug, NULL); setup_libgcrypt_logging (); diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c index 967281ede..4619b0d7e 100644 --- a/dirmngr/dirmngr.c +++ b/dirmngr/dirmngr.c @@ -453,9 +453,6 @@ static void handle_connections (assuan_fd_t listen_fd); static void gpgconf_versions (void); -/* NPth wrapper function definitions. */ -ASSUAN_SYSTEM_NPTH_IMPL; - static const char * my_strusage( int level ) { @@ -983,7 +980,6 @@ static void thread_init (void) { npth_init (); - assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH); gpgrt_set_syscall_clamp (npth_unprotect, npth_protect); /* Now with NPth running we can set the logging callback. Our diff --git a/g10/gpg.c b/g10/gpg.c index 8b3d79e1e..0e7ae82b0 100644 --- a/g10/gpg.c +++ b/g10/gpg.c @@ -1079,10 +1079,6 @@ static void read_sessionkey_from_fd (int fd); -/* NPth wrapper function definitions. */ -ASSUAN_SYSTEM_NPTH_IMPL; - - static char * make_libversion (const char *libname, const char *(*getfnc)(const char*)) { @@ -3864,7 +3860,6 @@ main (int argc, char **argv) /* Init threading which is used by some helper functions. */ npth_init (); - assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH); gpgrt_set_syscall_clamp (npth_unprotect, npth_protect); if (logfile) diff --git a/g13/g13-syshelp.c b/g13/g13-syshelp.c index 6a4d3a446..6d0d1a659 100644 --- a/g13/g13-syshelp.c +++ b/g13/g13-syshelp.c @@ -306,7 +306,6 @@ main (int argc, char **argv) /* Prepare libassuan. */ assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT); - /*assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH);*/ setup_libassuan_logging (&opt.debug, NULL); /* Setup a default control structure for command line mode. */ diff --git a/g13/g13.c b/g13/g13.c index 785c91950..d9594dd52 100644 --- a/g13/g13.c +++ b/g13/g13.c @@ -226,10 +226,6 @@ static void set_cmd (enum cmd_and_opt_values *ret_cmd, static void start_idle_task (void); static void join_idle_task (void); - -/* Begin NPth wrapper functions. */ -ASSUAN_SYSTEM_NPTH_IMPL; - static const char * my_strusage( int level ) @@ -377,6 +373,7 @@ main (int argc, char **argv) init_common_subsystems (&argc, &argv); npth_init (); + gpgrt_set_syscall_clamp (npth_unprotect, npth_protect); /* Take extra care of the random pool. */ gcry_control (GCRYCTL_USE_SECURE_RNDPOOL); @@ -435,7 +432,6 @@ main (int argc, char **argv) /* Prepare libassuan. */ assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT); - assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH); setup_libassuan_logging (&opt.debug, NULL); /* Setup a default control structure for command line mode. */ diff --git a/kbx/keyboxd.c b/kbx/keyboxd.c index c33d85518..c55b2a0d9 100644 --- a/kbx/keyboxd.c +++ b/kbx/keyboxd.c @@ -257,10 +257,6 @@ static void kbxd_deinit_default_ctrl (ctrl_t ctrl); static void handle_connections (gnupg_fd_t listen_fd); static void check_own_socket (void); static int check_for_running_kbxd (int silent); - -/* Pth wrapper function definitions. */ -ASSUAN_SYSTEM_NPTH_IMPL; - /* * Functions. @@ -447,7 +443,6 @@ static void initialize_modules (void) { thread_init_once (); - assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH); } @@ -497,7 +492,6 @@ main (int argc, char **argv ) assuan_set_malloc_hooks (&malloc_hooks); assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT); assuan_sock_init (); - assuan_sock_set_system_hooks (ASSUAN_SYSTEM_NPTH); setup_libassuan_logging (&opt.debug, kbxd_assuan_log_monitor); setup_libgcrypt_logging (); diff --git a/scd/scdaemon.c b/scd/scdaemon.c index 71e37d28c..54c5760ba 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -272,9 +272,6 @@ static gnupg_fd_t create_server_socket (const char *name, static void *start_connection_thread (void *arg); static void handle_connections (gnupg_fd_t listen_fd); -/* Pth wrapper function definitions. */ -ASSUAN_SYSTEM_NPTH_IMPL; - static int active_connections; @@ -480,7 +477,6 @@ main (int argc, char **argv ) malloc_hooks.free = gcry_free; assuan_set_malloc_hooks (&malloc_hooks); assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT); - assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH); assuan_sock_init (); setup_libassuan_logging (&opt.debug, NULL); diff --git a/sm/gpgsm.c b/sm/gpgsm.c index 20b574377..9f6363652 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -596,10 +596,6 @@ our_md_test_algo (int algo) } -/* nPth wrapper function definitions. */ -ASSUAN_SYSTEM_NPTH_IMPL; - - static char * make_libversion (const char *libname, const char *(*getfnc)(const char*)) { @@ -1588,7 +1584,6 @@ main ( int argc, char **argv) log_info (_("WARNING: program may create a core file!\n")); npth_init (); - assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH); gpgrt_set_syscall_clamp (npth_unprotect, npth_protect); /* if (opt.qualsig_approval && !opt.quiet) */ diff --git a/tpm2d/tpm2daemon.c b/tpm2d/tpm2daemon.c index 9218d9a10..13e20b9ef 100644 --- a/tpm2d/tpm2daemon.c +++ b/tpm2d/tpm2daemon.c @@ -192,9 +192,6 @@ static gnupg_fd_t create_server_socket (const char *name, static void *start_connection_thread (void *arg); static void handle_connections (gnupg_fd_t listen_fd); -/* Pth wrapper function definitions. */ -ASSUAN_SYSTEM_NPTH_IMPL; - static int active_connections; @@ -368,7 +365,6 @@ main (int argc, char **argv ) malloc_hooks.free = gcry_free; assuan_set_malloc_hooks (&malloc_hooks); assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT); - assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH); assuan_sock_init (); setup_libassuan_logging (&opt.debug, NULL);