From 55eef71dbed7b98dc5b1a3750d10c8cb0df2cff2 Mon Sep 17 00:00:00 2001 From: Alexander Kulbartsch Date: Wed, 12 Oct 2022 18:24:07 +0200 Subject: wkd: gpg-wks-client --send checks if build with sendmail support * tools/gpg-wks-client.c (main): Return GPG_ERR_NOT_IMPLEMENTED if gnupg was build without sendmail support. (NAME_OF_SENDMAIL=="") --- tools/gpg-wks-client.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/gpg-wks-client.c b/tools/gpg-wks-client.c index a30457e75..f77df8813 100644 --- a/tools/gpg-wks-client.c +++ b/tools/gpg-wks-client.c @@ -306,6 +306,14 @@ main (int argc, char **argv) cmd = parse_arguments (&pargs, opts); gpgrt_argparse (NULL, &pargs, NULL); + /* Check if gpg is build with sendmail support */ + if (opt.use_sendmail && !NAME_OF_SENDMAIL[0]) + { + err = gpg_error (GPG_ERR_NOT_IMPLEMENTED); + log_error ("sending mail is not supported in this build: %s\n", + gpg_strerror (err)); + } + if (log_get_errorcount (0)) exit (2); -- cgit v1.2.3