1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

w32: Do no use Registry item DefaultLogFile for the main tools.

* g10/gpg.c (main): Set LOG_NO_REGISTRY.
* sm/gpgsm.c (main): Ditto.
* tools/gpg-connect-agent.c (main): Ditto.
* tools/gpgconf.c (main): Ditto.
(show_other_registry_entries): Print "DefaultLogFile".
--

The intention of this mostly forgotten registry entry was to allow for
easy debugging of the tools.  However, with the global config file
common.conf things are anyway better.  We disable the use for the
commonly used tools so that it does not look like calling gpg on the
command line seems to block with no output if the log
server (e.g. tcp://1.2.3.4:11111) is not reachable.
This commit is contained in:
Werner Koch 2022-04-20 09:20:35 +02:00
parent 41fb46007e
commit 22fef189b1
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
4 changed files with 6 additions and 4 deletions

View File

@ -2422,7 +2422,7 @@ main (int argc, char **argv)
gnupg_rl_initialize (); gnupg_rl_initialize ();
gpgrt_set_strusage (my_strusage); gpgrt_set_strusage (my_strusage);
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN); gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
log_set_prefix (GPG_NAME, GPGRT_LOG_WITH_PREFIX); log_set_prefix (GPG_NAME, GPGRT_LOG_WITH_PREFIX|GPGRT_LOG_NO_REGISTRY);
/* Make sure that our subsystems are ready. */ /* Make sure that our subsystems are ready. */
i18n_init(); i18n_init();

View File

@ -901,7 +901,7 @@ main ( int argc, char **argv)
/* Please note that we may running SUID(ROOT), so be very CAREFUL /* Please note that we may running SUID(ROOT), so be very CAREFUL
when adding any stuff between here and the call to secmem_init() when adding any stuff between here and the call to secmem_init()
somewhere after the option parsing */ somewhere after the option parsing */
log_set_prefix (GPGSM_NAME, GPGRT_LOG_WITH_PREFIX); log_set_prefix (GPGSM_NAME, GPGRT_LOG_WITH_PREFIX|GPGRT_LOG_NO_REGISTRY);
/* Make sure that our subsystems are ready. */ /* Make sure that our subsystems are ready. */
i18n_init (); i18n_init ();

View File

@ -1196,7 +1196,8 @@ main (int argc, char **argv)
early_system_init (); early_system_init ();
gnupg_rl_initialize (); gnupg_rl_initialize ();
gpgrt_set_strusage (my_strusage); gpgrt_set_strusage (my_strusage);
log_set_prefix ("gpg-connect-agent", GPGRT_LOG_WITH_PREFIX); log_set_prefix ("gpg-connect-agent",
GPGRT_LOG_WITH_PREFIX|GPGRT_LOG_NO_REGISTRY);
/* Make sure that our subsystems are ready. */ /* Make sure that our subsystems are ready. */
i18n_init(); i18n_init();

View File

@ -620,7 +620,7 @@ main (int argc, char **argv)
early_system_init (); early_system_init ();
gnupg_reopen_std (GPGCONF_NAME); gnupg_reopen_std (GPGCONF_NAME);
gpgrt_set_strusage (my_strusage); gpgrt_set_strusage (my_strusage);
log_set_prefix (GPGCONF_NAME, GPGRT_LOG_WITH_PREFIX); log_set_prefix (GPGCONF_NAME, GPGRT_LOG_WITH_PREFIX|GPGRT_LOG_NO_REGISTRY);
/* Make sure that our subsystems are ready. */ /* Make sure that our subsystems are ready. */
i18n_init(); i18n_init();
@ -1321,6 +1321,7 @@ show_other_registry_entries (estream_t outfp)
{ 1, "HKLM\\Software\\Gpg4win:Desktop-Version" }, { 1, "HKLM\\Software\\Gpg4win:Desktop-Version" },
{ 1, "HKLM\\Software\\Gpg4win:VS-Desktop-Version" }, { 1, "HKLM\\Software\\Gpg4win:VS-Desktop-Version" },
{ 1, "\\" GNUPG_REGISTRY_DIR ":HomeDir" }, { 1, "\\" GNUPG_REGISTRY_DIR ":HomeDir" },
{ 1, "\\" GNUPG_REGISTRY_DIR ":DefaultLogFile" },
{ 2, "Software\\Microsoft\\Office\\Outlook\\Addins\\GNU.GpgOL" { 2, "Software\\Microsoft\\Office\\Outlook\\Addins\\GNU.GpgOL"
":LoadBehavior" }, ":LoadBehavior" },
{ 2, "HKCU\\Software\\Microsoft\\Office\\16.0\\Outlook\\Options\\Mail:" { 2, "HKCU\\Software\\Microsoft\\Office\\16.0\\Outlook\\Options\\Mail:"