diff options
Diffstat (limited to 'meta-networking/recipes-support/libesmtp/libesmtp')
3 files changed, 85 insertions, 67 deletions
diff --git a/meta-networking/recipes-support/libesmtp/libesmtp/0001-Add-build-option-for-NTLM-support.patch b/meta-networking/recipes-support/libesmtp/libesmtp/0001-Add-build-option-for-NTLM-support.patch new file mode 100644 index 0000000000..dbdd644830 --- /dev/null +++ b/meta-networking/recipes-support/libesmtp/libesmtp/0001-Add-build-option-for-NTLM-support.patch @@ -0,0 +1,85 @@ +From 1c304e7886a08fb56485e41614ff3f8685afb59d Mon Sep 17 00:00:00 2001 +From: Jiaqing Zhao <jiaqing.zhao@intel.com> +Date: Tue, 8 Mar 2022 15:05:32 +0000 +Subject: [PATCH] Add build option for NTLM support + +Currently, NTLM plugin is built by default when openssl is available +and STARTTLS is enabled. But in libesmtp 1.0.6, there is a separate +build option. This commits adds the 'ntlm' option back. It's also +disabled by default. + +Like 1.0.6, it will check openssl MD4 algorithm support as MD4 is +insecure and modern systems may drop MD4 support. + +Upstream-Status: Backport [https://github.com/libesmtp/libESMTP/commit/1c304e7886a08fb56485e41614ff3f8685afb59d] +Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com> +--- + meson.build | 13 ++++++++++--- + meson_options.txt | 1 + + ntlm/meson.build | 2 +- + 3 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/meson.build b/meson.build +index 11d6ed8..d2a0e06 100644 +--- a/meson.build ++++ b/meson.build +@@ -61,6 +61,7 @@ add_project_arguments(cc.get_supported_arguments(cflags), language: 'c') + ################################################################################ + dldep = cc.find_library('dl') + ssldep = dependency('openssl', version : '>=1.1.0', required : get_option('tls')) ++ntlmdep = dependency('openssl', version : '>=1.1.0', required : get_option('ntlm')) + threaddep = dependency('threads', required : get_option('pthreads')) + + #XXX add test for libbind9.so +@@ -69,6 +70,7 @@ lwresdep = cc.find_library('lwres', required : get_option('lwres')) + deps = [ + dldep, + ssldep, ++ ntlmdep, + threaddep, + lwresdep, + ] +@@ -237,8 +239,12 @@ include_dir = include_directories('.') + subdir('login') + subdir('plain') + subdir('crammd5') +-if ssldep.found() +- subdir('ntlm') ++if ntlmdep.found() ++ if cc.has_header('openssl/md4.h') and cc.has_function('MD4_Init', dependencies : ntlmdep) ++ subdir('ntlm') ++ else ++ error('MD4 is not supported in current openssl, unable to build NTLM plugin') ++ endif + endif + + ################################################################################ +@@ -264,4 +270,5 @@ summary({'current:revision:age': libesmtp_cra, + 'STARTTLS': ssldep.found(), + 'CHUNKING': get_option('bdat'), + 'ETRN': get_option('etrn'), +- 'XUSR': get_option('xusr')}) ++ 'XUSR': get_option('xusr'), ++ 'NTLM': ntlmdep.found()}) +diff --git a/meson_options.txt b/meson_options.txt +index 8375e2c..158f38f 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -5,3 +5,4 @@ option('lwres', type : 'feature', value : 'disabled', description : 'use lwres l + option('bdat', type : 'boolean', value : 'true', description : 'enable SMTP BDAT extension') + option('etrn', type : 'boolean', value : 'true', description : 'enable SMTP ETRN extension') + option('xusr', type : 'boolean', value : 'true', description : 'enable sendmail XUSR extension') ++option('ntlm', type : 'feature', value : 'disabled', description : 'build with support for NTLM authentication') +diff --git a/ntlm/meson.build b/ntlm/meson.build +index e0eef58..11d7f58 100644 +--- a/ntlm/meson.build ++++ b/ntlm/meson.build +@@ -5,7 +5,7 @@ sasl_ntlm_sources = [ + 'ntlmstruct.c', + ] + +-ntlm_deps = [ ssldep, ] ++ntlm_deps = [ ntlmdep, ] + + sasl_ntlm = shared_module('ntlm', sasl_ntlm_sources, + name_prefix : 'sasl-', diff --git a/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch b/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch deleted file mode 100644 index 90c4ce75e1..0000000000 --- a/meta-networking/recipes-support/libesmtp/libesmtp/include-topdir.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -Nurp libesmtp-1.0.6.org/crammd5/Makefile.am libesmtp-1.0.6/crammd5/Makefile.am ---- libesmtp-1.0.6.org/crammd5/Makefile.am 2010-08-08 23:45:57.000000000 +0800 -+++ libesmtp-1.0.6/crammd5/Makefile.am 2014-11-17 11:17:21.663624295 +0800 -@@ -2,7 +2,7 @@ - - libdir = @plugindir@ - --INCLUDES = -I@srcdir@ -+INCLUDES = -I@srcdir@ -I@srcdir@/../ - AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@ - - lib_LTLIBRARIES = sasl-cram-md5.la -diff -Nurp libesmtp-1.0.6.org/login/Makefile.am libesmtp-1.0.6/login/Makefile.am ---- libesmtp-1.0.6.org/login/Makefile.am 2010-08-08 23:45:56.000000000 +0800 -+++ libesmtp-1.0.6/login/Makefile.am 2014-11-17 11:17:54.339623018 +0800 -@@ -2,7 +2,7 @@ - - libdir = @plugindir@ - --INCLUDES = -I@srcdir@ -+INCLUDES = -I@srcdir@ -I@srcdir@/../ - - lib_LTLIBRARIES = sasl-login.la - AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@ -diff -Nurp libesmtp-1.0.6.org/ntlm/Makefile.am libesmtp-1.0.6/ntlm/Makefile.am ---- libesmtp-1.0.6.org/ntlm/Makefile.am 2010-08-08 23:45:56.000000000 +0800 -+++ libesmtp-1.0.6/ntlm/Makefile.am 2014-11-17 11:18:10.551622385 +0800 -@@ -2,7 +2,7 @@ - - libdir = @plugindir@ - --INCLUDES = -I@srcdir@ -+INCLUDES = -I@srcdir@ -I@srcdir@/../ - AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@ - - lib_LTLIBRARIES = sasl-ntlm.la -diff -Nurp libesmtp-1.0.6.org/plain/Makefile.am libesmtp-1.0.6/plain/Makefile.am ---- libesmtp-1.0.6.org/plain/Makefile.am 2010-08-08 23:45:54.000000000 +0800 -+++ libesmtp-1.0.6/plain/Makefile.am 2014-11-17 11:18:33.355621494 +0800 -@@ -2,7 +2,7 @@ - - libdir = @plugindir@ - --INCLUDES = -I@srcdir@ -+INCLUDES = -I@srcdir@ -I@srcdir@/../ - AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@ - - lib_LTLIBRARIES = sasl-plain.la diff --git a/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch b/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch deleted file mode 100644 index d0d203eadb..0000000000 --- a/meta-networking/recipes-support/libesmtp/libesmtp/snprintf.patch +++ /dev/null @@ -1,19 +0,0 @@ -Use HAVE_WORKING_SNPRINTF to check for snprintf() - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: libesmtp-1.0.6/missing.h -=================================================================== ---- libesmtp-1.0.6.orig/missing.h -+++ libesmtp-1.0.6/missing.h -@@ -43,7 +43,7 @@ int strncasecmp (const char *a, const ch - void *memrchr (const void *a, int c, size_t len); - #endif - --#ifndef HAVE_SNPRINTF -+#ifndef HAVE_WORKING_SNPRINTF - #include <sys/types.h> - int snprintf(char *s, size_t n, const char *format, ...); - #endif |