]> git.cworth.org Git - notmuch/commit
configure: fix out of tree build; check unsafe characters in srcdir
authorTomi Ollila <tomi.ollila@iki.fi>
Mon, 26 Aug 2019 17:03:46 +0000 (20:03 +0300)
committerDavid Bremner <david@tethera.net>
Thu, 29 Aug 2019 17:32:54 +0000 (14:32 -0300)
commite13862f127394fd4addc5d2cf604b3af399c8377
tree3130b8b7b29336dacf30c4cf44369d2c14328705
parent17806ecc955ce0375146ea1df51eae061a72bef8
configure: fix out of tree build; check unsafe characters in srcdir

While check for GMime session key extraction support... was made
out of tree build compatible, related (and some unrelated) unsafe
characters are now checked in notmuch source directory path.

The known unsafe characters in NOTMUCH_SRCDIR are:

- Single quote (') -- NOTMUCH_SRCDIR='${NOTMUCH_SRCDIR}'
  is written to sh.config in configure line 1328.

- Double quote (") -- configure line 521 *now* writes "$srcdir"
  into generated c source file ($NOTMUCH_SRCDIR includes $srcdir).

- Backslash (\) could also be problematic in configure line 521.

- The added $ and ` are potentially unsafe -- inside double quotes
  in shell script those have special meaning.

  Other characters don't expand inside double quoted strings.
configure