mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
gpg,agent,kbx,sm,scd,tpm2d,g13: Use assuan_control.
* agent/gpg-agent.c (thread_init_once): Call assuan_control. * g10/gpg.c (main): Likewise. * g13/g13.c (main): Likewise. * kbx/keyboxd.c (thread_init_once): Likewise. * scd/scdaemon.c (main): Likewise. * sm/gpgsm.c (main): Likewise. * tpm2d/tpm2daemon.c (main): Likewise. -- GnuPG-bug-id: 6606 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
9eb8cb642f
commit
b8c5d99406
@ -1043,6 +1043,7 @@ thread_init_once (void)
|
|||||||
* initialized and thus Libgcrypt could not set its system call
|
* initialized and thus Libgcrypt could not set its system call
|
||||||
* clamp. */
|
* clamp. */
|
||||||
gcry_control (GCRYCTL_REINIT_SYSCALL_CLAMP, 0, 0);
|
gcry_control (GCRYCTL_REINIT_SYSCALL_CLAMP, 0, 0);
|
||||||
|
assuan_control (ASSUAN_CONTROL_REINIT_SYSCALL_CLAMP, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3860,6 +3860,7 @@ main (int argc, char **argv)
|
|||||||
/* Init threading which is used by some helper functions. */
|
/* Init threading which is used by some helper functions. */
|
||||||
npth_init ();
|
npth_init ();
|
||||||
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
|
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
|
||||||
|
assuan_control (ASSUAN_CONTROL_REINIT_SYSCALL_CLAMP, NULL);
|
||||||
|
|
||||||
if (logfile)
|
if (logfile)
|
||||||
{
|
{
|
||||||
|
@ -433,6 +433,7 @@ main (int argc, char **argv)
|
|||||||
/* Prepare libassuan. */
|
/* Prepare libassuan. */
|
||||||
assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT);
|
assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT);
|
||||||
setup_libassuan_logging (&opt.debug, NULL);
|
setup_libassuan_logging (&opt.debug, NULL);
|
||||||
|
assuan_control (ASSUAN_REINIT_SYSCALL_CLAMP, NULL);
|
||||||
|
|
||||||
/* Setup a default control structure for command line mode. */
|
/* Setup a default control structure for command line mode. */
|
||||||
memset (&ctrl, 0, sizeof ctrl);
|
memset (&ctrl, 0, sizeof ctrl);
|
||||||
|
@ -436,6 +436,7 @@ thread_init_once (void)
|
|||||||
* initialized and thus Libgcrypt could not set its system call
|
* initialized and thus Libgcrypt could not set its system call
|
||||||
* clamp. */
|
* clamp. */
|
||||||
gcry_control (GCRYCTL_REINIT_SYSCALL_CLAMP, 0, 0);
|
gcry_control (GCRYCTL_REINIT_SYSCALL_CLAMP, 0, 0);
|
||||||
|
assuan_control (ASSUAN_CONTROL_REINIT_SYSCALL_CLAMP, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -754,6 +754,7 @@ main (int argc, char **argv )
|
|||||||
npth_init ();
|
npth_init ();
|
||||||
setup_signal_mask ();
|
setup_signal_mask ();
|
||||||
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
|
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
|
||||||
|
assuan_control (ASSUAN_CONTROL_REINIT_SYSCALL_CLAMP, NULL);
|
||||||
|
|
||||||
/* If --debug-allow-core-dump has been given we also need to
|
/* If --debug-allow-core-dump has been given we also need to
|
||||||
switch the working directory to a place where we can actually
|
switch the working directory to a place where we can actually
|
||||||
@ -895,6 +896,7 @@ main (int argc, char **argv )
|
|||||||
npth_init ();
|
npth_init ();
|
||||||
setup_signal_mask ();
|
setup_signal_mask ();
|
||||||
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
|
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
|
||||||
|
assuan_control (ASSUAN_CONTROL_REINIT_SYSCALL_CLAMP, NULL);
|
||||||
|
|
||||||
/* Detach from tty and put process into a new session. */
|
/* Detach from tty and put process into a new session. */
|
||||||
if (!nodetach )
|
if (!nodetach )
|
||||||
|
@ -1586,6 +1586,7 @@ main ( int argc, char **argv)
|
|||||||
|
|
||||||
npth_init ();
|
npth_init ();
|
||||||
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
|
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
|
||||||
|
assuan_control (ASSUAN_CONTROL_REINIT_SYSCALL_CLAMP, NULL);
|
||||||
|
|
||||||
/* if (opt.qualsig_approval && !opt.quiet) */
|
/* if (opt.qualsig_approval && !opt.quiet) */
|
||||||
/* log_info (_("This software has officially been approved to " */
|
/* log_info (_("This software has officially been approved to " */
|
||||||
|
@ -595,6 +595,7 @@ main (int argc, char **argv )
|
|||||||
|
|
||||||
npth_init ();
|
npth_init ();
|
||||||
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
|
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
|
||||||
|
assuan_control (ASSUAN_REINIT_SYSCALL_CLAMP, NULL);
|
||||||
|
|
||||||
/* If --debug-allow-core-dump has been given we also need to
|
/* If --debug-allow-core-dump has been given we also need to
|
||||||
switch the working directory to a place where we can actually
|
switch the working directory to a place where we can actually
|
||||||
@ -736,6 +737,7 @@ main (int argc, char **argv )
|
|||||||
|
|
||||||
npth_init ();
|
npth_init ();
|
||||||
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
|
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
|
||||||
|
assuan_control (ASSUAN_REINIT_SYSCALL_CLAMP, NULL);
|
||||||
|
|
||||||
/* Detach from tty and put process into a new session. */
|
/* Detach from tty and put process into a new session. */
|
||||||
if (!nodetach )
|
if (!nodetach )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user