1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

Fix bug 1285

This commit is contained in:
Werner Koch 2010-09-24 13:06:56 +00:00
parent 9b230eadc8
commit a384e94b73
5 changed files with 27 additions and 5 deletions

View file

@ -1,3 +1,9 @@
2010-09-24 Werner Koch <wk@g10code.com>
* gpg-agent.c (main, reread_configuration): Always test whether
the default configuration file has been created in the meantime.
Fixes bug#1285.
2010-08-11 Werner Koch <wk@g10code.com>
* call-pinentry.c (agent_askpin, agent_get_passphrase): Fix

View file

@ -724,6 +724,12 @@ main (int argc, char **argv )
if( parse_debug )
log_info (_("NOTE: no default option file `%s'\n"),
configname );
/* Save the default conf file name so that
reread_configuration is able to test whether the
config file has been created in the meantime. */
xfree (config_filename);
config_filename = configname;
configname = NULL;
}
else
{
@ -811,10 +817,15 @@ main (int argc, char **argv )
fclose( configfp );
configfp = NULL;
/* Keep a copy of the name so that it can be read on SIGHUP. */
config_filename = configname;
if (config_filename != configname)
{
xfree (config_filename);
config_filename = configname;
}
configname = NULL;
goto next_pass;
}
xfree (configname);
configname = NULL;
if (log_get_errorcount(0))
@ -1332,8 +1343,8 @@ reread_configuration (void)
fp = fopen (config_filename, "r");
if (!fp)
{
log_error (_("option file `%s': %s\n"),
config_filename, strerror(errno) );
log_info (_("option file `%s': %s\n"),
config_filename, strerror(errno) );
return;
}