[PATCH v3 11/15] config: indexing defaults will be stored in the database.

David Bremner david at tethera.net
Sat Oct 14 11:08:51 PDT 2017


Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:


>  static int
>  _print_db_config(notmuch_config_t *config, const char *name)
> @@ -859,6 +860,8 @@ notmuch_config_command_get (notmuch_config_t *config, char *item)
>  		notmuch_built_with (item + strlen (BUILT_WITH_PREFIX)) ? "true" : "false");
>      } else if (STRNCMP_LITERAL (item, QUERY_PREFIX) == 0) {
>  	return _print_db_config (config, item);
> +    } else if (STRNCMP_LITERAL (item, INDEX_PREFIX) == 0) {
> +	return _print_db_config (config, item);
>      } else {
>  	char **value;

I wonder if we should sanity check the value of 'item' more here. With
'query.', it makes sense to get or set anything, since it's just the
name of a stored query. With 'index.', presumably only certain
parameters make sense. As a motivating example, consider someone who
sets

$ notmuch config index.try_decrypt true

then changes their mind

$ notmuch config index.try-decrypt false

They _think_ they are safe, but notmuch is silently going to continue
decrypting their mail


More information about the notmuch mailing list