mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpgconf: Support reading global options (part 1).
* tools/gpgconf.c (main): Set the config directories. * tools/gpgconf-comp.c (gc_backend): Change the name of the config files. (struct gc_option): Add new field 'attr'. (retrieve_options_from_program): Rewrite to use gpgrt_argparser. -- We need to do larger changes to gpgconf so that it is possible to get also global config options and their attributes. The old code worked along its own list of option and used a generic option file parser. This has no support for global config files. We now use gnupgt_argparser so that we to do exactly the same as the component does and thus delivers the actual option values as seen by the component. This is just a first step and we need to change more things. Signed-off-by: Werner Koch <wk@gnupg.org> This is a backport from master (2.3).
This commit is contained in:
parent
f0d034ebf4
commit
7397872445
2 changed files with 190 additions and 111 deletions
|
@ -678,6 +678,12 @@ main (int argc, char **argv)
|
|||
|
||||
fname = argc ? *argv : NULL;
|
||||
|
||||
/* Set the configuraton directories for use by gpgrt_argparser. We
|
||||
* don't have a configuration file for this program but we have code
|
||||
* which reads the component's config files. */
|
||||
gnupg_set_confdir (GNUPG_CONFDIR_SYS, gnupg_sysconfdir ());
|
||||
gnupg_set_confdir (GNUPG_CONFDIR_USER, gnupg_homedir ());
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case aListComponents:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue