[Pkg-cyrus-sasl2-commits] [cyrus-sasl2] 03/06: Add fix for auth_rimap infinite loop (hang) when IMAP server closes connection (Closes: #815208)

Ondřej Surý ondrej at debian.org
Fri Apr 15 12:35:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

ondrej pushed a commit to branch master
in repository cyrus-sasl2.

commit e0cc18b67d158d98a9200f53f39252258fbc36c5
Author: Ondřej Surý <ondrej at sury.org>
Date:   Thu Mar 24 11:42:04 2016 +0100

    Add fix for auth_rimap infinite loop (hang) when IMAP server closes connection (Closes: #815208)
    
    Also reformat patches using gbp pq import && export
---
 ...0001-Make-the-libsasl2-symbols-versioned.patch} |  42 +++++---
 ...db2-instead-of-.-sasldb-in-the-testsuite.patch} |  20 ++--
 ...saslauthd.conf-location-in-documentation.patch} |  19 +++-
 ...nverter-2-in-sbin_PROGRAMS-and-set-defau.patch} |  27 +++--
 ...s.patch => 0005-Fixes-in-library-mutexes.patch} |  19 +++-
 ...-with-libsasldb.a-instead-of-libsasldb.al.patch |  23 ++++
 .../0007-Enable-autoconf-maintainer-mode.patch     |  22 ++++
 .../0008-Add-libtool-to-saslauthd-autoconf.patch   |  21 ++++
 ...N_SOURCE-in-auth_shadow.c-to-get-proper-.patch} |  20 +++-
 debian/patches/0009_sasldb_al.patch                |  14 ---
 ...erwrite-PIC-objects-with-non-PIC-variant.patch} |  24 +++--
 debian/patches/0010_maintainer_mode.patch          |  13 ---
 .../0011-Look-for-generic-Berkeley-DB-first.patch  |  22 ++++
 .../patches/0011_saslauthd_ac_prog_libtool.patch   |  12 ---
 ...ired-libraries-when-ld-as-needed-is-used.patch} |  26 +++--
 ...atch => 0013-Drop-krb5support-dependency.patch} |  17 ++-
 ...es.patch => 0014-Several-autotools-fixes.patch} | 119 ++++++++++++---------
 debian/patches/0015-LDAP-fixes.patch               |  22 ++++
 ...6-Don-t-use-la-files-for-opening-plugins.patch} |  19 +++-
 ...se-R-when-searching-for-SQLite-libraries.patch} |  15 ++-
 debian/patches/0017_db4.8.patch                    |  13 ---
 ...-Revert-1.103-revision-to-unbreak-GSSAPI.patch} |  17 ++-
 debian/patches/0019-Fix-segfault-in-GSSAPI.patch   |  35 ++++++
 .../patches/0020-Fix-dovecot-authentication.patch  |  34 ++++++
 .../patches/0021-Temporary-multiarch-fixes.patch   |  36 +++++++
 ...e-to-LDAP_SASLAUTHD-file-to-the-saslauth.patch} |  24 ++++-
 ...ap_logout.patch => 0023-Send-IMAP-logout.patch} |  17 ++-
 ...ix-canonuser-ldapdb-garbage-in-out-buffer.patch |  21 ++++
 ... 0025-Fix-keytab-option-for-MIT-Kerberos.patch} |  66 ++++++++----
 ...rver-creds-when-they-are-no-longer-needed.patch |  26 +++++
 .../0027-Include-sys-types.h-in-sasl.h.patch       |  22 ++++
 ...patch => 0028-Fix-typo-in-debugging-logs.patch} |  21 ++--
 ...atch => 0029-Revert-upstream-soname-bump.patch} |  41 ++++---
 debian/patches/0029_ldap_fixes.patch               |  11 --
 ...Fix-return-SASL_FAIL-in-void-sasl_dispose.patch |  22 ++++
 ...atch => 0031-properly-create-libsasl2.pc.patch} |  40 ++++---
 ...-CAPABILITY-lines-in-IMAP-login-reply-v4.patch} |  11 +-
 ...h => 0033-Fix-early-hangup-in-ipc_unix.c.patch} |  19 ++--
 debian/patches/0033_fix_segfault_in_GSSAPI.patch   |  24 -----
 ...andle-NULL-returns-from-glibc-2.17-crypt.patch} |  31 ++++--
 .../patches/0034_fix_dovecot_authentication.patch  |  23 ----
 ...map-infinite-loop-hang-when-IMAP-server-c.patch |  31 ++++++
 .../patches/0035_temporary_multiarch_fixes.patch   |  22 ----
 ...ix_canonuser_ldapdb_garbage_in_out_buffer.patch |  10 --
 debian/patches/0042_release_server_creds.patch     |  18 ----
 debian/patches/0043_types_h.patch                  |  14 ---
 debian/patches/0046_fix_void_return.patch          |  13 ---
 debian/patches/series                              |  69 ++++++------
 48 files changed, 830 insertions(+), 417 deletions(-)

diff --git a/debian/patches/0001_versioned_symbols.patch b/debian/patches/0001-Make-the-libsasl2-symbols-versioned.patch
similarity index 55%
rename from debian/patches/0001_versioned_symbols.patch
rename to debian/patches/0001-Make-the-libsasl2-symbols-versioned.patch
index 137ef95..7419d79 100644
--- a/debian/patches/0001_versioned_symbols.patch
+++ b/debian/patches/0001-Make-the-libsasl2-symbols-versioned.patch
@@ -1,7 +1,31 @@
-Author: Fabian Fagerholm <fabbe at debian.org>
-Description: Use versioned symbols for libsasl2.
---- cyrus-sasl2.orig/lib/Makefile.am
-+++ cyrus-sasl2/lib/Makefile.am
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:02 +0100
+Subject: Make the libsasl2 symbols versioned
+
+---
+ Versions        | 7 +++++++
+ lib/Makefile.am | 4 ++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+ create mode 100644 Versions
+
+diff --git a/Versions b/Versions
+new file mode 100644
+index 0000000..f803d00
+--- /dev/null
++++ b/Versions
+@@ -0,0 +1,7 @@
++SASL2 {
++    global:
++        sasl_*; prop_*; auxprop_plugin_info; _sasl_MD5*;
++};
++
++HIDDEN { local: __*; _rest*; _save*; *; };
++
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index b8964a8..bff8efe 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
 @@ -64,8 +64,8 @@ LIB_DOOR= @LIB_DOOR@
  lib_LTLIBRARIES = libsasl2.la
  
@@ -13,13 +37,3 @@ Description: Use versioned symbols for libsasl2.
  libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
  
  if MACOSX
---- /dev/null
-+++ cyrus-sasl2/Versions
-@@ -0,0 +1,7 @@
-+SASL2 {
-+    global:
-+        sasl_*; prop_*; auxprop_plugin_info; _sasl_MD5*;
-+};
-+
-+HIDDEN { local: __*; _rest*; _save*; *; };
-+
diff --git a/debian/patches/0002_testsuite.patch b/debian/patches/0002-Use-etc-sasldb2-instead-of-.-sasldb-in-the-testsuite.patch
similarity index 62%
rename from debian/patches/0002_testsuite.patch
rename to debian/patches/0002-Use-etc-sasldb2-instead-of-.-sasldb-in-the-testsuite.patch
index 20d411e..a10c78f 100644
--- a/debian/patches/0002_testsuite.patch
+++ b/debian/patches/0002-Use-etc-sasldb2-instead-of-.-sasldb-in-the-testsuite.patch
@@ -1,9 +1,17 @@
-Author: Fabian Fagerholm <fabbe at debian.org>
-Description: Rename the testsuite program to sasltestsuite and use /etc/sasldb2
-instead of ./sasldb as default path for the sasldb database file.
---- cyrus-sasl2.orig/utils/testsuite.c
-+++ cyrus-sasl2/utils/testsuite.c
-@@ -462,9 +462,9 @@ int good_getopt(void *context __attribut
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:03 +0100
+Subject: Use /etc/sasldb2 instead of ./sasldb in the testsuite
+
+---
+ utils/testsuite.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/utils/testsuite.c b/utils/testsuite.c
+index 7e4e852..b687e96 100644
+--- a/utils/testsuite.c
++++ b/utils/testsuite.c
+@@ -462,9 +462,9 @@ int good_getopt(void *context __attribute__((unused)),
  	    *len = (unsigned) strlen("sasldb");
  	return SASL_OK;
      } else if (!strcmp(option, "sasldb_path")) {
diff --git a/debian/patches/0003_saslauthd_mdoc.patch b/debian/patches/0003-Update-saslauthd.conf-location-in-documentation.patch
similarity index 65%
rename from debian/patches/0003_saslauthd_mdoc.patch
rename to debian/patches/0003-Update-saslauthd.conf-location-in-documentation.patch
index 5be157a..42f6239 100644
--- a/debian/patches/0003_saslauthd_mdoc.patch
+++ b/debian/patches/0003-Update-saslauthd.conf-location-in-documentation.patch
@@ -1,8 +1,17 @@
-Author: Fabian Fagerholm <fabbe at debian.org>
-Description: Use the correct path for the saslauthd.conf file, and use another
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:03 +0100
+Subject: Update saslauthd.conf location in documentation
+
 date format (cosmetic).
---- cyrus-sasl2.orig/saslauthd/saslauthd.mdoc
-+++ cyrus-sasl2/saslauthd/saslauthd.mdoc
+---
+ saslauthd/saslauthd.mdoc | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/saslauthd/saslauthd.mdoc b/saslauthd/saslauthd.mdoc
+index 50f7dbf..5b0230d 100644
+--- a/saslauthd/saslauthd.mdoc
++++ b/saslauthd/saslauthd.mdoc
 @@ -10,7 +10,7 @@
  .\" manpage in saslauthd.8 whenever you change this source
  .\" version. Only the pre-formatted manpage is installed.
@@ -21,7 +30,7 @@ date format (cosmetic).
  changed with the -O parameter. See the LDAP_SASLAUTHD file included with the
  distribution for the list of available parameters.
  .It Li sia
-@@ -254,7 +254,7 @@ was never intended to be used in this ma
+@@ -254,7 +254,7 @@ was never intended to be used in this manner, anyway.)
  .Bl -tag -width "/var/run/saslauthd/mux"
  .It Pa /var/run/saslauthd/mux
  The default communications socket.
diff --git a/debian/patches/0005_dbconverter.patch b/debian/patches/0004-Include-dbconverter-2-in-sbin_PROGRAMS-and-set-defau.patch
similarity index 67%
rename from debian/patches/0005_dbconverter.patch
rename to debian/patches/0004-Include-dbconverter-2-in-sbin_PROGRAMS-and-set-defau.patch
index c9a18a2..b570742 100644
--- a/debian/patches/0005_dbconverter.patch
+++ b/debian/patches/0004-Include-dbconverter-2-in-sbin_PROGRAMS-and-set-defau.patch
@@ -1,8 +1,19 @@
-Author: Fabian Fagerholm <fabbe at debian.org>
-Description: Build the dbconverter-2 utility and change the path to the sasldb
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:03 +0100
+Subject: Include dbconverter-2 in sbin_PROGRAMS and set default sasldb file
+ to /etc/sasldb2
+
 database file to /etc/sasldb2.
---- cyrus-sasl2.orig/utils/Makefile.am
-+++ cyrus-sasl2/utils/Makefile.am
+---
+ utils/Makefile.am     | 4 ++--
+ utils/dbconverter-2.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/utils/Makefile.am b/utils/Makefile.am
+index 7e2f983..25077e2 100644
+--- a/utils/Makefile.am
++++ b/utils/Makefile.am
 @@ -45,10 +45,10 @@
  all_sasl_libs = ../lib/libsasl2.la $(SASL_DB_LIB) $(LIB_SOCKET)
  all_sasl_static_libs = ../lib/.libs/libsasl2.a $(SASL_DB_LIB) $(LIB_SOCKET) $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(SASL_KRB_LIB) $(LIB_DES) $(PLAIN_LIBS) $(SRP_LIBS) $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE)
