aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-06-19 06:06:50 +0000
committerWerner Koch <[email protected]>2020-03-30 15:38:26 +0000
commit76d2a02dfe8f923c0d4d8ef86ca71a9ac47c243d (patch)
treef94b551e6112ff7b8402079727e03526849a6a0a
parentagent: Print an error if gpg-protect reads the extended key format. (diff)
downloadgnupg-76d2a02dfe8f923c0d4d8ef86ca71a9ac47c243d.tar.gz
gnupg-76d2a02dfe8f923c0d4d8ef86ca71a9ac47c243d.zip
wks: Take name of sendmail from configure.
* configure.ac (NAME_OF_SENDMAIL): New ac_define. * tools/send-mail.c (run_sendmail): Use it. -- We used to ac_subst the SENDMAIL in the old keyserver via mail script. We can reuse this to avoid a fixed name for sendmail in the send-mail.c helper. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 08147f8bbdca40c98c2a094fa48fab15b8339c80) GnuPG-bug-id: 4886
-rw-r--r--configure.ac2
-rw-r--r--tools/send-mail.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 32e42cbc7..25125a5f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1220,6 +1220,8 @@ elif test x"$with_mailprog" != xno ; then
AC_SUBST(SENDMAIL,$with_mailprog)
AC_MSG_RESULT($with_mailprog)
fi
+AC_DEFINE_UNQUOTED(NAME_OF_SENDMAIL,"$SENDMAIL",
+ [Tool with sendmail -t interface])
#
diff --git a/tools/send-mail.c b/tools/send-mail.c
index 9f07c7ac5..6492c43c1 100644
--- a/tools/send-mail.c
+++ b/tools/send-mail.c
@@ -33,7 +33,7 @@ static gpg_error_t
run_sendmail (estream_t data)
{
gpg_error_t err;
- const char pgmname[] = "/usr/lib/sendmail";
+ const char pgmname[] = NAME_OF_SENDMAIL;
const char *argv[3];
argv[0] = "-oi";