aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-11-04 15:49:58 +0100
committerWerner Koch <wk@gnupg.org>2020-11-04 16:13:05 +0100
commit7d95f2e7e7a09e3d433d449b117e3470f9dd38c7 (patch)
treeaffaa082156fdc69d6008c1133d68a35d526d550
parentdabc314b71378f585fac2753149f3358e32ec621 (diff)
downloadgnupg-7d95f2e7e7a09e3d433d449b117e3470f9dd38c7.tar.gz
gpgconf: Make sure the homedir exists for --apply-profile.
* tools/gpgconf.c (main) <aApplyDefaults, aApplyProfile>: Create the standard home directory. -- This fixes a regression due to the fix for GnuPG-bug-id: 4867 Before that change gpgsm implictly created the homedir while options were collected. It is important to have this so that a login script can create config files for new users. Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r--tools/gpgconf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c
index 0b7348d1d..a5b84402b 100644
--- a/tools/gpgconf.c
+++ b/tools/gpgconf.c
@@ -805,12 +805,16 @@ main (int argc, char **argv)
es_putc ('\n', es_stderr);
gpgconf_failure (GPG_ERR_USER_2);
}
+ if (!opt.dry_run)
+ gnupg_maybe_make_homedir (default_homedir (), opt.quiet);
gc_component_retrieve_options (-1);
if (gc_process_gpgconf_conf (NULL, 1, 1, NULL))
gpgconf_failure (0);
break;
case aApplyProfile:
+ if (!opt.dry_run)
+ gnupg_maybe_make_homedir (default_homedir (), opt.quiet);
gc_component_retrieve_options (-1);
if (gc_apply_profile (fname))
gpgconf_failure (0);