tools: Need to set the dir for common.conf

* tools/gpg-connect-agent.c (main): Set dirs.
* tools/gpg-card.c (main): Ditto.
--
Fixes-commit: 203dcc19eb
This commit is contained in:
Werner Koch 2022-09-21 09:39:48 +02:00
parent 0c8299e2b5
commit ed54fd53d1
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
3 changed files with 8 additions and 3 deletions

View File

@ -291,8 +291,8 @@ main (int argc, char **argv)
maybe_setuid = 0;
/*
Now we are now working under our real uid
*/
* Now we are working under our real uid
*/
/* Setup malloc hooks. */
{

View File

@ -294,6 +294,8 @@ main (int argc, char **argv)
exit (2);
/* Process common component options. */
gpgrt_set_confdir (GPGRT_CONFDIR_SYS, gnupg_sysconfdir ());
gpgrt_set_confdir (GPGRT_CONFDIR_USER, gnupg_homedir ());
if (parse_comopt (GNUPG_MODULE_NAME_CARD, opt.debug))
{
gnupg_status_printf (STATUS_FAILURE, "option-parser %u",

View File

@ -1257,7 +1257,10 @@ main (int argc, char **argv)
if (log_get_errorcount (0))
exit (2);
/* Process common component options. */
/* Process common component options. Note that we set the config
* dir only here so that --homedir will have an effect. */
gpgrt_set_confdir (GPGRT_CONFDIR_SYS, gnupg_sysconfdir ());
gpgrt_set_confdir (GPGRT_CONFDIR_USER, gnupg_homedir ());
if (parse_comopt (GNUPG_MODULE_NAME_CONNECT_AGENT, opt.verbose > 1))
exit(2);