From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id CBD926DE024A for ; Sat, 14 Oct 2017 11:08:58 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[AWL=0.011, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C59geI-1TrwA for ; Sat, 14 Oct 2017 11:08:56 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id A979F6DE01EA for ; Sat, 14 Oct 2017 11:08:56 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1e3Qny-0002T6-4W; Sat, 14 Oct 2017 14:04:58 -0400 Received: (nullmailer pid 31861 invoked by uid 1000); Sat, 14 Oct 2017 18:08:51 -0000 From: David Bremner To: Daniel Kahn Gillmor , Notmuch Mail Subject: Re: [PATCH v3 11/15] config: indexing defaults will be stored in the database. In-Reply-To: <20171010054916.23925-12-dkg@fifthhorseman.net> References: <20170915055359.24123-1-dkg@fifthhorseman.net> <20171010054916.23925-1-dkg@fifthhorseman.net> <20171010054916.23925-12-dkg@fifthhorseman.net> Date: Sat, 14 Oct 2017 15:08:51 -0300 Message-ID: <878tgdy53g.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Oct 2017 18:08:58 -0000 Daniel Kahn Gillmor 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