Re: [PATCH 7/9] add a gpg_path value for notmuch_database_t

2016-01-15 Thread Daniel Kahn Gillmor
On Sun 2015-12-13 06:17:07 -0500, Tomi Ollila wrote: > Actually now that I sent this mail it kept rolling on my mind... If anyone > else than me (and libgpgme?) thinks that '.' should not be in search path > we could do fwiw, i agree that . should *not* be in the search path. > if (getenv("PATH")

Re: [PATCH 7/9] add a gpg_path value for notmuch_database_t

2015-12-13 Thread Tomi Ollila
On Sun, Dec 13 2015, Tomi Ollila wrote: > On Sun, Dec 13 2015, David Bremner wrote: > >> >> Without weighing in on the advisibility of searching for gpg in $PATH, >> there is a glib function g_find_program_in_path. We're already linking >> to glib (because of gmime mainly, but it's used other pl

Re: [PATCH 7/9] add a gpg_path value for notmuch_database_t

2015-12-13 Thread Tomi Ollila
On Sun, Dec 13 2015, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> 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

Re: [PATCH 7/9] add a gpg_path value for notmuch_database_t

2015-12-12 Thread David Bremner
Daniel Kahn Gillmor writes: > 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 i

Re: [PATCH 7/9] add a gpg_path value for notmuch_database_t

2015-12-12 Thread Tomi Ollila
On Sat, Dec 12 2015, Daniel Kahn Gillmor wrote: > 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 /us

Re: [PATCH 7/9] add a gpg_path value for notmuch_database_t

2015-12-11 Thread Daniel Kahn Gillmor
On Fri 2015-12-11 17:35:58 -0500, J. Lewis Muir wrote: > I guess I still don't get it. Why even have a _find_in_path function? > Why not just expect the gpg executable path to have already been > specified somehow (e.g. Notmuch configuration file, build-time constant, > or environment variable)?

Re: [PATCH 7/9] add a gpg_path value for notmuch_database_t

2015-12-11 Thread J. Lewis Muir
On 12/9/15 9:39 PM, Daniel Kahn Gillmor wrote: > +static notmuch_bool_t > +_find_in_path(const char* path) > +{ > +char *c = NULL, *save = NULL, *tok; > +size_t n; > +int dfd = -1; > +notmuch_bool_t ret = FALSE; > + > +n = confstr(_CS_PATH, NULL, 0); > +c = (char*)talloc_siz

Re: [PATCH 7/9] add a gpg_path value for notmuch_database_t

2015-12-11 Thread Daniel Kahn Gillmor
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

Re: [PATCH 7/9] add a gpg_path value for notmuch_database_t

2015-12-11 Thread Tomi Ollila
On Thu, Dec 10 2015, Daniel Kahn Gillmor wrote: > Exposing this to the user of the library lets the user point to > arbitrary gpg executables when trying to decrypt. > --- > lib/database-private.h | 3 ++ > lib/database.cc| 93 > +++--- > lib

[PATCH 7/9] add a gpg_path value for notmuch_database_t

2015-12-09 Thread Daniel Kahn Gillmor
Exposing this to the user of the library lets the user point to arbitrary gpg executables when trying to decrypt. --- lib/database-private.h | 3 ++ lib/database.cc| 93 +++--- lib/notmuch.h | 31 + 3 files changed, 115