From: Tomi Ollila Date: Fri, 12 Aug 2016 20:01:36 +0000 (+0300) Subject: Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=319c61bea6849ed6c3770d9a68ddd77194243075;p=notmuch-archives.git Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH --- diff --git a/c1/1f04c699ac697a2a8a1a4544f0ed7e036f6021 b/c1/1f04c699ac697a2a8a1a4544f0ed7e036f6021 new file mode 100644 index 000000000..4fd339c76 --- /dev/null +++ b/c1/1f04c699ac697a2a8a1a4544f0ed7e036f6021 @@ -0,0 +1,95 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id A03BC6DE0C7E + for ; Fri, 12 Aug 2016 13:02:12 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.562 +X-Spam-Level: +X-Spam-Status: No, score=0.562 tagged_above=-999 required=5 tests=[AWL=-0.090, + SPF_NEUTRAL=0.652] 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 V2gyhCjxCn0J for ; + Fri, 12 Aug 2016 13:02:04 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id D59DA6DE0C79 + for ; Fri, 12 Aug 2016 13:02:03 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 1A2C210007F; + Fri, 12 Aug 2016 23:01:37 +0300 (EEST) +From: Tomi Ollila +To: Daniel Kahn Gillmor , + David Bremner , Notmuch Mail +Subject: Re: [PATCH v4 01/16] add util/search-path.{c, + h} to test for executables in $PATH +In-Reply-To: <87mvkhrfjl.fsf@alice.fifthhorseman.net> +References: <1467970047-8013-1-git-send-email-dkg@fifthhorseman.net> + <1467970047-8013-2-git-send-email-dkg@fifthhorseman.net> + <878tw2r0vf.fsf@maritornes.cs.unb.ca> + <87k2fmse5h.fsf@alice.fifthhorseman.net> + <87y442phbm.fsf@maritornes.cs.unb.ca> + <87mvkhrfjl.fsf@alice.fifthhorseman.net> +User-Agent: Notmuch/0.22+61~geeecb9e (https://notmuchmail.org) Emacs/24.5.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Fri, 12 Aug 2016 20:02:12 -0000 + +On Fri, Aug 12 2016, Daniel Kahn Gillmor wrote: + +> On Fri 2016-08-12 03:38:53 -0400, David Bremner wrote: +>> Daniel Kahn Gillmor writes: +>> +>>>> Should we distinguish between relative and absolute paths here? I can't +>>>> think of any security implications, but I'm wondering if a relative path +>>>> is likely just a user error. +>>> +>>> I don't think a relative path is necessarily a user error. I certainly +>>> use relative paths myself from time to time. +>> +>> As configuration values? That seems quite fragile, since it depends on +>> the current working directory when notmuch is run. +> +> rarely! but sometimes i do it because i'm testing things in strange +> ways, and it can be a bit frustrating to have a tool second-guess me +> when it seems like i ought to be able to drop the same string i'm using +> on the command line into the configuration. +> +> I don't feel strongly, though. if you want to say that bare words found +> in the $PATH and absolute filenames (starting with /) are fine in the +> notmuch config but relative paths are not, i'd be ok with that :) + +>From consistency point of view, current patch not checking it being +absolute might prevail -- I don't see database.path being checked for +being absolute... + +The probability for user error is pretty small there -- if there is +typo/thinko there things usually just starts failing. Security is +easier to break elsewhere than here (e.g. borken PATH...) + +I'd keep the current implementation of test_for_executable()... + +Tomi + +> +> --dkg