diff options
author | Marcus Brinkmann <mb@g10code.com> | 2008-08-06 13:48:23 +0200 |
---|---|---|
committer | Marcus Brinkmann <mb@g10code.com> | 2008-08-06 13:48:23 +0200 |
commit | f923f576e124c7887b9d7759673e848e3c2f7f33 (patch) | |
tree | 34ed1fcc35e285e3a68744eb941eee5a0c27c8f8 /tools/gpgconf-comp.c | |
parent | Fix !EROFS bug. (diff) | |
download | gnupg2-f923f576e124c7887b9d7759673e848e3c2f7f33.tar.xz gnupg2-f923f576e124c7887b9d7759673e848e3c2f7f33.zip |
Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (retrieve_options_from_file): Transfer the
NO_CHANGE flag from the file name option to the list option.
Diffstat (limited to 'tools/gpgconf-comp.c')
-rw-r--r-- | tools/gpgconf-comp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c index 28ee5a016..25d441508 100644 --- a/tools/gpgconf-comp.c +++ b/tools/gpgconf-comp.c @@ -165,7 +165,7 @@ static struct /* The option name for the configuration filename of this backend. This must be an absolute filename. It can be an option from a different backend (but then ordering of the options might - matter). */ + matter). Note: This must be unique among all components. */ const char *option_config_filename; /* If this is a file backend rather than a program backend, then @@ -1949,6 +1949,7 @@ static void retrieve_options_from_file (gc_component_t component, gc_backend_t backend) { gc_option_t *list_option; + gc_option_t *config_option; char *list_filename; FILE *list_file; char *line = NULL; @@ -2008,6 +2009,12 @@ retrieve_options_from_file (gc_component_t component, gc_backend_t backend) list_option->active = 1; list_option->value = list; + /* Fix up the read-only flag. */ + config_option = find_option + (component, gc_backend[backend].option_config_filename, GC_BACKEND_ANY); + if (config_option->flags & GC_OPT_FLAG_NO_CHANGE) + list_option->flags |= GC_OPT_FLAG_NO_CHANGE; + if (list_file && fclose (list_file) && ferror (list_file)) gc_error (1, errno, "error closing %s", list_filename); xfree (line); |