@@ -16,9 +27,11 @@ database file to /etc/sasldb2.
  
  if NO_SASL_DB_MANS
  man_MANS = 
---- cyrus-sasl2.orig/utils/dbconverter-2.c
-+++ cyrus-sasl2/utils/dbconverter-2.c
-@@ -382,7 +382,7 @@ static struct sasl_callback goodsasl_cb[
+diff --git a/utils/dbconverter-2.c b/utils/dbconverter-2.c
+index 04df2cb..4701898 100644
+--- a/utils/dbconverter-2.c
++++ b/utils/dbconverter-2.c
+@@ -382,7 +382,7 @@ static struct sasl_callback goodsasl_cb[] = {
  
  int main(int argc, char **argv)
  {
diff --git a/debian/patches/0006_library_mutexes.patch b/debian/patches/0005-Fixes-in-library-mutexes.patch
similarity index 60%
rename from debian/patches/0006_library_mutexes.patch
rename to debian/patches/0005-Fixes-in-library-mutexes.patch
index 196f302..0c53d70 100644
--- a/debian/patches/0006_library_mutexes.patch
+++ b/debian/patches/0005-Fixes-in-library-mutexes.patch
@@ -1,8 +1,17 @@
-Author: Fabian Fagerholm <fabbe at debian.org>
-Description: Exact description unknown; make sure mutex-related code works.
---- cyrus-sasl2.orig/lib/common.c
-+++ cyrus-sasl2/lib/common.c
-@@ -818,7 +818,7 @@ int _sasl_common_init(sasl_global_callba
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:03 +0100
+Subject: Fixes in library mutexes
+
+---
+ lib/common.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/lib/common.c b/lib/common.c
+index e0f59eb..1df5702 100644
+--- a/lib/common.c
++++ b/lib/common.c
+@@ -818,7 +818,7 @@ int _sasl_common_init(sasl_global_callbacks_t *global_callbacks)
      result = sasl_canonuser_add_plugin("INTERNAL", internal_canonuser_init);
      if(result != SASL_OK) return result;    
  
diff --git a/debian/patches/0006-Link-with-libsasldb.a-instead-of-libsasldb.al.patch b/debian/patches/0006-Link-with-libsasldb.a-instead-of-libsasldb.al.patch
new file mode 100644
index 0000000..beb88da
--- /dev/null
+++ b/debian/patches/0006-Link-with-libsasldb.a-instead-of-libsasldb.al.patch
@@ -0,0 +1,23 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:03 +0100
+Subject: Link with libsasldb.a instead of libsasldb.al
+
+support.
+---
+ saslauthd/configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/saslauthd/configure.in b/saslauthd/configure.in
+index 0addcf4..8fb693c 100644
+--- a/saslauthd/configure.in
++++ b/saslauthd/configure.in
+@@ -77,7 +77,7 @@ if test "$authsasldb" != no; then
+   AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support])
+   SASL_DB_PATH_CHECK()
+   SASL_DB_CHECK()
+-  SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
++  SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.a"
+ fi
+ 
+ AC_ARG_ENABLE(httpform, [  --enable-httpform       enable HTTP form authentication [[no]] ],
diff --git a/debian/patches/0007-Enable-autoconf-maintainer-mode.patch b/debian/patches/0007-Enable-autoconf-maintainer-mode.patch
new file mode 100644
index 0000000..26ba42a
--- /dev/null
+++ b/debian/patches/0007-Enable-autoconf-maintainer-mode.patch
@@ -0,0 +1,22 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:03 +0100
+Subject: Enable autoconf maintainer mode
+
+---
+ configure.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.in b/configure.in
+index 465a362..d4d250c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -62,6 +62,8 @@ dnl
+ AM_INIT_AUTOMAKE(cyrus-sasl, 2.1.26)
+ CMU_INIT_AUTOMAKE
+ 
++AM_MAINTAINER_MODE
++
+ # and include our config dir scripts
+ ACLOCAL="$ACLOCAL -I \$(top_srcdir)/config"
+ 
diff --git a/debian/patches/0008-Add-libtool-to-saslauthd-autoconf.patch b/debian/patches/0008-Add-libtool-to-saslauthd-autoconf.patch
new file mode 100644
index 0000000..8ac33dc
--- /dev/null
+++ b/debian/patches/0008-Add-libtool-to-saslauthd-autoconf.patch
@@ -0,0 +1,21 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:03 +0100
+Subject: Add libtool to saslauthd autoconf
+
+---
+ saslauthd/configure.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/saslauthd/configure.in b/saslauthd/configure.in
+index 8fb693c..701dbe4 100644
+--- a/saslauthd/configure.in
++++ b/saslauthd/configure.in
+@@ -25,6 +25,7 @@ AC_PROG_AWK
+ AC_PROG_MAKE_SET
+ AC_PROG_LN_S
+ AC_PROG_INSTALL
++AC_PROG_LIBTOOL
+ 
+ dnl Checks for build foo
+ CMU_C___ATTRIBUTE__
diff --git a/debian/patches/0012_xopen_crypt_prototype.patch b/debian/patches/0009-Define-_XOPEN_SOURCE-in-auth_shadow.c-to-get-proper-.patch
similarity index 51%
rename from debian/patches/0012_xopen_crypt_prototype.patch
rename to debian/patches/0009-Define-_XOPEN_SOURCE-in-auth_shadow.c-to-get-proper-.patch
index 314d665..1f02d34 100644
--- a/debian/patches/0012_xopen_crypt_prototype.patch
+++ b/debian/patches/0009-Define-_XOPEN_SOURCE-in-auth_shadow.c-to-get-proper-.patch
@@ -1,13 +1,25 @@
-Author: Dann Frazier <dannf at debian.org>
-Description: When _XOPEN_SOURCE is defined, the subsequent #include <unistd.h>
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:03 +0100
+Subject: Define _XOPEN_SOURCE in auth_shadow.c to get proper crypt() prototype
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
 will define a correct function prototype for the crypt function.  This avoids
 segfaults on architectures where the size of a pointer is greater than the size
 of an integer (ia64 and amd64 are examples).  This may be detected by looking
 for build log lines such as the following:
 auth_shadow.c:183: warning: implicit declaration of function ‘crypt’
 auth_shadow.c:183: warning: cast to pointer from integer of different size
---- cyrus-sasl2.orig/saslauthd/auth_shadow.c
-+++ cyrus-sasl2/saslauthd/auth_shadow.c
+---
+ saslauthd/auth_shadow.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/saslauthd/auth_shadow.c b/saslauthd/auth_shadow.c
+index 677131b..d0efa9a 100644
+--- a/saslauthd/auth_shadow.c
++++ b/saslauthd/auth_shadow.c
 @@ -36,6 +36,7 @@
  
  #ifdef AUTH_SHADOW
diff --git a/debian/patches/0009_sasldb_al.patch b/debian/patches/0009_sasldb_al.patch
deleted file mode 100644
index 16df6bc..0000000
--- a/debian/patches/0009_sasldb_al.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Author: Fabian Fagerholm <fabbe at debian.org>
-Description: Fix linking with libsasldb.a when saslauthd is built with sasldb
-support.
---- cyrus-sasl2.orig/saslauthd/configure.in
-+++ cyrus-sasl2/saslauthd/configure.in
-@@ -77,7 +77,7 @@ if test "$authsasldb" != no; then
-   AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support])
-   SASL_DB_PATH_CHECK()
-   SASL_DB_CHECK()
--  SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
-+  SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.a"
- fi
- 
- AC_ARG_ENABLE(httpform, [  --enable-httpform       enable HTTP form authentication [[no]] ],
diff --git a/debian/patches/0014_avoid_pic_overwrite.patch b/debian/patches/0010-Don-t-overwrite-PIC-objects-with-non-PIC-variant.patch
similarity index 61%
rename from debian/patches/0014_avoid_pic_overwrite.patch
rename to debian/patches/0010-Don-t-overwrite-PIC-objects-with-non-PIC-variant.patch
index fd84681..630fbf3 100644
--- a/debian/patches/0014_avoid_pic_overwrite.patch
+++ b/debian/patches/0010-Don-t-overwrite-PIC-objects-with-non-PIC-variant.patch
@@ -1,11 +1,21 @@
-Author: Fabian Fagerholm <fabbe at debian.org>
-Description: This patch makes sure the non-PIC version of libsasldb.a, which
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:03 +0100
+Subject: Don't overwrite PIC objects with non-PIC variant
+
 is created out of non-PIC objects, is not going to overwrite the PIC version,
 which is created out of PIC objects. The PIC version is placed in .libs, and
 the non-PIC version in the current directory.  This ensures that both non-PIC
 and PIC versions are available in the correct locations.
---- cyrus-sasl2.orig/lib/Makefile.am
-+++ cyrus-sasl2/lib/Makefile.am
+---
+ lib/Makefile.am    | 2 +-
+ sasldb/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index bff8efe..16b14f4 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
 @@ -80,7 +80,7 @@ endif
  
  libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS)
@@ -15,8 +25,10 @@ and PIC versions are available in the correct locations.
  	@for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \
  	if test ! -f $$i; then continue; fi; . $$i; \
  	for j in $$dependency_libs foo; do \
---- cyrus-sasl2.orig/sasldb/Makefile.am
-+++ cyrus-sasl2/sasldb/Makefile.am
+diff --git a/sasldb/Makefile.am b/sasldb/Makefile.am
+index 067477c..311a34b 100644
+--- a/sasldb/Makefile.am
++++ b/sasldb/Makefile.am
 @@ -63,6 +63,6 @@ libsasldb_a_SOURCES =
  EXTRA_libsasldb_a_SOURCES =
  
diff --git a/debian/patches/0010_maintainer_mode.patch b/debian/patches/0010_maintainer_mode.patch
deleted file mode 100644
index 34188a5..0000000
--- a/debian/patches/0010_maintainer_mode.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Author: Fabian Fagerholm <fabbe at debian.org>
-Description: Enable maintainer mode to avoid auto* problems.
---- cyrus-sasl2.orig/configure.in
-+++ cyrus-sasl2/configure.in
-@@ -62,6 +62,8 @@ dnl
- AM_INIT_AUTOMAKE(cyrus-sasl, 2.1.26)
- CMU_INIT_AUTOMAKE
- 
-+AM_MAINTAINER_MODE
-+
- # and include our config dir scripts
- ACLOCAL="$ACLOCAL -I \$(top_srcdir)/config"
- 
diff --git a/debian/patches/0011-Look-for-generic-Berkeley-DB-first.patch b/debian/patches/0011-Look-for-generic-Berkeley-DB-first.patch
new file mode 100644
index 0000000..396f75f
--- /dev/null
+++ b/debian/patches/0011-Look-for-generic-Berkeley-DB-first.patch
@@ -0,0 +1,22 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:03 +0100
+Subject: Look for generic Berkeley DB first
+
+---
+ cmulocal/berkdb.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmulocal/berkdb.m4 b/cmulocal/berkdb.m4
+index 98e8cb6..8b7d408 100644
+--- a/cmulocal/berkdb.m4
++++ b/cmulocal/berkdb.m4
+@@ -213,7 +213,7 @@ AC_DEFUN([CYRUS_BERKELEY_DB_CHK_LIB],
+ 	fi
+ 
+ 	saved_LIBS=$LIBS
+-	    for dbname in ${with_bdb} \
++	    for dbname in ${with_bdb} db \
+ 	        db-5.2 db5.2 db52 \
+ 	        db-5.1 db5.2 db51 \
+ 	        db-5.0 db5.2 db50 \
diff --git a/debian/patches/0011_saslauthd_ac_prog_libtool.patch b/debian/patches/0011_saslauthd_ac_prog_libtool.patch
deleted file mode 100644
index 0ae6a91..0000000
--- a/debian/patches/0011_saslauthd_ac_prog_libtool.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Author: Fabian Fagerholm <fabbe at debian.org>
-Description: Enable libtool use.
---- cyrus-sasl2.orig/saslauthd/configure.in
-+++ cyrus-sasl2/saslauthd/configure.in
-@@ -25,6 +25,7 @@ AC_PROG_AWK
- AC_PROG_MAKE_SET
- AC_PROG_LN_S
- AC_PROG_INSTALL
-+AC_PROG_LIBTOOL
- 
- dnl Checks for build foo
- CMU_C___ATTRIBUTE__
diff --git a/debian/patches/0025_ld_as_needed.patch b/debian/patches/0012-Update-required-libraries-when-ld-as-needed-is-used.patch
similarity index 55%
rename from debian/patches/0025_ld_as_needed.patch
rename to debian/patches/0012-Update-required-libraries-when-ld-as-needed-is-used.patch
index 6ff522b..bbff586 100644
--- a/debian/patches/0025_ld_as_needed.patch
+++ b/debian/patches/0012-Update-required-libraries-when-ld-as-needed-is-used.patch
@@ -1,9 +1,19 @@
-Author: Matthias Klose <doko at ubuntu.com>
-Desription: Fix FTBFS, add $(SASL_DB_LIB) as dependency to libsasldb, and use
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: Update required libraries when ld --as-needed is used
+
 it.
---- cyrus-sasl2.orig/saslauthd/Makefile.am
-+++ cyrus-sasl2/saslauthd/Makefile.am
-@@ -16,7 +16,7 @@ EXTRA_saslauthd_sources = getaddrinfo.c
+---
+ saslauthd/Makefile.am | 2 +-
+ sasldb/Makefile.am    | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/saslauthd/Makefile.am b/saslauthd/Makefile.am
+index ce1e92b..a07281d 100644
+--- a/saslauthd/Makefile.am
++++ b/saslauthd/Makefile.am
+@@ -16,7 +16,7 @@ EXTRA_saslauthd_sources = getaddrinfo.c getnameinfo.c
  saslauthd_DEPENDENCIES = saslauthd-main.o @LTLIBOBJS@
  saslauthd_LDADD	= @SASL_KRB_LIB@ \
  		  @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
@@ -12,8 +22,10 @@ it.
  
  testsaslauthd_SOURCES = testsaslauthd.c utils.c
  testsaslauthd_LDADD = @LIB_SOCKET@
---- cyrus-sasl2.orig/sasldb/Makefile.am
-+++ cyrus-sasl2/sasldb/Makefile.am
+diff --git a/sasldb/Makefile.am b/sasldb/Makefile.am
+index 311a34b..6d7ce0c 100644
+--- a/sasldb/Makefile.am
++++ b/sasldb/Makefile.am
 @@ -55,8 +55,8 @@ noinst_LIBRARIES = libsasldb.a
  
  libsasldb_la_SOURCES = allockey.c sasldb.h
diff --git a/debian/patches/0026_drop_krb5support_dependency.patch b/debian/patches/0013-Drop-krb5support-dependency.patch
similarity index 57%
rename from debian/patches/0026_drop_krb5support_dependency.patch
rename to debian/patches/0013-Drop-krb5support-dependency.patch
index 85d3e7c..a592a3e 100644
--- a/debian/patches/0026_drop_krb5support_dependency.patch
+++ b/debian/patches/0013-Drop-krb5support-dependency.patch
@@ -1,7 +1,16 @@
-Author: Roberto C. Sanchez <roberto at connexer.com>
-Description: Drop gratuitous dependency on krb5support
---- cyrus-sasl2.orig/cmulocal/sasl2.m4
-+++ cyrus-sasl2/cmulocal/sasl2.m4
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: Drop krb5support dependency
+
+---
+ cmulocal/sasl2.m4 | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/cmulocal/sasl2.m4 b/cmulocal/sasl2.m4
+index 3c2841a..62af6ab 100644
+--- a/cmulocal/sasl2.m4
++++ b/cmulocal/sasl2.m4
 @@ -112,9 +112,6 @@ if test "$gssapi" != no; then
    fi
  
diff --git a/debian/patches/0028_autotools_fixes.patch b/debian/patches/0014-Several-autotools-fixes.patch
similarity index 77%
rename from debian/patches/0028_autotools_fixes.patch
rename to debian/patches/0014-Several-autotools-fixes.patch
index c01b807..250efb2 100644
--- a/debian/patches/0028_autotools_fixes.patch
+++ b/debian/patches/0014-Several-autotools-fixes.patch
@@ -1,5 +1,60 @@
---- cyrus-sasl2.orig/configure.in
-+++ cyrus-sasl2/configure.in
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: Several autotools fixes
+
+---
+ Makefile.am            |  2 ++
+ config/kerberos_v4.m4  |  8 ++++----
+ configure.in           |  2 ++
+ saslauthd/Makefile.am  |  2 ++
+ saslauthd/configure.in | 33 +++++++++++++++++----------------
+ 5 files changed, 27 insertions(+), 20 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 2091dd1..220565f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -43,6 +43,8 @@ AUTOMAKE_OPTIONS = 1.7
+ #
+ ################################################################
+ 
++ACLOCAL_AMFLAGS = -I cmulocal -I config
++
+ if SASLAUTHD
+ SAD = saslauthd
+ else
+diff --git a/config/kerberos_v4.m4 b/config/kerberos_v4.m4
+index 7884743..0e9b58c 100644
+--- a/config/kerberos_v4.m4
++++ b/config/kerberos_v4.m4
+@@ -89,18 +89,18 @@ AC_DEFUN([SASL_KERBEROS_V4_CHK], [
+     dnl if we were ambitious, we would look more aggressively for the
+     dnl krb4 install
+     if test -d ${krb4}; then
+-       AC_CACHE_CHECK(for Kerberos includes, cyrus_krbinclude, [
++       AC_CACHE_CHECK(for Kerberos includes, cyrus_cv_krbinclude, [
+          for krbhloc in include/kerberosIV include/kerberos include
+          do
+            if test -f ${krb4}/${krbhloc}/krb.h ; then
+-             cyrus_krbinclude=${krb4}/${krbhloc}
++             cyrus_cv_krbinclude=${krb4}/${krbhloc}
+              break
+            fi
+          done
+          ])
+ 
+-       if test -n "${cyrus_krbinclude}"; then
+-         CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
++       if test -n "${cyrus_cv_krbinclude}"; then
++         CPPFLAGS="$CPPFLAGS -I${cyrus_cv_krbinclude}"
+        fi
+        LDFLAGS="$LDFLAGS -L$krb4/lib"
+     fi
+diff --git a/configure.in b/configure.in
+index d4d250c..d9fead6 100644
+--- a/configure.in
++++ b/configure.in
 @@ -44,6 +44,8 @@ dnl
  AC_INIT(lib/saslint.h)
  AC_PREREQ([2.54])
@@ -9,19 +64,21 @@
  dnl use ./config.cache as the default cache file.
  dnl we require a cache file to successfully configure our build.
  if test $cache_file = "/dev/null"; then
---- cyrus-sasl2.orig/Makefile.am
-+++ cyrus-sasl2/Makefile.am
-@@ -43,6 +43,8 @@ AUTOMAKE_OPTIONS = 1.7
- #
- ################################################################
- 
-+ACLOCAL_AMFLAGS = -I cmulocal -I config
+diff --git a/saslauthd/Makefile.am b/saslauthd/Makefile.am
+index a07281d..18c1630 100644
+--- a/saslauthd/Makefile.am
++++ b/saslauthd/Makefile.am
+@@ -1,4 +1,6 @@
+ AUTOMAKE_OPTIONS = 1.7
++ACLOCAL_AMFLAGS = -I ../cmulocal -I ../config
 +
- if SASLAUTHD
- SAD = saslauthd
- else
---- cyrus-sasl2.orig/saslauthd/configure.in
-+++ cyrus-sasl2/saslauthd/configure.in
+ sbin_PROGRAMS	= saslauthd testsaslauthd
+ EXTRA_PROGRAMS  = saslcache
+ 
+diff --git a/saslauthd/configure.in b/saslauthd/configure.in
+index 701dbe4..8643544 100644
+--- a/saslauthd/configure.in
++++ b/saslauthd/configure.in
 @@ -1,7 +1,8 @@
  AC_INIT(mechanisms.h)
  AC_PREREQ([2.54])
@@ -78,37 +135,3 @@
                         AC_DEFINE(HAVE_FUNCTION,[],[Does compiler understand __FUNCTION__])
                 fi
         fi
---- cyrus-sasl2.orig/saslauthd/Makefile.am
-+++ cyrus-sasl2/saslauthd/Makefile.am
-@@ -1,4 +1,6 @@
- AUTOMAKE_OPTIONS = 1.7
-+ACLOCAL_AMFLAGS = -I ../cmulocal -I ../config
-+
- sbin_PROGRAMS	= saslauthd testsaslauthd
- EXTRA_PROGRAMS  = saslcache
- 
---- cyrus-sasl2.orig/config/kerberos_v4.m4
-+++ cyrus-sasl2/config/kerberos_v4.m4
-@@ -89,18 +89,18 @@ AC_DEFUN([SASL_KERBEROS_V4_CHK], [
-     dnl if we were ambitious, we would look more aggressively for the
-     dnl krb4 install
-     if test -d ${krb4}; then
--       AC_CACHE_CHECK(for Kerberos includes, cyrus_krbinclude, [
-+       AC_CACHE_CHECK(for Kerberos includes, cyrus_cv_krbinclude, [
-          for krbhloc in include/kerberosIV include/kerberos include
-          do
-            if test -f ${krb4}/${krbhloc}/krb.h ; then
--             cyrus_krbinclude=${krb4}/${krbhloc}
-+             cyrus_cv_krbinclude=${krb4}/${krbhloc}
-              break
-            fi
-          done
-          ])
- 
--       if test -n "${cyrus_krbinclude}"; then
--         CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
-+       if test -n "${cyrus_cv_krbinclude}"; then
-+         CPPFLAGS="$CPPFLAGS -I${cyrus_cv_krbinclude}"
-        fi
-        LDFLAGS="$LDFLAGS -L$krb4/lib"
-     fi
diff --git a/debian/patches/0015-LDAP-fixes.patch b/debian/patches/0015-LDAP-fixes.patch
new file mode 100644
index 0000000..be5c96e
--- /dev/null
+++ b/debian/patches/0015-LDAP-fixes.patch
@@ -0,0 +1,22 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: LDAP fixes
+
+---
+ plugins/ldapdb.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/plugins/ldapdb.c b/plugins/ldapdb.c
+index ddead7f..b74dc9e 100644
+--- a/plugins/ldapdb.c
++++ b/plugins/ldapdb.c
+@@ -251,6 +251,8 @@ static int ldapdb_auxprop_lookup(void *glob_context,
+ 
+ #if defined(LDAP_PROXY_AUTHZ_FAILURE)
+ 	case LDAP_PROXY_AUTHZ_FAILURE:
++#elif defined(LDAP_X_PROXY_AUTHZ_FAILURE)
++	case LDAP_X_PROXY_AUTHZ_FAILURE:
+ #endif
+ 	case LDAP_INAPPROPRIATE_AUTH:
+ 	case LDAP_INVALID_CREDENTIALS:
diff --git a/debian/patches/0030_dont_use_la_files_for_opening_plugins.patch b/debian/patches/0016-Don-t-use-la-files-for-opening-plugins.patch
similarity index 84%
rename from debian/patches/0030_dont_use_la_files_for_opening_plugins.patch
rename to debian/patches/0016-Don-t-use-la-files-for-opening-plugins.patch
index 03fa87c..ecb0e0d 100644
--- a/debian/patches/0030_dont_use_la_files_for_opening_plugins.patch
+++ b/debian/patches/0016-Don-t-use-la-files-for-opening-plugins.patch
@@ -1,6 +1,17 @@
---- cyrus-sasl2.orig/lib/dlopen.c
-+++ cyrus-sasl2/lib/dlopen.c
-@@ -247,105 +247,6 @@ static int _sasl_plugin_load(char *plugi
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: Don't use la files for opening plugins
+
+---
+ lib/dlopen.c | 113 ++++-------------------------------------------------------
+ 1 file changed, 7 insertions(+), 106 deletions(-)
+
+diff --git a/lib/dlopen.c b/lib/dlopen.c
+index b9c1c80..8561bef 100644
+--- a/lib/dlopen.c
++++ b/lib/dlopen.c
+@@ -247,105 +247,6 @@ static int _sasl_plugin_load(char *plugin, void *library,
      return result;
  }
  
@@ -106,7 +117,7 @@
  #endif /* DO_DLOPEN */
  
  /* loads a plugin library */
-@@ -499,18 +400,18 @@ int _sasl_load_plugins(const add_plugin_
+@@ -499,18 +400,18 @@ int _sasl_load_plugins(const add_plugin_list_t *entrypoints,
  		if (length + pos>=PATH_MAX) continue; /* too big */
  
  		if (strcmp(dir->d_name + (length - strlen(SO_SUFFIX)),
diff --git a/debian/patches/0031_dont_use_-R_when_search_for_sqlite_libraries.patch b/debian/patches/0017-Don-t-use-R-when-searching-for-SQLite-libraries.patch
similarity index 69%
rename from debian/patches/0031_dont_use_-R_when_search_for_sqlite_libraries.patch
rename to debian/patches/0017-Don-t-use-R-when-searching-for-SQLite-libraries.patch
index 4bbf1b6..48e823a 100644
--- a/debian/patches/0031_dont_use_-R_when_search_for_sqlite_libraries.patch
+++ b/debian/patches/0017-Don-t-use-R-when-searching-for-SQLite-libraries.patch
@@ -1,5 +1,16 @@
---- cyrus-sasl2.orig/configure.in
-+++ cyrus-sasl2/configure.in
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: Don't use -R when searching for SQLite libraries
+
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index d9fead6..9fcc80c 100644
+--- a/configure.in
++++ b/configure.in
 @@ -865,9 +865,9 @@ case "$with_sqlite" in
      notfound) AC_WARN([SQLite Library not found]); true;;
      *)
diff --git a/debian/patches/0017_db4.8.patch b/debian/patches/0017_db4.8.patch
deleted file mode 100644
index 9b5e0de..0000000
--- a/debian/patches/0017_db4.8.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Author: Fabian Fagerholm <fabbe at debian.org>
-Description: Support and build against db4.8.
---- cyrus-sasl2.orig/cmulocal/berkdb.m4
-+++ cyrus-sasl2/cmulocal/berkdb.m4
-@@ -213,7 +213,7 @@ AC_DEFUN([CYRUS_BERKELEY_DB_CHK_LIB],
- 	fi
- 
- 	saved_LIBS=$LIBS
--	    for dbname in ${with_bdb} \
-+	    for dbname in ${with_bdb} db \
- 	        db-5.2 db5.2 db52 \
- 	        db-5.1 db5.2 db51 \
- 	        db-5.0 db5.2 db50 \
diff --git a/debian/patches/0032_revert_1.103_revision_to_unbreak_GSSAPI.patch b/debian/patches/0018-Revert-1.103-revision-to-unbreak-GSSAPI.patch
similarity index 52%
rename from debian/patches/0032_revert_1.103_revision_to_unbreak_GSSAPI.patch
rename to debian/patches/0018-Revert-1.103-revision-to-unbreak-GSSAPI.patch
index d322a2a..2a16842 100644
--- a/debian/patches/0032_revert_1.103_revision_to_unbreak_GSSAPI.patch
+++ b/debian/patches/0018-Revert-1.103-revision-to-unbreak-GSSAPI.patch
@@ -1,6 +1,17 @@
---- cyrus-sasl2.orig/plugins/gssapi.c
-+++ cyrus-sasl2/plugins/gssapi.c
-@@ -1583,10 +1583,10 @@ static int gssapi_client_mech_step(void
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: Revert 1.103 revision to unbreak GSSAPI
+
+---
+ plugins/gssapi.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/gssapi.c b/plugins/gssapi.c
+index 2fd1b3b..ec9f7aa 100644
+--- a/plugins/gssapi.c
++++ b/plugins/gssapi.c
+@@ -1583,10 +1583,10 @@ static int gssapi_client_mech_step(void *conn_context,
  	}
  
  	/* Setup req_flags properly */
diff --git a/debian/patches/0019-Fix-segfault-in-GSSAPI.patch b/debian/patches/0019-Fix-segfault-in-GSSAPI.patch
new file mode 100644
index 0000000..72ce4ab
--- /dev/null
+++ b/debian/patches/0019-Fix-segfault-in-GSSAPI.patch
@@ -0,0 +1,35 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: Fix segfault in GSSAPI
+
+---
+ plugins/gssapi.c | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/plugins/gssapi.c b/plugins/gssapi.c
+index ec9f7aa..348801b 100644
+--- a/plugins/gssapi.c
++++ b/plugins/gssapi.c
+@@ -376,6 +376,7 @@ sasl_gss_encode(void *context, const struct iovec *invec, unsigned numiov,
+     }
+     
+     if (output_token->value && output) {
++	int len;
+ 	unsigned char * p;
+ 	
+ 	ret = _plug_buf_alloc(text->utils,
+@@ -392,11 +393,8 @@ sasl_gss_encode(void *context, const struct iovec *invec, unsigned numiov,
+ 
+ 	p = (unsigned char *) text->encode_buf;
+ 	
+-	p[0] = (output_token->length>>24) & 0xFF;
+-	p[1] = (output_token->length>>16) & 0xFF;
+-	p[2] = (output_token->length>>8) & 0xFF;
+-	p[3] = output_token->length & 0xFF;
+-
++	len = htonl(output_token->length);
++	memcpy(text->encode_buf, &len, 4);
+ 	memcpy(text->encode_buf + 4, output_token->value, output_token->length);
+     }
+     
diff --git a/debian/patches/0020-Fix-dovecot-authentication.patch b/debian/patches/0020-Fix-dovecot-authentication.patch
new file mode 100644
index 0000000..45a525f
--- /dev/null
+++ b/debian/patches/0020-Fix-dovecot-authentication.patch
@@ -0,0 +1,34 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: Fix dovecot authentication
+
+---
+ lib/checkpw.c | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/lib/checkpw.c b/lib/checkpw.c
+index d371f3f..4e61a19 100644
+--- a/lib/checkpw.c
++++ b/lib/checkpw.c
+@@ -587,16 +587,14 @@ static int read_wait(int fd, unsigned delta)
+ 	    /* Timeout. */
+ 	    errno = ETIMEDOUT;
+ 	    return -1;
+-	case +1:
+-	    if (FD_ISSET(fd, &rfds)) {
+-		/* Success, file descriptor is readable. */
+-		return 0;
+-	    }
+-	    return -1;
+ 	case -1:
+ 	    if (errno == EINTR || errno == EAGAIN)
+ 		continue;
+ 	default:
++	    if (FD_ISSET(fd, &rfds)) {
++		/* Success, file descriptor is readable. */
++		return 0;
++	    }
+ 	    /* Error catch-all. */
+ 	    return -1;
+ 	}
diff --git a/debian/patches/0021-Temporary-multiarch-fixes.patch b/debian/patches/0021-Temporary-multiarch-fixes.patch
new file mode 100644
index 0000000..d6e1ee5
--- /dev/null
+++ b/debian/patches/0021-Temporary-multiarch-fixes.patch
@@ -0,0 +1,36 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: Temporary multiarch fixes
+
+---
+ configure.in           | 2 +-
+ saslauthd/configure.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 9fcc80c..694a734 100644
+--- a/configure.in
++++ b/configure.in
+@@ -277,7 +277,7 @@ AC_ARG_WITH(pam, [  --with-pam=DIR          use PAM (rooted in DIR) [[yes]] ],
+ if test "$with_pam" != no; then
+   if test -d $with_pam; then
+     CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
+-    LDFLAGS="$LDFLAGS -L${with_pam}/lib"
++    LDFLAGS="$LDFLAGS -L${with_pam}/$DEB_HOST_MULTIARCH/lib"
+   fi
+   AC_CHECK_HEADERS(security/pam_appl.h pam/pam_appl.h)
+   cmu_save_LIBS="$LIBS"
+diff --git a/saslauthd/configure.in b/saslauthd/configure.in
+index 8643544..4233017 100644
+--- a/saslauthd/configure.in
++++ b/saslauthd/configure.in
+@@ -95,7 +95,7 @@ AC_ARG_WITH(pam, [  --with-pam=DIR          use PAM (rooted in DIR) [yes] ],
+ if test "$with_pam" != no; then
+   if test -d $with_pam; then
+     CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
+-    LDFLAGS="$LDFLAGS -L${with_pam}/lib"
++    LDFLAGS="$LDFLAGS -L${with_pam}/$DEB_HOST_MULTIARCH/lib"
+   fi
+   cmu_save_LIBS="$LIBS"
+   AC_CHECK_LIB(pam, pam_start, [
diff --git a/debian/patches/0036_add_reference_to_LDAP_SASLAUTHD_file.patch b/debian/patches/0022-Add-reference-to-LDAP_SASLAUTHD-file-to-the-saslauth.patch
similarity index 59%
rename from debian/patches/0036_add_reference_to_LDAP_SASLAUTHD_file.patch
rename to debian/patches/0022-Add-reference-to-LDAP_SASLAUTHD-file-to-the-saslauth.patch
index 4681352..cbe14a9 100644
--- a/debian/patches/0036_add_reference_to_LDAP_SASLAUTHD_file.patch
+++ b/debian/patches/0022-Add-reference-to-LDAP_SASLAUTHD-file-to-the-saslauth.patch
@@ -1,6 +1,18 @@
---- cyrus-sasl2.orig/saslauthd/saslauthd.8
-+++ cyrus-sasl2/saslauthd/saslauthd.8
-@@ -158,8 +158,8 @@ AAUUTTHHEENNTTIICCAATTIIOON
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: Add reference to LDAP_SASLAUTHD file to the saslauthd documentation
+
+---
+ saslauthd/saslauthd.8    | 4 ++--
+ saslauthd/saslauthd.mdoc | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/saslauthd/saslauthd.8 b/saslauthd/saslauthd.8
+index 843edb0..8a35732 100644
+--- a/saslauthd/saslauthd.8
++++ b/saslauthd/saslauthd.8
+@@ -158,8 +158,8 @@ AAUUTTHHEENNTTIICCAATTIIOONN MMEECCHHAANNIISSMMSS
                  Authenticate against an ldap server.  The ldap configuration
                  parameters are read from /usr/local/etc/saslauthd.conf.  The
                  location of this file can be changed with the -O parameter.
@@ -11,8 +23,10 @@
  
       sia        _(_D_i_g_i_t_a_l _U_N_I_X_)
  
---- cyrus-sasl2.orig/saslauthd/saslauthd.mdoc
-+++ cyrus-sasl2/saslauthd/saslauthd.mdoc
+diff --git a/saslauthd/saslauthd.mdoc b/saslauthd/saslauthd.mdoc
+index 5b0230d..0e84e6f 100644
+--- a/saslauthd/saslauthd.mdoc
++++ b/saslauthd/saslauthd.mdoc
 @@ -222,8 +222,8 @@ instead.
  .Pp
  Authenticate against an ldap server.  The ldap configuration parameters are
diff --git a/debian/patches/0038_send_imap_logout.patch b/debian/patches/0023-Send-IMAP-logout.patch
similarity index 78%
rename from debian/patches/0038_send_imap_logout.patch
rename to debian/patches/0023-Send-IMAP-logout.patch
index 3bfcfbd..e666690 100644
--- a/debian/patches/0038_send_imap_logout.patch
+++ b/debian/patches/0023-Send-IMAP-logout.patch
@@ -1,6 +1,17 @@
---- cyrus-sasl2.orig/saslauthd/auth_rimap.c
-+++ cyrus-sasl2/saslauthd/auth_rimap.c
-@@ -90,6 +90,7 @@ static struct addrinfo *ai = NULL;	/* re
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:05 +0100
+Subject: Send IMAP logout
+
+---
+ saslauthd/auth_rimap.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/saslauthd/auth_rimap.c b/saslauthd/auth_rimap.c
+index 2c3870f..bb8eccb 100644
+--- a/saslauthd/auth_rimap.c
++++ b/saslauthd/auth_rimap.c
+@@ -90,6 +90,7 @@ static struct addrinfo *ai = NULL;	/* remote authentication host    */
  					   service we connect to.	 */
  #define TAG "saslauthd"			/* IMAP command tag */
  #define LOGIN_CMD (TAG " LOGIN ")	/* IMAP login command (with tag) */
diff --git a/debian/patches/0024-Fix-canonuser-ldapdb-garbage-in-out-buffer.patch b/debian/patches/0024-Fix-canonuser-ldapdb-garbage-in-out-buffer.patch
new file mode 100644
index 0000000..88060b7
--- /dev/null
+++ b/debian/patches/0024-Fix-canonuser-ldapdb-garbage-in-out-buffer.patch
@@ -0,0 +1,21 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:05 +0100
+Subject: Fix canonuser ldapdb garbage in out buffer
+
+---
+ plugins/ldapdb.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/plugins/ldapdb.c b/plugins/ldapdb.c
+index b74dc9e..730f129 100644
+--- a/plugins/ldapdb.c
++++ b/plugins/ldapdb.c
+@@ -406,6 +406,7 @@ ldapdb_canon_server(void *glob_context,
+ 	if ( len > out_max )
+ 	    len = out_max;
+ 	memcpy(out, bvals[0]->bv_val, len);
++    out[len] = '\0';
+ 	*out_ulen = len;
+ 	ber_bvecfree(bvals);
+     }
diff --git a/debian/patches/0041_fix_keytab_option_for_MIT_kerberos.patch b/debian/patches/0025-Fix-keytab-option-for-MIT-Kerberos.patch
similarity index 66%
rename from debian/patches/0041_fix_keytab_option_for_MIT_kerberos.patch
rename to debian/patches/0025-Fix-keytab-option-for-MIT-Kerberos.patch
index 557caf6..4bb751b 100644
--- a/debian/patches/0041_fix_keytab_option_for_MIT_kerberos.patch
+++ b/debian/patches/0025-Fix-keytab-option-for-MIT-Kerberos.patch
@@ -1,8 +1,22 @@
-Author: Roberto C. Sanchez <roberto at connexer.com>
-Description: Fix buginess that results in the keytab configuration option not working on MIT Kerberos (Closes: #651308).
---- cyrus-sasl2.git.orig/cmulocal/sasl2.m4
-+++ cyrus-sasl2.git/cmulocal/sasl2.m4
-@@ -266,6 +266,7 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:05 +0100
+Subject: Fix keytab option for MIT Kerberos
+
+---
+ cmulocal/sasl2.m4        |  1 +
+ config.h.in              |  4 ++++
+ configure                |  2 +-
+ plugins/gssapi.c         | 14 +++++++++++---
+ saslauthd/configure      |  2 +-
+ saslauthd/saslauthd.h.in |  4 ++++
+ 6 files changed, 22 insertions(+), 5 deletions(-)
+
+diff --git a/cmulocal/sasl2.m4 b/cmulocal/sasl2.m4
+index 62af6ab..6a34b7a 100644
+--- a/cmulocal/sasl2.m4
++++ b/cmulocal/sasl2.m4
+@@ -266,6 +266,7 @@ if test "$gssapi" != no; then
    cmu_save_LIBS="$LIBS"
    LIBS="$LIBS $GSSAPIBASE_LIBS"
    AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
@@ -10,8 +24,10 @@ Description: Fix buginess that results in the keytab configuration option not wo
    AC_CHECK_FUNCS(gss_decapsulate_token)
    AC_CHECK_FUNCS(gss_encapsulate_token)
    AC_CHECK_FUNCS(gss_oid_equal)
---- cyrus-sasl2.git.orig/config.h.in
-+++ cyrus-sasl2.git/config.h.in
+diff --git a/config.h.in b/config.h.in
+index 6794af9..af13c25 100644
+--- a/config.h.in
++++ b/config.h.in
 @@ -126,6 +126,10 @@
     */
  #undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
@@ -23,9 +39,11 @@ Description: Fix buginess that results in the keytab configuration option not wo
  /* Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE */
  #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
  
---- cyrus-sasl2.git.orig/configure
-+++ cyrus-sasl2.git/configure
-@@ -13367,7 +13367,7 @@
+diff --git a/configure b/configure
+index 93fee28..c31ba83 100755
+--- a/configure
++++ b/configure
+@@ -13367,7 +13367,7 @@ fi
    cmu_save_LIBS="$LIBS"
    LIBS="$LIBS $GSSAPIBASE_LIBS"
  
@@ -34,8 +52,10 @@ Description: Fix buginess that results in the keytab configuration option not wo
  do
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
---- cyrus-sasl2.git.orig/plugins/gssapi.c
-+++ cyrus-sasl2.git/plugins/gssapi.c
+diff --git a/plugins/gssapi.c b/plugins/gssapi.c
+index 348801b..5102bfc 100644
+--- a/plugins/gssapi.c
++++ b/plugins/gssapi.c
 @@ -50,6 +50,9 @@
  #else
  #include <gssapi/gssapi.h>
@@ -46,7 +66,7 @@ Description: Fix buginess that results in the keytab configuration option not wo
  
  #ifdef WIN32
  #  include <winsock2.h>
-@@ -1365,7 +1368,7 @@
+@@ -1365,7 +1368,7 @@ static sasl_server_plug_t gssapi_server_plugins[] =
  };
  
  int gssapiv2_server_plug_init(
@@ -55,7 +75,7 @@ Description: Fix buginess that results in the keytab configuration option not wo
      const sasl_utils_t *utils __attribute__((unused)),
  #else
      const sasl_utils_t *utils,
-@@ -1375,7 +1378,7 @@
+@@ -1375,7 +1378,7 @@ int gssapiv2_server_plug_init(
      sasl_server_plug_t **pluglist,
      int *plugcount)
  {
@@ -64,7 +84,7 @@ Description: Fix buginess that results in the keytab configuration option not wo
      const char *keytab = NULL;
      char keytab_path[1024];
      unsigned int rl;
-@@ -1385,7 +1388,7 @@
+@@ -1385,7 +1388,7 @@ int gssapiv2_server_plug_init(
  	return SASL_BADVERS;
      }
      
@@ -73,7 +93,7 @@ Description: Fix buginess that results in the keytab configuration option not wo
      /* unfortunately, we don't check for readability of keytab if it's
         the standard one, since we don't know where it is */
      
-@@ -1408,7 +1411,12 @@
+@@ -1408,7 +1411,12 @@ int gssapiv2_server_plug_init(
  	
  	strncpy(keytab_path, keytab, 1024);
  	
@@ -86,9 +106,11 @@ Description: Fix buginess that results in the keytab configuration option not wo
      }
  #endif
      
---- cyrus-sasl2.git.orig/saslauthd/configure
-+++ cyrus-sasl2.git/saslauthd/configure
-@@ -9116,7 +9116,7 @@
+diff --git a/saslauthd/configure b/saslauthd/configure
+index 04cb414..c856644 100755
+--- a/saslauthd/configure
++++ b/saslauthd/configure
+@@ -9116,7 +9116,7 @@ fi
    cmu_save_LIBS="$LIBS"
    LIBS="$LIBS $GSSAPIBASE_LIBS"
  
@@ -97,8 +119,10 @@ Description: Fix buginess that results in the keytab configuration option not wo
  do
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
---- cyrus-sasl2.git.orig/saslauthd/saslauthd.h.in
-+++ cyrus-sasl2.git/saslauthd/saslauthd.h.in
+diff --git a/saslauthd/saslauthd.h.in b/saslauthd/saslauthd.h.in
+index a61f3ba..c83e4a9 100644
+--- a/saslauthd/saslauthd.h.in
++++ b/saslauthd/saslauthd.h.in
 @@ -62,6 +62,10 @@
     */
  #undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
diff --git a/debian/patches/0026-Release-server-creds-when-they-are-no-longer-needed.patch b/debian/patches/0026-Release-server-creds-when-they-are-no-longer-needed.patch
new file mode 100644
index 0000000..02fc9bf
--- /dev/null
+++ b/debian/patches/0026-Release-server-creds-when-they-are-no-longer-needed.patch
@@ -0,0 +1,26 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:05 +0100
+Subject: Release server creds when they are no longer needed
+
+---
+ plugins/gssapi.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/plugins/gssapi.c b/plugins/gssapi.c
+index 5102bfc..a959e06 100644
+--- a/plugins/gssapi.c
++++ b/plugins/gssapi.c
+@@ -945,6 +945,12 @@ gssapi_server_mech_authneg(context_t *text,
+ 	ret = SASL_CONTINUE;
+     }
+ 
++    /* Release server creds which are no longer needed */
++     if ( text->server_creds != GSS_C_NO_CREDENTIAL) {
++        maj_stat = gss_release_cred(&min_stat, &text->server_creds);
++        text->server_creds = GSS_C_NO_CREDENTIAL;
++     }
++
+   cleanup:
+     if (client_name_MN) {
+ 	GSS_LOCK_MUTEX(params->utils);
diff --git a/debian/patches/0027-Include-sys-types.h-in-sasl.h.patch b/debian/patches/0027-Include-sys-types.h-in-sasl.h.patch
new file mode 100644
index 0000000..24f43e4
--- /dev/null
+++ b/debian/patches/0027-Include-sys-types.h-in-sasl.h.patch
@@ -0,0 +1,22 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:05 +0100
+Subject: Include sys/types.h in sasl.h
+
+---
+ include/sasl.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/sasl.h b/include/sasl.h
+index fef4d51..d52269f 100755
+--- a/include/sasl.h
++++ b/include/sasl.h
+@@ -223,6 +223,8 @@ extern "C" {
+  * they must be called before all other SASL functions:
+  */
+ 
++#include <sys/types.h>
++
+ /* memory allocation functions which may optionally be replaced:
+  */
+ typedef void *sasl_malloc_t(size_t);
diff --git a/debian/patches/0044_debug_log_typo_fix.patch b/debian/patches/0028-Fix-typo-in-debugging-logs.patch
similarity index 59%
rename from debian/patches/0044_debug_log_typo_fix.patch
rename to debian/patches/0028-Fix-typo-in-debugging-logs.patch
index 779bb8f..c508964 100644
--- a/debian/patches/0044_debug_log_typo_fix.patch
+++ b/debian/patches/0028-Fix-typo-in-debugging-logs.patch
@@ -1,8 +1,17 @@
-Author: Roberto C. Sanchez <roberto at connexer.com>
-Description: Fix transposition of realm and service in debug log (Closes: #732373)
---- cyrus-sasl2.git.orig/saslauthd/cache.c
-+++ cyrus-sasl2.git/saslauthd/cache.c
-@@ -264,7 +264,7 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:05 +0100
+Subject: Fix typo in debugging logs
+
+---
+ saslauthd/cache.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/saslauthd/cache.c b/saslauthd/cache.c
+index 2b78464..b13171d 100644
+--- a/saslauthd/cache.c
++++ b/saslauthd/cache.c
+@@ -264,7 +264,7 @@ int cache_lookup(const char *user, const char *realm, const char *service, const
  		if (memcmp(pwd_digest, read_bucket->pwd_digest, 16) == 0) {
  
  			if (flags & VERBOSE)
@@ -11,7 +20,7 @@ Description: Fix transposition of realm and service in debug log (Closes: #73237
  
  			cache_un_lock(hash_offset);
  			table_stats->hits++;
-@@ -272,14 +272,14 @@
+@@ -272,14 +272,14 @@ int cache_lookup(const char *user, const char *realm, const char *service, const
  		}
  
  		if (flags & VERBOSE)
diff --git a/debian/patches/0045_revert_upstream_soname_bump.patch b/debian/patches/0029-Revert-upstream-soname-bump.patch
similarity index 64%
rename from debian/patches/0045_revert_upstream_soname_bump.patch
rename to debian/patches/0029-Revert-upstream-soname-bump.patch
index d6f5e21..9260699 100644
--- a/debian/patches/0045_revert_upstream_soname_bump.patch
+++ b/debian/patches/0029-Revert-upstream-soname-bump.patch
@@ -1,7 +1,18 @@
-Author: Roberto C. Sanchez <roberto at connexer.com>
-Description: Revert upstream's SONAME bump, which was introduced in upstream version 2.1.26.  SONAME breakage was previously handled in Debian and a bump is not required at this time.
---- cyrus-sasl2.git.orig/lib/Makefile.am
-+++ cyrus-sasl2.git/lib/Makefile.am
+From: =?utf-8?q?Ond=C5=99ej_Sur=C3=BD?= <ondrej at debian.org>
+Date: Thu, 24 Mar 2016 11:35:05 +0100
+Subject: Revert upstream soname bump
+
+---
+ lib/Makefile.am     | 2 +-
+ lib/Makefile.in     | 2 +-
+ plugins/Makefile.am | 2 +-
+ plugins/Makefile.in | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 16b14f4..9777457 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
 @@ -43,7 +43,7 @@
  # Library version info - here at the top, for sanity
  # See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
@@ -11,9 +22,11 @@ Description: Revert upstream's SONAME bump, which was introduced in upstream ver
  
  INCLUDES=-DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
  
---- cyrus-sasl2.git.orig/lib/Makefile.in
-+++ cyrus-sasl2.git/lib/Makefile.in
-@@ -319,7 +319,7 @@
+diff --git a/lib/Makefile.in b/lib/Makefile.in
+index c1fefd8..629947b 100644
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
+@@ -319,7 +319,7 @@ top_srcdir = @top_srcdir@
  # Library version info - here at the top, for sanity
  # See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
  # CURRENT:REVISION:AGE
@@ -22,8 +35,10 @@ Description: Revert upstream's SONAME bump, which was introduced in upstream ver
  INCLUDES = -DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
  EXTRA_DIST = windlopen.c staticopen.h NTMakefile
  EXTRA_LIBRARIES = libsasl2.a
---- cyrus-sasl2.git.orig/plugins/Makefile.am
-+++ cyrus-sasl2.git/plugins/Makefile.am
+diff --git a/plugins/Makefile.am b/plugins/Makefile.am
+index d570de1..ce1af46 100644
+--- a/plugins/Makefile.am
++++ b/plugins/Makefile.am
 @@ -47,7 +47,7 @@
  # Library version info - here at the top, for sanity
  # See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
@@ -33,9 +48,11 @@ Description: Revert upstream's SONAME bump, which was introduced in upstream ver
  
  INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
  AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)
---- cyrus-sasl2.git.orig/plugins/Makefile.in
-+++ cyrus-sasl2.git/plugins/Makefile.in
-@@ -362,7 +362,7 @@
+diff --git a/plugins/Makefile.in b/plugins/Makefile.in
+index da7956f..4c96dea 100644
+--- a/plugins/Makefile.in
++++ b/plugins/Makefile.in
+@@ -362,7 +362,7 @@ top_srcdir = @top_srcdir@
  # Library version info - here at the top, for sanity
  # See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
  # CURRENT:REVISION:AGE
diff --git a/debian/patches/0029_ldap_fixes.patch b/debian/patches/0029_ldap_fixes.patch
deleted file mode 100644
index 2c6c59c..0000000
--- a/debian/patches/0029_ldap_fixes.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- cyrus-sasl2.orig/plugins/ldapdb.c
-+++ cyrus-sasl2/plugins/ldapdb.c
-@@ -251,6 +251,8 @@ static int ldapdb_auxprop_lookup(void *g
- 
- #if defined(LDAP_PROXY_AUTHZ_FAILURE)
- 	case LDAP_PROXY_AUTHZ_FAILURE:
-+#elif defined(LDAP_X_PROXY_AUTHZ_FAILURE)
-+	case LDAP_X_PROXY_AUTHZ_FAILURE:
- #endif
- 	case LDAP_INAPPROPRIATE_AUTH:
- 	case LDAP_INVALID_CREDENTIALS:
diff --git a/debian/patches/0030-Fix-return-SASL_FAIL-in-void-sasl_dispose.patch b/debian/patches/0030-Fix-return-SASL_FAIL-in-void-sasl_dispose.patch
new file mode 100644
index 0000000..f0cf603
--- /dev/null
+++ b/debian/patches/0030-Fix-return-SASL_FAIL-in-void-sasl_dispose.patch
@@ -0,0 +1,22 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:05 +0100
+Subject: Fix 'return SASL_FAIL;' in void sasl_dispose()
+
+---
+ lib/common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/common.c b/lib/common.c
+index 1df5702..74ebac8 100644
+--- a/lib/common.c
++++ b/lib/common.c
+@@ -841,7 +841,7 @@ void sasl_dispose(sasl_conn_t **pconn)
+ 
+   if (!free_mutex || free_mutex == 0x1)
+     free_mutex = sasl_MUTEX_ALLOC();
+-  if (!free_mutex) return SASL_FAIL;
++  if (!free_mutex) return;
+ 
+   result = sasl_MUTEX_LOCK(free_mutex);
+   if (result!=SASL_OK) return;
diff --git a/debian/patches/properly-create-libsasl2.pc.patch b/debian/patches/0031-properly-create-libsasl2.pc.patch
similarity index 54%
rename from debian/patches/properly-create-libsasl2.pc.patch
rename to debian/patches/0031-properly-create-libsasl2.pc.patch
index bd569b9..bb1c624 100644
--- a/debian/patches/properly-create-libsasl2.pc.patch
+++ b/debian/patches/0031-properly-create-libsasl2.pc.patch
@@ -1,15 +1,17 @@
---- cyrus-sasl2.orig/configure.in
-+++ cyrus-sasl2/configure.in
-@@ -1419,7 +1419,6 @@ inline static unsigned int sleep(unsigne
- AM_CONFIG_HEADER(config.h)
- 
- AC_OUTPUT(Makefile
--libsasl2.pc
- include/Makefile
- sasldb/Makefile
- plugins/Makefile
---- cyrus-sasl2.orig/Makefile.am
-+++ cyrus-sasl2/Makefile.am
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:05 +0100
+Subject: properly create libsasl2.pc
+
+---
+ Makefile.am  | 10 ++++++++++
+ configure.in |  1 -
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 220565f..4055bf8 100644
+--- a/Makefile.am
++++ b/Makefile.am
 @@ -43,6 +43,12 @@ AUTOMAKE_OPTIONS = 1.7
  #
  ################################################################
@@ -23,7 +25,7 @@
  ACLOCAL_AMFLAGS = -I cmulocal -I config
  
  if SASLAUTHD
-@@ -78,6 +84,10 @@ EXTRA_DIST=config cmulocal win32 mac dlc
+@@ -78,6 +84,10 @@ EXTRA_DIST=config cmulocal win32 mac dlcompat-20010505 NTMakefile INSTALL.TXT \
  pkgconfigdir = $(libdir)/pkgconfig
  pkgconfig_DATA = libsasl2.pc
  
@@ -34,3 +36,15 @@
  dist-hook:
  	@find $(distdir) -exec chmod o+w {} ';'
  	@find $(distdir) -name CVS -print | xargs -t rm -rf
+diff --git a/configure.in b/configure.in
+index 694a734..ea24213 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1419,7 +1419,6 @@ inline static unsigned int sleep(unsigned int seconds) {
+ AM_CONFIG_HEADER(config.h)
+ 
+ AC_OUTPUT(Makefile
+-libsasl2.pc
+ include/Makefile
+ sasldb/Makefile
+ plugins/Makefile
diff --git a/debian/patches/bug715040.patch b/debian/patches/0032-2.1.26-Allow-CAPABILITY-lines-in-IMAP-login-reply-v4.patch
similarity index 94%
rename from debian/patches/bug715040.patch
rename to debian/patches/0032-2.1.26-Allow-CAPABILITY-lines-in-IMAP-login-reply-v4.patch
index 596af0a..fccdd30 100644
--- a/debian/patches/bug715040.patch
+++ b/debian/patches/0032-2.1.26-Allow-CAPABILITY-lines-in-IMAP-login-reply-v4.patch
@@ -1,14 +1,15 @@
-From 98b21c0aa01d4ef1e05158a79dc3e291e53bee81 Mon Sep 17 00:00:00 2001
 From: Sebastian Pipping <sebastian at pipping.org>
 Date: Fri, 5 Jul 2013 18:34:50 +0200
-Subject: [PATCH] 2.1.26: Allow "* CAPABILITY" lines in IMAP login reply (v4)
+Subject: 2.1.26: Allow "* CAPABILITY" lines in IMAP login reply (v4)
 
 ---
  saslauthd/auth_rimap.c | 125 +++++++++++++++++++++++++++++++++++++++++++------
  1 file changed, 111 insertions(+), 14 deletions(-)
 
---- cyrus-sasl2.orig/saslauthd/auth_rimap.c
-+++ cyrus-sasl2/saslauthd/auth_rimap.c
+diff --git a/saslauthd/auth_rimap.c b/saslauthd/auth_rimap.c
+index bb8eccb..06341d7 100644
+--- a/saslauthd/auth_rimap.c
++++ b/saslauthd/auth_rimap.c
 @@ -3,6 +3,7 @@
  
  /* COPYRIGHT
@@ -17,7 +18,7 @@ Subject: [PATCH] 2.1.26: Allow "* CAPABILITY" lines in IMAP login reply (v4)
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
-@@ -91,6 +92,9 @@ static struct addrinfo *ai = NULL;	/* re
+@@ -91,6 +92,9 @@ static struct addrinfo *ai = NULL;	/* remote authentication host    */
  #define TAG "saslauthd"			/* IMAP command tag */
  #define LOGIN_CMD (TAG " LOGIN ")	/* IMAP login command (with tag) */
  #define LOGOUT_CMD (TAG " LOGOUT ")	/* IMAP logout command (with tag)*/
diff --git a/debian/patches/early-hangup.patch b/debian/patches/0033-Fix-early-hangup-in-ipc_unix.c.patch
similarity index 58%
rename from debian/patches/early-hangup.patch
rename to debian/patches/0033-Fix-early-hangup-in-ipc_unix.c.patch
index b45fb25..9dcf747 100644
--- a/debian/patches/early-hangup.patch
+++ b/debian/patches/0033-Fix-early-hangup-in-ipc_unix.c.patch
@@ -1,11 +1,16 @@
-Description: it is possible for the client side of the socket to miss data
- when the server uses close() immediately after the last write(). To avoid
- this, shutdown down the write side of the socket and wait for the client
- to close the connection (0 byte read) before closing the server side.
-Author: Kees Cook <kees at debian.org>
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:06 +0100
+Subject: Fix early hangup in ipc_unix.c
 
---- cyrus-sasl2.orig/saslauthd/ipc_unix.c
-+++ cyrus-sasl2/saslauthd/ipc_unix.c
+---
+ saslauthd/ipc_unix.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/saslauthd/ipc_unix.c b/saslauthd/ipc_unix.c
+index f82a245..7ef7912 100644
+--- a/saslauthd/ipc_unix.c
++++ b/saslauthd/ipc_unix.c
 @@ -217,6 +217,7 @@ void ipc_loop() {
  
  	int		rc;
diff --git a/debian/patches/0033_fix_segfault_in_GSSAPI.patch b/debian/patches/0033_fix_segfault_in_GSSAPI.patch
deleted file mode 100644
index 3c26e06..0000000
--- a/debian/patches/0033_fix_segfault_in_GSSAPI.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- cyrus-sasl2.orig/plugins/gssapi.c
-+++ cyrus-sasl2/plugins/gssapi.c
-@@ -376,6 +376,7 @@ sasl_gss_encode(void *context, const str
-     }
-     
-     if (output_token->value && output) {
-+	int len;
- 	unsigned char * p;
- 	
- 	ret = _plug_buf_alloc(text->utils,
-@@ -392,11 +393,8 @@ sasl_gss_encode(void *context, const str
- 
- 	p = (unsigned char *) text->encode_buf;
- 	
--	p[0] = (output_token->length>>24) & 0xFF;
--	p[1] = (output_token->length>>16) & 0xFF;
--	p[2] = (output_token->length>>8) & 0xFF;
--	p[3] = output_token->length & 0xFF;
--
-+	len = htonl(output_token->length);
-+	memcpy(text->encode_buf, &len, 4);
- 	memcpy(text->encode_buf + 4, output_token->value, output_token->length);
-     }
-     
diff --git a/debian/patches/CVE-2013-4122.patch b/debian/patches/0034-Handle-NULL-returns-from-glibc-2.17-crypt.patch
similarity index 78%
rename from debian/patches/CVE-2013-4122.patch
rename to debian/patches/0034-Handle-NULL-returns-from-glibc-2.17-crypt.patch
index 8a51bb2..b2e1552 100644
--- a/debian/patches/CVE-2013-4122.patch
+++ b/debian/patches/0034-Handle-NULL-returns-from-glibc-2.17-crypt.patch
@@ -1,4 +1,3 @@
-From dedad73e5e7a75d01a5f3d5a6702ab8ccd2ff40d Mon Sep 17 00:00:00 2001
 From: mancha <mancha1 at hush.com>
 Date: Thu, 11 Jul 2013 10:08:07 +0100
 Subject: Handle NULL returns from glibc 2.17+ crypt()
@@ -12,9 +11,17 @@ When using glibc's crypt(), check return value to avoid a possible
 NULL pointer dereference.
 
 Patch by mancha1 at hush.com.
+---
+ pwcheck/pwcheck_getpwnam.c | 3 ++-
+ pwcheck/pwcheck_getspnam.c | 4 +++-
+ saslauthd/auth_getpwent.c  | 4 +++-
+ saslauthd/auth_shadow.c    | 8 +++-----
+ 4 files changed, 11 insertions(+), 8 deletions(-)
 
---- cyrus-sasl2.orig/pwcheck/pwcheck_getpwnam.c
-+++ cyrus-sasl2/pwcheck/pwcheck_getpwnam.c
+diff --git a/pwcheck/pwcheck_getpwnam.c b/pwcheck/pwcheck_getpwnam.c
+index 4b34222..400289c 100644
+--- a/pwcheck/pwcheck_getpwnam.c
++++ b/pwcheck/pwcheck_getpwnam.c
 @@ -32,6 +32,7 @@ char *userid;
  char *password;
  {
@@ -32,8 +39,10 @@ Patch by mancha1 at hush.com.
  	r = "Incorrect password";
      }
      else {
---- cyrus-sasl2.orig/pwcheck/pwcheck_getspnam.c
-+++ cyrus-sasl2/pwcheck/pwcheck_getspnam.c
+diff --git a/pwcheck/pwcheck_getspnam.c b/pwcheck/pwcheck_getspnam.c
+index 2b11286..6d607bb 100644
+--- a/pwcheck/pwcheck_getspnam.c
++++ b/pwcheck/pwcheck_getspnam.c
 @@ -32,13 +32,15 @@ char *userid;
  char *password;
  {
@@ -51,8 +60,10 @@ Patch by mancha1 at hush.com.
  	return "Incorrect password";
      }
      else {
---- cyrus-sasl2.orig/saslauthd/auth_getpwent.c
-+++ cyrus-sasl2/saslauthd/auth_getpwent.c
+diff --git a/saslauthd/auth_getpwent.c b/saslauthd/auth_getpwent.c
+index fc8029d..d4ebe54 100644
+--- a/saslauthd/auth_getpwent.c
++++ b/saslauthd/auth_getpwent.c
 @@ -77,6 +77,7 @@ auth_getpwent (
  {
      /* VARIABLES */
@@ -71,8 +82,10 @@ Patch by mancha1 at hush.com.
  	if (flags & VERBOSE) {
  	    syslog(LOG_DEBUG, "DEBUG: auth_getpwent: %s: invalid password", login);
  	}
---- cyrus-sasl2.orig/saslauthd/auth_shadow.c
-+++ cyrus-sasl2/saslauthd/auth_shadow.c
+diff --git a/saslauthd/auth_shadow.c b/saslauthd/auth_shadow.c
+index d0efa9a..c00faa3 100644
+--- a/saslauthd/auth_shadow.c
++++ b/saslauthd/auth_shadow.c
 @@ -211,8 +211,8 @@ auth_shadow (
  	RETURN("NO Insufficient permission to access NIS authentication database (saslauthd)");
      }
diff --git a/debian/patches/0034_fix_dovecot_authentication.patch b/debian/patches/0034_fix_dovecot_authentication.patch
deleted file mode 100644
index d3433a1..0000000
--- a/debian/patches/0034_fix_dovecot_authentication.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- cyrus-sasl2.orig/lib/checkpw.c
-+++ cyrus-sasl2/lib/checkpw.c
-@@ -587,16 +587,14 @@ static int read_wait(int fd, unsigned de
- 	    /* Timeout. */
- 	    errno = ETIMEDOUT;
- 	    return -1;
--	case +1:
--	    if (FD_ISSET(fd, &rfds)) {
--		/* Success, file descriptor is readable. */
--		return 0;
--	    }
--	    return -1;
- 	case -1:
- 	    if (errno == EINTR || errno == EAGAIN)
- 		continue;
- 	default:
-+	    if (FD_ISSET(fd, &rfds)) {
-+		/* Success, file descriptor is readable. */
-+		return 0;
-+	    }
- 	    /* Error catch-all. */
- 	    return -1;
- 	}
diff --git a/debian/patches/0035-Fix-auth_rimap-infinite-loop-hang-when-IMAP-server-c.patch b/debian/patches/0035-Fix-auth_rimap-infinite-loop-hang-when-IMAP-server-c.patch
new file mode 100644
index 0000000..0ec867f
--- /dev/null
+++ b/debian/patches/0035-Fix-auth_rimap-infinite-loop-hang-when-IMAP-server-c.patch
@@ -0,0 +1,31 @@
+From: Jered Floyd <jered at convivian.com>
+Date: Thu, 24 Mar 2016 11:36:07 +0100
+Subject: Fix auth_rimap infinite loop (hang) when IMAP server closes
+ connection
+
+---
+ saslauthd/auth_rimap.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/saslauthd/auth_rimap.c b/saslauthd/auth_rimap.c
+index 06341d7..03584ac 100644
+--- a/saslauthd/auth_rimap.c
++++ b/saslauthd/auth_rimap.c
+@@ -494,7 +494,7 @@ auth_rimap (
+         while( select (fds, &perm, NULL, NULL, &timeout ) >0 ) {
+            if ( FD_ISSET(s, &perm) ) {
+               ret = read(s, rbuf+rc, sizeof(rbuf)-rc);
+-              if ( ret<0 ) {
++              if ( ret<=0 ) {
+                  rc = ret;
+                  break;
+               } else {
+@@ -607,7 +607,7 @@ auth_rimap (
+         while( select (fds, &perm, NULL, NULL, &timeout ) >0 ) {
+            if ( FD_ISSET(s, &perm) ) {
+               ret = read(s, rbuf+rc, sizeof(rbuf)-rc);
+-              if ( ret<0 ) {
++              if ( ret<=0 ) {
+                  rc = ret;
+                  break;
+               } else {
diff --git a/debian/patches/0035_temporary_multiarch_fixes.patch b/debian/patches/0035_temporary_multiarch_fixes.patch
deleted file mode 100644
index cc00922..0000000
--- a/debian/patches/0035_temporary_multiarch_fixes.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- cyrus-sasl2.orig/configure.in
-+++ cyrus-sasl2/configure.in
-@@ -277,7 +277,7 @@ AC_ARG_WITH(pam, [  --with-pam=DIR
- if test "$with_pam" != no; then
-   if test -d $with_pam; then
-     CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
--    LDFLAGS="$LDFLAGS -L${with_pam}/lib"
-+    LDFLAGS="$LDFLAGS -L${with_pam}/$DEB_HOST_MULTIARCH/lib"
-   fi
-   AC_CHECK_HEADERS(security/pam_appl.h pam/pam_appl.h)
-   cmu_save_LIBS="$LIBS"
---- cyrus-sasl2.orig/saslauthd/configure.in
-+++ cyrus-sasl2/saslauthd/configure.in
-@@ -95,7 +95,7 @@ AC_ARG_WITH(pam, [  --with-pam=DIR
- if test "$with_pam" != no; then
-   if test -d $with_pam; then
-     CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
--    LDFLAGS="$LDFLAGS -L${with_pam}/lib"
-+    LDFLAGS="$LDFLAGS -L${with_pam}/$DEB_HOST_MULTIARCH/lib"
-   fi
-   cmu_save_LIBS="$LIBS"
-   AC_CHECK_LIB(pam, pam_start, [
diff --git a/debian/patches/0039_fix_canonuser_ldapdb_garbage_in_out_buffer.patch b/debian/patches/0039_fix_canonuser_ldapdb_garbage_in_out_buffer.patch
deleted file mode 100644
index af38218..0000000
--- a/debian/patches/0039_fix_canonuser_ldapdb_garbage_in_out_buffer.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- cyrus-sasl2.orig/plugins/ldapdb.c
-+++ cyrus-sasl2/plugins/ldapdb.c
-@@ -406,6 +406,7 @@ ldapdb_canon_server(void *glob_context,
- 	if ( len > out_max )
- 	    len = out_max;
- 	memcpy(out, bvals[0]->bv_val, len);
-+    out[len] = '\0';
- 	*out_ulen = len;
- 	ber_bvecfree(bvals);
-     }
diff --git a/debian/patches/0042_release_server_creds.patch b/debian/patches/0042_release_server_creds.patch
deleted file mode 100644
index 32cb3d5..0000000
--- a/debian/patches/0042_release_server_creds.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Author: PhantomX
-Description: Release server credentials when longer needed to prevent running out of file descriptors (Closes: #722569).  https://github.com/PhantomX/slackbuilds/blob/master/cyrus-sasl/patches/cyrus-sasl-2.1.26-release-server_creds.patch
-diff -up cyrus-sasl-2.1.26/plugins/gssapi.c.release-server_creds cyrus-sasl-2.1.26/plugins/gssapi.c
---- cyrus-sasl-2.1.26/plugins/gssapi.c.release-server_creds	2012-12-20 17:17:37.000000000 +0100
-+++ cyrus-sasl-2.1.26/plugins/gssapi.c	2012-12-20 17:42:11.498138999 +0100
-@@ -945,6 +945,12 @@ gssapi_server_mech_authneg(context_t *te
- 	ret = SASL_CONTINUE;
-     }
- 
-+    /* Release server creds which are no longer needed */
-+     if ( text->server_creds != GSS_C_NO_CREDENTIAL) {
-+        maj_stat = gss_release_cred(&min_stat, &text->server_creds);
-+        text->server_creds = GSS_C_NO_CREDENTIAL;
-+     }
-+
-   cleanup:
-     if (client_name_MN) {
- 	GSS_LOCK_MUTEX(params->utils);
diff --git a/debian/patches/0043_types_h.patch b/debian/patches/0043_types_h.patch
deleted file mode 100644
index 812625c..0000000
--- a/debian/patches/0043_types_h.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Author: Rex Dieter
-Description: Eliminates "error: typedef 'sasl_malloc_t' is initialized (use decltype instead)".  Patch from https://bugzilla.redhat.com/show_bug.cgi?id=906519 (Closes: #719165)
-diff -up cyrus-sasl-2.1.26/include/sasl.h.size_t cyrus-sasl-2.1.26/include/sasl.h
---- cyrus-sasl-2.1.26/include/sasl.h.size_t	2012-10-12 09:05:48.000000000 -0500
-+++ cyrus-sasl-2.1.26/include/sasl.h	2013-01-31 13:21:04.007739327 -0600
-@@ -223,6 +223,8 @@ extern "C" {
-  * they must be called before all other SASL functions:
-  */
- 
-+#include <sys/types.h>
-+
- /* memory allocation functions which may optionally be replaced:
-  */
- typedef void *sasl_malloc_t(size_t);
diff --git a/debian/patches/0046_fix_void_return.patch b/debian/patches/0046_fix_void_return.patch
deleted file mode 100644
index 7091304..0000000
--- a/debian/patches/0046_fix_void_return.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Author: Arthur Marble <arthur at info9.net>
-Description: Eliminate return value in a function specified to return void (Closes: #739561)
---- cyrus-sasl2.git.orig/lib/common.c
-+++ cyrus-sasl2.git/lib/common.c
-@@ -841,7 +841,7 @@
- 
-   if (!free_mutex || free_mutex == 0x1)
-     free_mutex = sasl_MUTEX_ALLOC();
--  if (!free_mutex) return SASL_FAIL;
-+  if (!free_mutex) return;
- 
-   result = sasl_MUTEX_LOCK(free_mutex);
-   if (result!=SASL_OK) return;
diff --git a/debian/patches/series b/debian/patches/series
index f2a97a3..6697ec8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,34 +1,35 @@
-0001_versioned_symbols.patch
-0002_testsuite.patch
-0003_saslauthd_mdoc.patch
-0005_dbconverter.patch
-0006_library_mutexes.patch
-0009_sasldb_al.patch
-0010_maintainer_mode.patch
-0011_saslauthd_ac_prog_libtool.patch
-0012_xopen_crypt_prototype.patch
-0014_avoid_pic_overwrite.patch
-0017_db4.8.patch
-0025_ld_as_needed.patch
-0026_drop_krb5support_dependency.patch
-0028_autotools_fixes.patch
-0029_ldap_fixes.patch
-0030_dont_use_la_files_for_opening_plugins.patch
-0031_dont_use_-R_when_search_for_sqlite_libraries.patch
-0032_revert_1.103_revision_to_unbreak_GSSAPI.patch
-0033_fix_segfault_in_GSSAPI.patch
-0034_fix_dovecot_authentication.patch
-0035_temporary_multiarch_fixes.patch
-0036_add_reference_to_LDAP_SASLAUTHD_file.patch
-0038_send_imap_logout.patch
-0039_fix_canonuser_ldapdb_garbage_in_out_buffer.patch
-0041_fix_keytab_option_for_MIT_kerberos.patch
-0042_release_server_creds.patch
-0043_types_h.patch
-0044_debug_log_typo_fix.patch
-0045_revert_upstream_soname_bump.patch
-0046_fix_void_return.patch
-properly-create-libsasl2.pc.patch
-bug715040.patch
-early-hangup.patch
-CVE-2013-4122.patch
+0001-Make-the-libsasl2-symbols-versioned.patch
+0002-Use-etc-sasldb2-instead-of-.-sasldb-in-the-testsuite.patch
+0003-Update-saslauthd.conf-location-in-documentation.patch
+0004-Include-dbconverter-2-in-sbin_PROGRAMS-and-set-defau.patch
+0005-Fixes-in-library-mutexes.patch
+0006-Link-with-libsasldb.a-instead-of-libsasldb.al.patch
+0007-Enable-autoconf-maintainer-mode.patch
+0008-Add-libtool-to-saslauthd-autoconf.patch
+0009-Define-_XOPEN_SOURCE-in-auth_shadow.c-to-get-proper-.patch
+0010-Don-t-overwrite-PIC-objects-with-non-PIC-variant.patch
+0011-Look-for-generic-Berkeley-DB-first.patch
+0012-Update-required-libraries-when-ld-as-needed-is-used.patch
+0013-Drop-krb5support-dependency.patch
+0014-Several-autotools-fixes.patch
+0015-LDAP-fixes.patch
+0016-Don-t-use-la-files-for-opening-plugins.patch
+0017-Don-t-use-R-when-searching-for-SQLite-libraries.patch
+0018-Revert-1.103-revision-to-unbreak-GSSAPI.patch
+0019-Fix-segfault-in-GSSAPI.patch
+0020-Fix-dovecot-authentication.patch
+0021-Temporary-multiarch-fixes.patch
+0022-Add-reference-to-LDAP_SASLAUTHD-file-to-the-saslauth.patch
+0023-Send-IMAP-logout.patch
+0024-Fix-canonuser-ldapdb-garbage-in-out-buffer.patch
+0025-Fix-keytab-option-for-MIT-Kerberos.patch
+0026-Release-server-creds-when-they-are-no-longer-needed.patch
+0027-Include-sys-types.h-in-sasl.h.patch
+0028-Fix-typo-in-debugging-logs.patch
+0029-Revert-upstream-soname-bump.patch
+0030-Fix-return-SASL_FAIL-in-void-sasl_dispose.patch
+0031-properly-create-libsasl2.pc.patch
+0032-2.1.26-Allow-CAPABILITY-lines-in-IMAP-login-reply-v4.patch
+0033-Fix-early-hangup-in-ipc_unix.c.patch
+0034-Handle-NULL-returns-from-glibc-2.17-crypt.patch
+0035-Fix-auth_rimap-infinite-loop-hang-when-IMAP-server-c.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cyrus-sasl2/cyrus-sasl2.git



More information about the Pkg-cyrus-sasl2-commits mailing list