From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iCTWCRhRFF9XBAAA0tVLHw (envelope-from ) for ; Sun, 19 Jul 2020 13:56:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id qJOqBRhRFF/faAAA1q6Kng (envelope-from ) for ; Sun, 19 Jul 2020 13:56:40 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BD33494077C for ; Sun, 19 Jul 2020 13:56:38 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id CCBC11FAE6; Sun, 19 Jul 2020 09:56:31 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id AE18A1FA5A for ; Sun, 19 Jul 2020 09:56:28 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 8DA09609DB; Sun, 19 Jul 2020 09:56:28 -0400 (EDT) Received: (nullmailer pid 179063 invoked by uid 1000); Sun, 19 Jul 2020 13:56:26 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: Re: notmuch_database_index_file with relative paths. In-Reply-To: <87sgdqo0rz.fsf@tethera.net> References: <87sgdqo0rz.fsf@tethera.net> Date: Sun, 19 Jul 2020 10:56:26 -0300 Message-ID: <87r1t7mwvp.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: A2DPHW7KSXB73YBEXNAOWIABSOPARXQP X-Message-ID-Hash: A2DPHW7KSXB73YBEXNAOWIABSOPARXQP X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 0.53 X-TUID: 77tYs98qmu76 David Bremner writes: > This is a sanity check on a bug I stumbled upon while writing unit tests > for error handling in the library. > > The attached test script (meant to be run from within the test subdir of > a built source tree) demonstrates trying (and failing) to index a > relative path. > > Am I missing something here, or does _notmuch_message_file_open_ctx (or > something that calls it) need to check for absolute paths and prepend > the mail root if not? > > I'm just a bit surprised that no-one hit this before. There is a proposed fix at id:20200719100539.917215-1-david@tethera.net