Update patches for 2.1.26 release
Ondřej Surý
10 years ago
0 | 0 | Author: Fabian Fagerholm <fabbe@debian.org> |
1 | 1 | Description: Use versioned symbols for libsasl2. |
2 | --- a/lib/Makefile.am | |
3 | +++ b/lib/Makefile.am | |
4 | @@ -62,8 +62,8 @@ LIB_DOOR= @LIB_DOOR@ | |
2 | --- cyrus-sasl2.orig/lib/Makefile.am | |
3 | +++ cyrus-sasl2/lib/Makefile.am | |
4 | @@ -64,8 +64,8 @@ LIB_DOOR= @LIB_DOOR@ | |
5 | 5 | lib_LTLIBRARIES = libsasl2.la |
6 | 6 | |
7 | 7 | libsasl2_la_SOURCES = $(common_sources) $(common_headers) |
13 | 13 | |
14 | 14 | if MACOSX |
15 | 15 | --- /dev/null |
16 | +++ b/Versions | |
16 | +++ cyrus-sasl2/Versions | |
17 | 17 | @@ -0,0 +1,7 @@ |
18 | 18 | +SASL2 { |
19 | 19 | + global: |
0 | 0 | Author: Fabian Fagerholm <fabbe@debian.org> |
1 | 1 | Description: Rename the testsuite program to sasltestsuite and use /etc/sasldb2 |
2 | 2 | instead of ./sasldb as default path for the sasldb database file. |
3 | --- a/utils/testsuite.c | |
4 | +++ b/utils/testsuite.c | |
3 | --- cyrus-sasl2.orig/utils/testsuite.c | |
4 | +++ cyrus-sasl2/utils/testsuite.c | |
5 | 5 | @@ -462,9 +462,9 @@ int good_getopt(void *context __attribut |
6 | 6 | *len = (unsigned) strlen("sasldb"); |
7 | 7 | return SASL_OK; |
0 | 0 | Author: Fabian Fagerholm <fabbe@debian.org> |
1 | 1 | Description: Use the correct path for the saslauthd.conf file, and use another |
2 | 2 | date format (cosmetic). |
3 | --- a/saslauthd/saslauthd.mdoc | |
4 | +++ b/saslauthd/saslauthd.mdoc | |
3 | --- cyrus-sasl2.orig/saslauthd/saslauthd.mdoc | |
4 | +++ cyrus-sasl2/saslauthd/saslauthd.mdoc | |
5 | 5 | @@ -10,7 +10,7 @@ |
6 | 6 | .\" manpage in saslauthd.8 whenever you change this source |
7 | 7 | .\" version. Only the pre-formatted manpage is installed. |
8 | 8 | .\" |
9 | -.Dd 10 24 2002 | |
10 | +.Dd October 24 2002 | |
9 | -.Dd 12 12 2005 | |
10 | +.Dd December 12 2005 | |
11 | 11 | .Dt SASLAUTHD 8 |
12 | 12 | .Os "CMU-SASL" |
13 | 13 | .Sh NAME |
14 | @@ -216,7 +216,7 @@ instead. | |
14 | @@ -221,7 +221,7 @@ instead. | |
15 | 15 | .Em (All platforms that support OpenLDAP 2.0 or higher) |
16 | 16 | .Pp |
17 | 17 | Authenticate against an ldap server. The ldap configuration parameters are |
20 | 20 | changed with the -O parameter. See the LDAP_SASLAUTHD file included with the |
21 | 21 | distribution for the list of available parameters. |
22 | 22 | .It Li sia |
23 | @@ -249,7 +249,7 @@ was never intended to be used in this ma | |
23 | @@ -254,7 +254,7 @@ was never intended to be used in this ma | |
24 | 24 | .Bl -tag -width "/var/run/saslauthd/mux" |
25 | 25 | .It Pa /var/run/saslauthd/mux |
26 | 26 | The default communications socket. |
0 | 0 | Author: Fabian Fagerholm <fabbe@debian.org> |
1 | 1 | Description: Build the dbconverter-2 utility and change the path to the sasldb |
2 | 2 | database file to /etc/sasldb2. |
3 | --- a/utils/Makefile.am | |
4 | +++ b/utils/Makefile.am | |
3 | --- cyrus-sasl2.orig/utils/Makefile.am | |
4 | +++ cyrus-sasl2/utils/Makefile.am | |
5 | 5 | @@ -45,10 +45,10 @@ |
6 | 6 | all_sasl_libs = ../lib/libsasl2.la $(SASL_DB_LIB) $(LIB_SOCKET) |
7 | 7 | 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) |
15 | 15 | |
16 | 16 | if NO_SASL_DB_MANS |
17 | 17 | man_MANS = |
18 | --- a/utils/dbconverter-2.c | |
19 | +++ b/utils/dbconverter-2.c | |
20 | @@ -385,7 +385,7 @@ static struct sasl_callback goodsasl_cb[ | |
18 | --- cyrus-sasl2.orig/utils/dbconverter-2.c | |
19 | +++ cyrus-sasl2/utils/dbconverter-2.c | |
20 | @@ -382,7 +382,7 @@ static struct sasl_callback goodsasl_cb[ | |
21 | 21 | |
22 | 22 | int main(int argc, char **argv) |
23 | 23 | { |
26 | 26 | int result; |
27 | 27 | |
28 | 28 | if (argc > 1) { |
29 | @@ -421,7 +421,7 @@ int main(int argc, char **argv) | |
29 | @@ -418,7 +418,7 @@ int main(int argc, char **argv) | |
30 | 30 | |
31 | 31 | printf("\nThis program will take the sasldb file specified on the\n" |
32 | 32 | "command line and convert it to a new sasldb file in the default\n" |
0 | 0 | Author: Fabian Fagerholm <fabbe@debian.org> |
1 | 1 | Description: Exact description unknown; make sure mutex-related code works. |
2 | --- a/lib/common.c | |
3 | +++ b/lib/common.c | |
2 | --- cyrus-sasl2.orig/lib/common.c | |
3 | +++ cyrus-sasl2/lib/common.c | |
4 | 4 | @@ -818,7 +818,7 @@ int _sasl_common_init(sasl_global_callba |
5 | 5 | result = sasl_canonuser_add_plugin("INTERNAL", internal_canonuser_init); |
6 | 6 | if(result != SASL_OK) return result; |
0 | 0 | Author: Fabian Fagerholm <fabbe@debian.org> |
1 | 1 | Description: Fix linking with libsasldb.a when saslauthd is built with sasldb |
2 | 2 | support. |
3 | --- a/saslauthd/configure.in | |
4 | +++ b/saslauthd/configure.in | |
3 | --- cyrus-sasl2.orig/saslauthd/configure.in | |
4 | +++ cyrus-sasl2/saslauthd/configure.in | |
5 | 5 | @@ -77,7 +77,7 @@ if test "$authsasldb" != no; then |
6 | 6 | AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support]) |
7 | 7 | SASL_DB_PATH_CHECK() |
0 | 0 | Author: Fabian Fagerholm <fabbe@debian.org> |
1 | 1 | Description: Enable maintainer mode to avoid auto* problems. |
2 | --- a/configure.in | |
3 | +++ b/configure.in | |
2 | --- cyrus-sasl2.orig/configure.in | |
3 | +++ cyrus-sasl2/configure.in | |
4 | 4 | @@ -62,6 +62,8 @@ dnl |
5 | AM_INIT_AUTOMAKE(cyrus-sasl, 2.1.25) | |
5 | AM_INIT_AUTOMAKE(cyrus-sasl, 2.1.26) | |
6 | 6 | CMU_INIT_AUTOMAKE |
7 | 7 | |
8 | 8 | +AM_MAINTAINER_MODE |
0 | 0 | Author: Fabian Fagerholm <fabbe@debian.org> |
1 | 1 | Description: Enable libtool use. |
2 | --- a/saslauthd/configure.in | |
3 | +++ b/saslauthd/configure.in | |
2 | --- cyrus-sasl2.orig/saslauthd/configure.in | |
3 | +++ cyrus-sasl2/saslauthd/configure.in | |
4 | 4 | @@ -25,6 +25,7 @@ AC_PROG_AWK |
5 | 5 | AC_PROG_MAKE_SET |
6 | 6 | AC_PROG_LN_S |
5 | 5 | for build log lines such as the following: |
6 | 6 | auth_shadow.c:183: warning: implicit declaration of function ‘crypt’ |
7 | 7 | auth_shadow.c:183: warning: cast to pointer from integer of different size |
8 | --- a/saslauthd/auth_shadow.c | |
9 | +++ b/saslauthd/auth_shadow.c | |
8 | --- cyrus-sasl2.orig/saslauthd/auth_shadow.c | |
9 | +++ cyrus-sasl2/saslauthd/auth_shadow.c | |
10 | 10 | @@ -36,6 +36,7 @@ |
11 | 11 | |
12 | 12 | #ifdef AUTH_SHADOW |
3 | 3 | which is created out of PIC objects. The PIC version is placed in .libs, and |
4 | 4 | the non-PIC version in the current directory. This ensures that both non-PIC |
5 | 5 | and PIC versions are available in the correct locations. |
6 | --- a/lib/Makefile.am | |
7 | +++ b/lib/Makefile.am | |
8 | @@ -78,7 +78,7 @@ endif | |
6 | --- cyrus-sasl2.orig/lib/Makefile.am | |
7 | +++ cyrus-sasl2/lib/Makefile.am | |
8 | @@ -80,7 +80,7 @@ endif | |
9 | 9 | |
10 | 10 | libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS) |
11 | 11 | @echo adding static plugins and dependencies |
14 | 14 | @for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \ |
15 | 15 | if test ! -f $$i; then continue; fi; . $$i; \ |
16 | 16 | for j in $$dependency_libs foo; do \ |
17 | --- a/sasldb/Makefile.am | |
18 | +++ b/sasldb/Makefile.am | |
17 | --- cyrus-sasl2.orig/sasldb/Makefile.am | |
18 | +++ cyrus-sasl2/sasldb/Makefile.am | |
19 | 19 | @@ -63,6 +63,6 @@ libsasldb_a_SOURCES = |
20 | 20 | EXTRA_libsasldb_a_SOURCES = |
21 | 21 |
0 | 0 | Author: Fabian Fagerholm <fabbe@debian.org> |
1 | 1 | Description: Support and build against db4.8. |
2 | --- a/cmulocal/berkdb.m4 | |
3 | +++ b/cmulocal/berkdb.m4 | |
2 | --- cyrus-sasl2.orig/cmulocal/berkdb.m4 | |
3 | +++ cyrus-sasl2/cmulocal/berkdb.m4 | |
4 | 4 | @@ -213,7 +213,7 @@ AC_DEFUN([CYRUS_BERKELEY_DB_CHK_LIB], |
5 | 5 | fi |
6 | 6 | |
7 | 7 | saved_LIBS=$LIBS |
8 | - for dbname in ${with_bdb} db-4.7 db4.7 db47 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db | |
9 | + for dbname in ${with_bdb} db | |
10 | do | |
11 | LIBS="$saved_LIBS -l$dbname" | |
12 | AC_TRY_LINK([#include <stdio.h> | |
8 | - for dbname in ${with_bdb} \ | |
9 | + for dbname in ${with_bdb} db \ | |
10 | db-5.2 db5.2 db52 \ | |
11 | db-5.1 db5.2 db51 \ | |
12 | db-5.0 db5.2 db50 \ |
0 | 0 | Author: Matthias Klose <doko@ubuntu.com> |
1 | 1 | Desription: Fix FTBFS, add $(SASL_DB_LIB) as dependency to libsasldb, and use |
2 | 2 | it. |
3 | --- a/saslauthd/Makefile.am | |
4 | +++ b/saslauthd/Makefile.am | |
3 | --- cyrus-sasl2.orig/saslauthd/Makefile.am | |
4 | +++ cyrus-sasl2/saslauthd/Makefile.am | |
5 | 5 | @@ -16,7 +16,7 @@ EXTRA_saslauthd_sources = getaddrinfo.c |
6 | 6 | saslauthd_DEPENDENCIES = saslauthd-main.o @LTLIBOBJS@ |
7 | 7 | saslauthd_LDADD = @SASL_KRB_LIB@ \ |
11 | 11 | |
12 | 12 | testsaslauthd_SOURCES = testsaslauthd.c utils.c |
13 | 13 | testsaslauthd_LDADD = @LIB_SOCKET@ |
14 | --- a/sasldb/Makefile.am | |
15 | +++ b/sasldb/Makefile.am | |
14 | --- cyrus-sasl2.orig/sasldb/Makefile.am | |
15 | +++ cyrus-sasl2/sasldb/Makefile.am | |
16 | 16 | @@ -55,8 +55,8 @@ noinst_LIBRARIES = libsasldb.a |
17 | 17 | |
18 | 18 | libsasldb_la_SOURCES = allockey.c sasldb.h |
0 | 0 | Author: Roberto C. Sanchez <roberto@connexer.com> |
1 | 1 | Description: Drop gratuitous dependency on krb5support |
2 | --- a/cmulocal/sasl2.m4 | |
3 | +++ b/cmulocal/sasl2.m4 | |
2 | --- cyrus-sasl2.orig/cmulocal/sasl2.m4 | |
3 | +++ cyrus-sasl2/cmulocal/sasl2.m4 | |
4 | 4 | @@ -112,9 +112,6 @@ if test "$gssapi" != no; then |
5 | 5 | fi |
6 | 6 |
0 | Author: Ondřej Surý <ondrej@debian.org> | |
1 | Description: Support newer Berkeley DB versions | |
2 | --- a/sasldb/db_berkeley.c | |
3 | +++ b/sasldb/db_berkeley.c | |
4 | @@ -101,7 +101,7 @@ static int berkeleydb_open(const sasl_ut | |
5 | ret = db_create(mbdb, NULL, 0); | |
6 | if (ret == 0 && *mbdb != NULL) | |
7 | { | |
8 | -#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1 | |
9 | +#if (DB_VERSION_MAJOR > 4) || ((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1)) | |
10 | ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, flags, 0660); | |
11 | #else | |
12 | ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, flags, 0660); | |
13 | --- a/utils/dbconverter-2.c | |
14 | +++ b/utils/dbconverter-2.c | |
15 | @@ -214,7 +214,7 @@ static int berkeleydb_open(const char *p | |
16 | ret = db_create(mbdb, NULL, 0); | |
17 | if (ret == 0 && *mbdb != NULL) | |
18 | { | |
19 | -#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1 | |
20 | +#if (DB_VERSION_MAJOR > 4) || ((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1)) | |
21 | ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, DB_CREATE, 0664); | |
22 | #else | |
23 | ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, DB_CREATE, 0664); |
0 | --- a/configure.in | |
1 | +++ b/configure.in | |
0 | --- cyrus-sasl2.orig/configure.in | |
1 | +++ cyrus-sasl2/configure.in | |
2 | 2 | @@ -44,6 +44,8 @@ dnl |
3 | 3 | AC_INIT(lib/saslint.h) |
4 | 4 | AC_PREREQ([2.54]) |
8 | 8 | dnl use ./config.cache as the default cache file. |
9 | 9 | dnl we require a cache file to successfully configure our build. |
10 | 10 | if test $cache_file = "/dev/null"; then |
11 | --- a/Makefile.am | |
12 | +++ b/Makefile.am | |
11 | --- cyrus-sasl2.orig/Makefile.am | |
12 | +++ cyrus-sasl2/Makefile.am | |
13 | 13 | @@ -43,6 +43,8 @@ AUTOMAKE_OPTIONS = 1.7 |
14 | 14 | # |
15 | 15 | ################################################################ |
19 | 19 | if SASLAUTHD |
20 | 20 | SAD = saslauthd |
21 | 21 | else |
22 | --- a/saslauthd/configure.in | |
23 | +++ b/saslauthd/configure.in | |
22 | --- cyrus-sasl2.orig/saslauthd/configure.in | |
23 | +++ cyrus-sasl2/saslauthd/configure.in | |
24 | 24 | @@ -1,7 +1,8 @@ |
25 | 25 | AC_INIT(mechanisms.h) |
26 | 26 | AC_PREREQ([2.54]) |
77 | 77 | AC_DEFINE(HAVE_FUNCTION,[],[Does compiler understand __FUNCTION__]) |
78 | 78 | fi |
79 | 79 | fi |
80 | --- a/saslauthd/Makefile.am | |
81 | +++ b/saslauthd/Makefile.am | |
80 | --- cyrus-sasl2.orig/saslauthd/Makefile.am | |
81 | +++ cyrus-sasl2/saslauthd/Makefile.am | |
82 | 82 | @@ -1,4 +1,6 @@ |
83 | 83 | AUTOMAKE_OPTIONS = 1.7 |
84 | 84 | +ACLOCAL_AMFLAGS = -I ../cmulocal -I ../config |
86 | 86 | sbin_PROGRAMS = saslauthd testsaslauthd |
87 | 87 | EXTRA_PROGRAMS = saslcache |
88 | 88 | |
89 | --- a/config/kerberos_v4.m4 | |
90 | +++ b/config/kerberos_v4.m4 | |
89 | --- cyrus-sasl2.orig/config/kerberos_v4.m4 | |
90 | +++ cyrus-sasl2/config/kerberos_v4.m4 | |
91 | 91 | @@ -89,18 +89,18 @@ AC_DEFUN([SASL_KERBEROS_V4_CHK], [ |
92 | 92 | dnl if we were ambitious, we would look more aggressively for the |
93 | 93 | dnl krb4 install |
0 | --- a/plugins/ldapdb.c | |
1 | +++ b/plugins/ldapdb.c | |
0 | --- cyrus-sasl2.orig/plugins/ldapdb.c | |
1 | +++ cyrus-sasl2/plugins/ldapdb.c | |
2 | 2 | @@ -251,6 +251,8 @@ static int ldapdb_auxprop_lookup(void *g |
3 | 3 | |
4 | 4 | #if defined(LDAP_PROXY_AUTHZ_FAILURE) |
0 | --- a/lib/dlopen.c | |
1 | +++ b/lib/dlopen.c | |
0 | --- cyrus-sasl2.orig/lib/dlopen.c | |
1 | +++ cyrus-sasl2/lib/dlopen.c | |
2 | 2 | @@ -247,105 +247,6 @@ static int _sasl_plugin_load(char *plugi |
3 | 3 | return result; |
4 | 4 | } |
0 | --- a/configure.in | |
1 | +++ b/configure.in | |
0 | --- cyrus-sasl2.orig/configure.in | |
1 | +++ cyrus-sasl2/configure.in | |
2 | 2 | @@ -865,9 +865,9 @@ case "$with_sqlite" in |
3 | 3 | notfound) AC_WARN([SQLite Library not found]); true;; |
4 | 4 | *) |
0 | --- a/plugins/gssapi.c | |
1 | +++ b/plugins/gssapi.c | |
2 | @@ -1480,10 +1480,10 @@ static int gssapi_client_mech_step(void | |
0 | --- cyrus-sasl2.orig/plugins/gssapi.c | |
1 | +++ cyrus-sasl2/plugins/gssapi.c | |
2 | @@ -1583,10 +1583,10 @@ static int gssapi_client_mech_step(void | |
3 | 3 | } |
4 | 4 | |
5 | 5 | /* Setup req_flags properly */ |
0 | --- a/plugins/gssapi.c | |
1 | +++ b/plugins/gssapi.c | |
2 | @@ -370,7 +370,7 @@ sasl_gss_encode(void *context, const str | |
0 | --- cyrus-sasl2.orig/plugins/gssapi.c | |
1 | +++ cyrus-sasl2/plugins/gssapi.c | |
2 | @@ -376,6 +376,7 @@ sasl_gss_encode(void *context, const str | |
3 | 3 | } |
4 | 4 | |
5 | 5 | if (output_token->value && output) { |
6 | - unsigned char * p = (unsigned char *) text->encode_buf; | |
7 | 6 | + int len; |
7 | unsigned char * p; | |
8 | 8 | |
9 | 9 | ret = _plug_buf_alloc(text->utils, |
10 | &(text->encode_buf), | |
11 | @@ -384,11 +384,8 @@ sasl_gss_encode(void *context, const str | |
12 | return ret; | |
13 | } | |
10 | @@ -392,11 +393,8 @@ sasl_gss_encode(void *context, const str | |
11 | ||
12 | p = (unsigned char *) text->encode_buf; | |
14 | 13 | |
15 | 14 | - p[0] = (output_token->length>>24) & 0xFF; |
16 | 15 | - p[1] = (output_token->length>>16) & 0xFF; |
0 | Index: cyrus-sasl2-2.1.25.dfsg1/saslauthd/auth_rimap.c | |
1 | =================================================================== | |
2 | --- cyrus-sasl2-2.1.25.dfsg1.orig/saslauthd/auth_rimap.c 2013-05-16 15:36:35.000000000 +0000 | |
3 | +++ cyrus-sasl2-2.1.25.dfsg1/saslauthd/auth_rimap.c 2013-05-16 15:43:24.000000000 +0000 | |
4 | @@ -1,3 +1,4 @@ | |
5 | + | |
6 | /* MODULE: auth_rimap */ | |
7 | ||
8 | /* COPYRIGHT | |
9 | @@ -367,6 +368,39 @@ | |
10 | alarm(NETWORK_IO_TIMEOUT); | |
11 | rc = read(s, rbuf, sizeof(rbuf)); | |
12 | alarm(0); | |
13 | + if ( rc>0 ) { | |
14 | + /* check if there is more to read */ | |
15 | + fd_set perm; | |
16 | + int fds, ret, loopc; | |
17 | + struct timeval timeout; | |
18 | + | |
19 | + FD_ZERO(&perm); | |
20 | + FD_SET(s, &perm); | |
21 | + fds = s +1; | |
22 | + | |
23 | + timeout.tv_sec = 1; | |
24 | + timeout.tv_usec = 0; | |
25 | + loopc = 0; | |
26 | + while( select (fds, &perm, NULL, NULL, &timeout ) >0 ) { | |
27 | + if ( FD_ISSET(s, &perm) ) { | |
28 | + ret = read(s, rbuf+rc, sizeof(rbuf)-rc); | |
29 | + if ( ret<0 ) { | |
30 | + rc = ret; | |
31 | + break; | |
32 | + } else { | |
33 | + if (ret == 0) { | |
34 | + loopc += 1; | |
35 | + } else { | |
36 | + loopc = 0; | |
37 | + } | |
38 | + if (loopc > sizeof(rbuf)) { // arbitrary chosen value | |
39 | + break; | |
40 | + } | |
41 | + rc += ret; | |
42 | + } | |
43 | + } | |
44 | + } | |
45 | + } | |
46 | if (rc == -1) { | |
47 | syslog(LOG_WARNING, "auth_rimap: read (banner): %m"); | |
48 | (void) close(s); | |
49 | @@ -456,6 +490,39 @@ | |
50 | alarm(NETWORK_IO_TIMEOUT); | |
51 | rc = read(s, rbuf, sizeof(rbuf)); | |
52 | alarm(0); | |
53 | + if ( rc>0 ) { | |
54 | + /* check if there is more to read */ | |
55 | + fd_set perm; | |
56 | + int fds, ret, loopc; | |
57 | + struct timeval timeout; | |
58 | + | |
59 | + FD_ZERO(&perm); | |
60 | + FD_SET(s, &perm); | |
61 | + fds = s +1; | |
62 | + | |
63 | + timeout.tv_sec = 1; | |
64 | + timeout.tv_usec = 0; | |
65 | + loopc = 0; | |
66 | + while( select (fds, &perm, NULL, NULL, &timeout ) >0 ) { | |
67 | + if ( FD_ISSET(s, &perm) ) { | |
68 | + ret = read(s, rbuf+rc, sizeof(rbuf)-rc); | |
69 | + if ( ret<0 ) { | |
70 | + rc = ret; | |
71 | + break; | |
72 | + } else { | |
73 | + if (ret == 0) { | |
74 | + loopc += 1; | |
75 | + } else { | |
76 | + loopc = 0; | |
77 | + } | |
78 | + if (loopc > sizeof(rbuf)) { // arbitrary chosen value | |
79 | + break; | |
80 | + } | |
81 | + rc += ret; | |
82 | + } | |
83 | + } | |
84 | + } | |
85 | + } | |
86 | (void) close(s); /* we're done with the remote */ | |
87 | if (rc == -1) { | |
88 | syslog(LOG_WARNING, "auth_rimap: read (response): %m"); | |
89 | Index: cyrus-sasl2-2.1.25.dfsg1/lib/checkpw.c | |
90 | =================================================================== | |
91 | --- cyrus-sasl2-2.1.25.dfsg1.orig/lib/checkpw.c 2013-05-16 15:36:35.000000000 +0000 | |
92 | +++ cyrus-sasl2-2.1.25.dfsg1/lib/checkpw.c 2013-05-16 15:36:53.000000000 +0000 | |
93 | @@ -587,16 +587,14 @@ | |
0 | --- cyrus-sasl2.orig/lib/checkpw.c | |
1 | +++ cyrus-sasl2/lib/checkpw.c | |
2 | @@ -587,16 +587,14 @@ static int read_wait(int fd, unsigned de | |
94 | 3 | /* Timeout. */ |
95 | 4 | errno = ETIMEDOUT; |
96 | 5 | return -1; |
0 | --- a/configure.in | |
1 | +++ b/configure.in | |
0 | --- cyrus-sasl2.orig/configure.in | |
1 | +++ cyrus-sasl2/configure.in | |
2 | 2 | @@ -277,7 +277,7 @@ AC_ARG_WITH(pam, [ --with-pam=DIR |
3 | 3 | if test "$with_pam" != no; then |
4 | 4 | if test -d $with_pam; then |
8 | 8 | fi |
9 | 9 | AC_CHECK_HEADERS(security/pam_appl.h pam/pam_appl.h) |
10 | 10 | cmu_save_LIBS="$LIBS" |
11 | --- a/saslauthd/configure.in | |
12 | +++ b/saslauthd/configure.in | |
11 | --- cyrus-sasl2.orig/saslauthd/configure.in | |
12 | +++ cyrus-sasl2/saslauthd/configure.in | |
13 | 13 | @@ -95,7 +95,7 @@ AC_ARG_WITH(pam, [ --with-pam=DIR |
14 | 14 | if test "$with_pam" != no; then |
15 | 15 | if test -d $with_pam; then |
0 | --- a/saslauthd/saslauthd.8 | |
1 | +++ b/saslauthd/saslauthd.8 | |
2 | @@ -156,8 +156,8 @@ AAUUTTHHEENNTTIICCAATTIIOON | |
0 | --- cyrus-sasl2.orig/saslauthd/saslauthd.8 | |
1 | +++ cyrus-sasl2/saslauthd/saslauthd.8 | |
2 | @@ -158,8 +158,8 @@ AAUUTTHHEENNTTIICCAATTIIOON | |
3 | 3 | Authenticate against an ldap server. The ldap configuration |
4 | 4 | parameters are read from /usr/local/etc/saslauthd.conf. The |
5 | 5 | location of this file can be changed with the -O parameter. |
10 | 10 | |
11 | 11 | sia _(_D_i_g_i_t_a_l _U_N_I_X_) |
12 | 12 | |
13 | --- a/saslauthd/saslauthd.mdoc | |
14 | +++ b/saslauthd/saslauthd.mdoc | |
15 | @@ -217,8 +217,8 @@ instead. | |
13 | --- cyrus-sasl2.orig/saslauthd/saslauthd.mdoc | |
14 | +++ cyrus-sasl2/saslauthd/saslauthd.mdoc | |
15 | @@ -222,8 +222,8 @@ instead. | |
16 | 16 | .Pp |
17 | 17 | Authenticate against an ldap server. The ldap configuration parameters are |
18 | 18 | read from /etc/saslauthd.conf. The location of this file can be |
0 | --- a/saslauthd/auth_rimap.c | |
1 | +++ b/saslauthd/auth_rimap.c | |
0 | --- cyrus-sasl2.orig/saslauthd/auth_rimap.c | |
1 | +++ cyrus-sasl2/saslauthd/auth_rimap.c | |
2 | 2 | @@ -90,6 +90,7 @@ static struct addrinfo *ai = NULL; /* re |
3 | 3 | service we connect to. */ |
4 | 4 | #define TAG "saslauthd" /* IMAP command tag */ |
20 | 20 | char rbuf[RESP_LEN]; /* response read buffer */ |
21 | 21 | char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV]; |
22 | 22 | int saved_errno; |
23 | @@ -523,6 +526,24 @@ auth_rimap ( | |
23 | @@ -505,6 +508,24 @@ auth_rimap ( | |
24 | 24 | } |
25 | 25 | } |
26 | 26 | } |
0 | --- a/plugins/ldapdb.c | |
1 | +++ b/plugins/ldapdb.c | |
0 | --- cyrus-sasl2.orig/plugins/ldapdb.c | |
1 | +++ cyrus-sasl2/plugins/ldapdb.c | |
2 | 2 | @@ -406,6 +406,7 @@ ldapdb_canon_server(void *glob_context, |
3 | 3 | if ( len > out_max ) |
4 | 4 | len = out_max; |
10 | 10 | 0017_db4.8.diff |
11 | 11 | 0025_ld_as_needed.diff |
12 | 12 | 0026_drop_krb5support_dependency.diff |
13 | 0027_db5_support.diff | |
14 | 13 | 0028-autotools_fixes.patch |
15 | 14 | 0029-ldap_fixes.patch |
16 | 15 | 0030-dont_use_la_files_for_opening_plugins.patch |
17 | 16 | 0031-dont_use_-R_when_search_for_sqlite_libraries.patch |
18 | 17 | 0032-revert_1.103_revision_to_unbreak_GSSAPI.patch |
19 | 0033-fix_segfault_in_GSSAPI.patch | |
20 | 0034-fix_dovecot_authentication.patch | |
21 | 18 | 0035-temporary_multiarch_fixes.patch |
22 | 19 | 0036-add-reference-to-LDAP_SASLAUTHD-file.patch |
23 | 0037-abort_if_no_fqdn_fix.patch | |
24 | 20 | 0038-send_imap_logout.patch |
25 | 21 | 0039-fix-canonuser-ldapdb-garbage-in-out-buffer.patch |