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

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: 203dcc19eb48228c60036691fe87fb37e29369a4
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; maybe_setuid = 0;
/* /*
Now we are now working under our real uid * Now we are working under our real uid
*/ */
/* Setup malloc hooks. */ /* Setup malloc hooks. */
{ {

View File

@ -294,6 +294,8 @@ main (int argc, char **argv)
exit (2); exit (2);
/* Process common component options. */ /* 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)) if (parse_comopt (GNUPG_MODULE_NAME_CARD, opt.debug))
{ {
gnupg_status_printf (STATUS_FAILURE, "option-parser %u", gnupg_status_printf (STATUS_FAILURE, "option-parser %u",

View File

@ -1257,7 +1257,10 @@ main (int argc, char **argv)
if (log_get_errorcount (0)) if (log_get_errorcount (0))
exit (2); 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)) if (parse_comopt (GNUPG_MODULE_NAME_CONNECT_AGENT, opt.verbose > 1))
exit(2); exit(2);