diff options
author | Werner Koch <[email protected]> | 2020-11-04 14:49:58 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-11-04 15:26:27 +0000 |
commit | 1fbf085bc8b4a92772d1da8bfea507f4f97434b1 (patch) | |
tree | 31b1c0551fd9e4d733fb1fed50820fba252c8367 | |
parent | common: Fix duplicate implementation of try_make_homedir. (diff) | |
download | gnupg-1fbf085bc8b4a92772d1da8bfea507f4f97434b1.tar.gz gnupg-1fbf085bc8b4a92772d1da8bfea507f4f97434b1.zip |
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 <[email protected]>
-rw-r--r-- | tools/gpgconf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c index 3d791faf2..5ce0a64a0 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -781,12 +781,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); |