unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Tomi Ollila <tomi.ollila@iki.fi>, Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH 7/9] add a gpg_path value for notmuch_database_t
Date: Fri, 11 Dec 2015 17:25:15 -0500	[thread overview]
Message-ID: <87mvtgfws4.fsf@alice.fifthhorseman.net> (raw)
In-Reply-To: <m21tas7ifa.fsf@guru.guru-group.fi>

On Fri 2015-12-11 17:02:33 -0500, Tomi Ollila wrote:
> The above code finds gpg/gpg2 (when called w/ these args) from
> _CS_PATH (seems to be /bin:/usr/bin by default in linux (tried to
> look how this set in *BSD -- initially it looks like /usr/local/bin
> not included but... maybe we let them to complain if this is the case
> ... :/)
> ... anyway, the full found path is not set anywhere -- how is it found
> when used (exec*p() using $PATH? :O)

Hm, according to exec(3):

   Special semantics for execlp() and execvp()
       The execlp(), execvp(), and execvpe() functions duplicate the
       actions of the shell in searching for an executable file if the
       specified filename does not contain a slash (/) character.  The
       file is sought in the colon-separated list of directory pathnames
       specified in the PATH environment variable.  If this variable
       isn't defined, the path list defaults to the current directory
       followed by the list of directories returned by
       confstr(_CS_PATH).  (This confstr(3) call typically returns the
       value "/bin:/usr/bin".)

So this code probably also ought to be searching $PATH as well.  yuck.
You'd think there would be a commonly-available function for doing this
specific check without having to actually try to exec() something.

         --dkg

  reply	other threads:[~2015-12-11 22:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10  3:39 allow indexing cleartext of encrypted messages Daniel Kahn Gillmor
2015-12-10  3:39 ` [PATCH 1/9] reorganize indexing of multipart/signed and multipart/encrypted Daniel Kahn Gillmor
2015-12-11 21:53   ` Tomi Ollila
2015-12-10  3:39 ` [PATCH 2/9] Add a lazily-initialized crypto context to notmuch_database_t Daniel Kahn Gillmor
2015-12-11 14:03   ` David Bremner
2015-12-11 14:36     ` Daniel Kahn Gillmor
2015-12-11 21:55   ` Tomi Ollila
2015-12-10  3:39 ` [PATCH 3/9] index encrypted parts when the message is flagged appropriately Daniel Kahn Gillmor
2015-12-10  3:39 ` [PATCH 4/9] Add new n_d_add_message_try_decrypt (analogous to to n_d_add_message) Daniel Kahn Gillmor
2015-12-10  3:39 ` [PATCH 5/9] Enable cleartext indexing in python bindings Daniel Kahn Gillmor
2015-12-10  3:39 ` [PATCH 6/9] search for a reasonable gpg implementation Daniel Kahn Gillmor
2015-12-11 21:56   ` Tomi Ollila
2015-12-11 22:18     ` J. Lewis Muir
2015-12-11 22:22       ` Daniel Kahn Gillmor
2015-12-10  3:39 ` [PATCH 7/9] add a gpg_path value for notmuch_database_t Daniel Kahn Gillmor
2015-12-11 22:02   ` Tomi Ollila
2015-12-11 22:25     ` Daniel Kahn Gillmor [this message]
2015-12-12 23:25       ` Tomi Ollila
2015-12-13  1:20       ` David Bremner
2015-12-13 11:00         ` Tomi Ollila
2015-12-13 11:17           ` Tomi Ollila
2016-01-15 19:11             ` Daniel Kahn Gillmor
2015-12-11 22:35   ` J. Lewis Muir
2015-12-12  4:10     ` Daniel Kahn Gillmor
2015-12-10  3:39 ` [PATCH 8/9] add --try-decrypt to notmuch insert Daniel Kahn Gillmor
2015-12-10  3:39 ` [PATCH 9/9] add --try-decrypt to notmuch new Daniel Kahn Gillmor
2015-12-11 15:34 ` allow indexing cleartext of encrypted messages Daniel Kahn Gillmor
2015-12-11 22:05   ` Tomi Ollila

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvtgfws4.fsf@alice.fifthhorseman.net \
    --to=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).