dirmngr: Fix initialization of assuan's nPth hook.
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 25 Jan 2019 01:15:39 +0000 (10:15 +0900)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 1 Jul 2022 16:06:43 +0000 (17:06 +0100)
* dirmngr/dirmngr.c (main): Move assuan_set_system_hooks to...
(thread_init): ... here.

--

Cherry picked master commit of:
1f8817475f59ede3f28f57edc10ba56bbdd08b49

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
(cherry picked from commit 7f4c3eb0a039621c564b6095ab5f810524843157)

Gbp-Pq: Topic from-2.2.13
Gbp-Pq: Name dirmngr-Fix-initialization-of-assuan-s-nPth-hook.patch

dirmngr/dirmngr.c

index 76843bdee0933074414956fabc1ecb7cb330f808..ffbb108712de8c3675b3dcd504f68b5072c9c7f4 100644 (file)
@@ -802,6 +802,7 @@ 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
@@ -877,7 +878,6 @@ main (int argc, char **argv)
   assuan_set_malloc_hooks (&malloc_hooks);
   assuan_set_assuan_log_prefix (log_get_prefix (NULL));
   assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT);
-  assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH);
   assuan_sock_init ();
   setup_libassuan_logging (&opt.debug, dirmngr_assuan_log_monitor);