Package: release.debian.org Severity: normal Tags: jessie User: release.debian....@packages.debian.org Usertags: pu
Hi, I'd like to backport an LDAP-related patch for sendmail to jessie (#826120: the queuerunner may abort with an assertion if the connection to an LDAP server is lost). This was fixed upstream in 8.14.5. The patch was cherry-picked from RHEL 6: RHBA-2015:1299-3. The client port fix (fixed upstream in 8.15.1) also originates there. The bug reporter confirmed that the patch fixed his problems on jessie. Andreas
diff -Nru sendmail-8.14.4/debian/changelog sendmail-8.14.4/debian/changelog --- sendmail-8.14.4/debian/changelog 2014-10-02 19:52:52.000000000 +0200 +++ sendmail-8.14.4/debian/changelog 2016-06-06 15:06:26.000000000 +0200 @@ -1,3 +1,14 @@ +sendmail (8.14.4-8+deb8u1) jessie; urgency=medium + + * QA upload. + * Cherry-pick some patches from RHEL 6: RHBA-2015:1299-3 + * sendmail-8.14.4-client-port.patch: sendmail {client_port} not set + correctly on little endian machines (8.15.1). + * sendmail-8.14.4-ldap-fix.patch: do not abort with an assertion if the + connection to an LDAP server is lost (8.14.5). (Closes: #826120) + + -- Andreas Beckmann <a...@debian.org> Mon, 06 Jun 2016 15:06:18 +0200 + sendmail (8.14.4-8) unstable; urgency=medium * QA upload. diff -Nru sendmail-8.14.4/debian/gbp.conf sendmail-8.14.4/debian/gbp.conf --- sendmail-8.14.4/debian/gbp.conf 2014-10-02 19:52:52.000000000 +0200 +++ sendmail-8.14.4/debian/gbp.conf 2016-06-06 15:06:26.000000000 +0200 @@ -1,2 +1,3 @@ [DEFAULT] upstream-branch = upstream-tar-in-tar +debian-branch = jessie diff -Nru sendmail-8.14.4/debian/patches/sendmail-8.14.4-client-port.patch sendmail-8.14.4/debian/patches/sendmail-8.14.4-client-port.patch --- sendmail-8.14.4/debian/patches/sendmail-8.14.4-client-port.patch 1970-01-01 01:00:00.000000000 +0100 +++ sendmail-8.14.4/debian/patches/sendmail-8.14.4-client-port.patch 2016-06-06 15:06:26.000000000 +0200 @@ -0,0 +1,18 @@ +--- sendmail-8.14.4/sendmail/main.c.orig 2014-06-06 21:47:39.491335044 -0700 ++++ sendmail-8.14.4/sendmail/main.c 2014-06-06 22:00:29.902135894 -0700 +@@ -2607,13 +2607,13 @@ + #if NETINET + case AF_INET: + (void) sm_snprintf(pbuf, sizeof(pbuf), "%d", +- RealHostAddr.sin.sin_port); ++ ntohs(RealHostAddr.sin.sin_port)); + break; + #endif /* NETINET */ + #if NETINET6 + case AF_INET6: + (void) sm_snprintf(pbuf, sizeof(pbuf), "%d", +- RealHostAddr.sin6.sin6_port); ++ ntohs(RealHostAddr.sin6.sin6_port)); + break; + #endif /* NETINET6 */ + default: diff -Nru sendmail-8.14.4/debian/patches/sendmail-8.14.4-ldap-fix.patch sendmail-8.14.4/debian/patches/sendmail-8.14.4-ldap-fix.patch --- sendmail-8.14.4/debian/patches/sendmail-8.14.4-ldap-fix.patch 1970-01-01 01:00:00.000000000 +0100 +++ sendmail-8.14.4/debian/patches/sendmail-8.14.4-ldap-fix.patch 2016-06-06 15:06:26.000000000 +0200 @@ -0,0 +1,36 @@ +diff -up sendmail-8.14.4/libsm/ldap.c.orig sendmail-8.14.4/libsm/ldap.c +--- sendmail-8.14.4/libsm/ldap.c.orig 2009-06-20 00:02:26.000000000 +0200 ++++ sendmail-8.14.4/libsm/ldap.c 2012-07-04 11:26:16.583960000 +0200 +@@ -1098,10 +1098,8 @@ sm_ldap_results(lmap, msgid, flags, deli + + if (ret == 0) + save_errno = ETIMEDOUT; +- else ++ else if (ret == LDAP_RES_SEARCH_RESULT) + { +- int rc; +- + /* + ** We may have gotten an LDAP_RES_SEARCH_RESULT response + ** with an error inside it, so we have to extract that +@@ -1109,10 +1107,16 @@ sm_ldap_results(lmap, msgid, flags, deli + ** to an LDAP proxy whose backend has gone down. + */ + +- save_errno = ldap_parse_result(lmap->ldap_ld, lmap->ldap_res, +- &rc, NULL, NULL, NULL, NULL, 0); +- if (save_errno == LDAP_SUCCESS) +- save_errno = rc; ++ if (lmap->ldap_res == NULL) ++ save_errno = LDAP_UNAVAILABLE; ++ else ++ { ++ int rc; ++ save_errno = ldap_parse_result(lmap->ldap_ld, lmap->ldap_res, ++ &rc, NULL, NULL, NULL, NULL, 0); ++ if (save_errno == LDAP_SUCCESS) ++ save_errno = rc; ++ } + } + if (save_errno != LDAP_SUCCESS) + { diff -Nru sendmail-8.14.4/debian/patches/series-quilt sendmail-8.14.4/debian/patches/series-quilt --- sendmail-8.14.4/debian/patches/series-quilt 2014-10-02 19:52:52.000000000 +0200 +++ sendmail-8.14.4/debian/patches/series-quilt 2016-06-06 15:06:26.000000000 +0200 @@ -23,3 +23,5 @@ libmilter-assert.patch close_on_exec.patch hyphenation.patch +sendmail-8.14.4-client-port.patch +sendmail-8.14.4-ldap-fix.patch