mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
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>
This commit is contained in:
parent
6fe5c8c06e
commit
1fbf085bc8
@ -781,12 +781,16 @@ main (int argc, char **argv)
|
|||||||
es_putc ('\n', es_stderr);
|
es_putc ('\n', es_stderr);
|
||||||
gpgconf_failure (GPG_ERR_USER_2);
|
gpgconf_failure (GPG_ERR_USER_2);
|
||||||
}
|
}
|
||||||
|
if (!opt.dry_run)
|
||||||
|
gnupg_maybe_make_homedir (default_homedir (), opt.quiet);
|
||||||
gc_component_retrieve_options (-1);
|
gc_component_retrieve_options (-1);
|
||||||
if (gc_process_gpgconf_conf (NULL, 1, 1, NULL))
|
if (gc_process_gpgconf_conf (NULL, 1, 1, NULL))
|
||||||
gpgconf_failure (0);
|
gpgconf_failure (0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case aApplyProfile:
|
case aApplyProfile:
|
||||||
|
if (!opt.dry_run)
|
||||||
|
gnupg_maybe_make_homedir (default_homedir (), opt.quiet);
|
||||||
gc_component_retrieve_options (-1);
|
gc_component_retrieve_options (-1);
|
||||||
if (gc_apply_profile (fname))
|
if (gc_apply_profile (fname))
|
||||||
gpgconf_failure (0);
|
gpgconf_failure (0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user