From 766a0cfb46672f63a68d34df0a43e5310aa94307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Sun, 13 Nov 2022 21:51:11 +0100 Subject: [PATCH] Fixed SASL auth with cyrus-sasl-2.1.28 Resolves: rhbz#2140596 --- sendmail-8.17.1-cyrus-sasl-2.1.28-fix.patch | 23 +++++++++++++++++++++ sendmail.spec | 9 +++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 sendmail-8.17.1-cyrus-sasl-2.1.28-fix.patch diff --git a/sendmail-8.17.1-cyrus-sasl-2.1.28-fix.patch b/sendmail-8.17.1-cyrus-sasl-2.1.28-fix.patch new file mode 100644 index 0000000..3fb5b76 --- /dev/null +++ b/sendmail-8.17.1-cyrus-sasl-2.1.28-fix.patch @@ -0,0 +1,23 @@ +diff --git a/sendmail/sendmail.h b/sendmail/sendmail.h +index 9e34dd9..e020d6e 100644 +--- a/sendmail/sendmail.h ++++ b/sendmail/sendmail.h +@@ -756,7 +756,7 @@ extern bool filesys_free __P((long)); + # define SASL_IS_AUTH 2 /* authenticated */ + + /* SASL options */ +-# define SASL_AUTH_AUTH 0x1000 /* use auth= only if authenticated */ ++# define SASL_AUTH_AUTH 0x10000 /* use auth= only if authenticated */ + # if SASL >= 20101 + # define SASL_SEC_MASK SASL_SEC_MAXIMUM /* mask for SASL_SEC_* values: sasl.h */ + # else /* SASL >= 20101 */ +@@ -771,6 +771,9 @@ extern bool filesys_free __P((long)); + # endif /* SASL_SEC_NOPLAINTEXT & SASL_SEC_MASK) == 0 ... */ + # endif /* SASL >= 20101 */ + # define MAXOUTLEN 8192 /* length of output buffer, should be 2^n */ ++# if (SASL_AUTH_AUTH & SASL_SEC_MASK) != 0 ++# ERROR "change SASL_AUTH_AUTH notify sendmail.org!" ++# endif + + /* functions */ + extern char *intersect __P((char *, char *, SM_RPOOL_T *)); diff --git a/sendmail.spec b/sendmail.spec index 78ccf25..69dfe5d 100644 --- a/sendmail.spec +++ b/sendmail.spec @@ -29,7 +29,7 @@ Summary: A widely used Mail Transport Agent (MTA) Name: sendmail Version: 8.17.1 -Release: 6%{?dist} +Release: 7%{?dist} License: Sendmail URL: http://www.sendmail.org/ @@ -94,6 +94,8 @@ Patch23: sendmail-8.17.1-sasl2-in-etc.patch # upstream reserved option ID 0xe7 for testing of this new feature, #576643 Patch25: sendmail-8.17.1-qos.patch Patch26: sendmail-8.17.1-libmilter-socket-activation.patch +# upstream patch +Patch27: sendmail-8.17.1-cyrus-sasl-2.1.28-fix.patch BuildRequires: make BuildRequires: libdb-devel @@ -204,6 +206,7 @@ cp devtools/M4/UNIX/{,shared}library.m4 %patch23 -p1 -b .sasl2-in-etc %patch25 -p1 -b .qos %patch26 -p1 -b .libmilter-socket-activation +%patch27 -p1 -b .cyrus-sasl-2.1.28-fix for f in RELEASE_NOTES contrib/etrn.0; do iconv -f iso8859-1 -t utf8 -o ${f}{_,} && @@ -708,6 +711,10 @@ exit 0 %changelog +* Sun Nov 13 2022 Jaroslav Škarvada - 8.17.1-7 +- Fixed SASL auth with cyrus-sasl-2.1.28 + Resolves: rhbz#2140596 + * Sat Jul 23 2022 Fedora Release Engineering - 8.17.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild