Refresh patches for 2.4.27~rc4 release
Ondřej Surý
6 years ago
22 | 22 | +HIDDEN { local: __*; _rest*; _save*; *; }; |
23 | 23 | + |
24 | 24 | diff --git a/lib/Makefile.am b/lib/Makefile.am |
25 | index 4e68e32..36f18fa 100644 | |
25 | index 8d4fefa..03dba39 100644 | |
26 | 26 | --- a/lib/Makefile.am |
27 | 27 | +++ b/lib/Makefile.am |
28 | @@ -73,7 +73,8 @@ libobj_la_SOURCES = | |
28 | @@ -76,7 +76,8 @@ libobj_la_SOURCES = | |
29 | 29 | libobj_la_LIBADD = $(LTLIBOBJS) |
30 | 30 | |
31 | 31 | libsasl2_la_SOURCES = $(common_sources) $(common_headers) |
32 | 32 | -libsasl2_la_LDFLAGS = -version-info $(sasl_version) -no-undefined |
33 | 33 | +libsasl2_la_LDFLAGS = -version-info $(sasl_version) -no-undefined -Wl,--version-script=$(top_srcdir)/Versions |
34 | 34 | +libsasl2_la_DEPENDENCIES = $(LTLIBOBJS) $(top_srcdir)/Versions |
35 | libsasl2_la_LIBADD = libobj.la $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR) | |
35 | libsasl2_la_LIBADD = libobj.la $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR) $(PLUGIN_COMMON_OBJS) | |
36 | 36 | |
37 | 37 | if MACOSX |
7 | 7 | 1 file changed, 3 insertions(+), 3 deletions(-) |
8 | 8 | |
9 | 9 | diff --git a/utils/testsuite.c b/utils/testsuite.c |
10 | index 7e4e852..b687e96 100644 | |
10 | index 12da7f7..9b2a6a7 100644 | |
11 | 11 | --- a/utils/testsuite.c |
12 | 12 | +++ b/utils/testsuite.c |
13 | @@ -462,9 +462,9 @@ int good_getopt(void *context __attribute__((unused)), | |
13 | @@ -461,9 +461,9 @@ int good_getopt(void *context __attribute__((unused)), | |
14 | 14 | *len = (unsigned) strlen("sasldb"); |
15 | 15 | return SASL_OK; |
16 | 16 | } else if (!strcmp(option, "sasldb_path")) { |
22 | 22 | return SASL_OK; |
23 | 23 | } else if (!strcmp(option, "canon_user_plugin")) { |
24 | 24 | *result = cu_plugin; |
25 | @@ -2924,7 +2924,7 @@ void notes(void) | |
25 | @@ -2925,7 +2925,7 @@ void notes(void) | |
26 | 26 | void usage(void) |
27 | 27 | { |
28 | 28 | printf("Usage:\n" \ |
27 | 27 | if NO_SASL_DB_MANS |
28 | 28 | man_MANS = |
29 | 29 | diff --git a/utils/dbconverter-2.c b/utils/dbconverter-2.c |
30 | index 33e18fb..06c2e9a 100644 | |
30 | index c53d403..958aac8 100644 | |
31 | 31 | --- a/utils/dbconverter-2.c |
32 | 32 | +++ b/utils/dbconverter-2.c |
33 | 33 | @@ -382,7 +382,7 @@ static struct sasl_callback goodsasl_cb[] = { |
3 | 3 | Subject: Fixes in library mutexes |
4 | 4 | |
5 | 5 | --- |
6 | lib/common.c | 7 ++++++- | |
7 | 1 file changed, 6 insertions(+), 1 deletion(-) | |
6 | lib/common.c | 6 +++--- | |
7 | 1 file changed, 3 insertions(+), 3 deletions(-) | |
8 | 8 | |
9 | 9 | diff --git a/lib/common.c b/lib/common.c |
10 | index 91ba4af..b83557d 100644 | |
10 | index 14030cd..aea786a 100644 | |
11 | 11 | --- a/lib/common.c |
12 | 12 | +++ b/lib/common.c |
13 | @@ -818,7 +818,7 @@ int _sasl_common_init(sasl_global_callbacks_t *global_callbacks) | |
13 | @@ -816,7 +816,7 @@ int _sasl_common_init(sasl_global_callbacks_t *global_callbacks) | |
14 | 14 | result = sasl_canonuser_add_plugin("INTERNAL", internal_canonuser_init); |
15 | 15 | if(result != SASL_OK) return result; |
16 | 16 | |
19 | 19 | free_mutex = sasl_MUTEX_ALLOC(); |
20 | 20 | } |
21 | 21 | if (!free_mutex) return SASL_FAIL; |
22 | @@ -838,6 +838,11 @@ void sasl_dispose(sasl_conn_t **pconn) | |
22 | @@ -836,10 +836,10 @@ void sasl_dispose(sasl_conn_t **pconn) | |
23 | 23 | |
24 | 24 | /* serialize disposes. this is necessary because we can't |
25 | 25 | dispose of conn->mutex if someone else is locked on it */ |
26 | + | |
27 | + if (!free_mutex || free_mutex == 0x1) | |
28 | + free_mutex = sasl_MUTEX_ALLOC(); | |
29 | + if (!free_mutex) return SASL_FAIL; | |
30 | + | |
26 | - if (!free_mutex) { | |
27 | + if (!free_mutex || free_mutex == 0x1) { | |
28 | free_mutex = sasl_MUTEX_ALLOC(); | |
29 | - if (!free_mutex) return; | |
30 | } | |
31 | + if (!free_mutex) return; | |
32 | ||
31 | 33 | result = sasl_MUTEX_LOCK(free_mutex); |
32 | 34 | if (result!=SASL_OK) return; |
33 |
7 | 7 | 1 file changed, 2 insertions(+) |
8 | 8 | |
9 | 9 | diff --git a/configure.ac b/configure.ac |
10 | index 7dbe02d..770e45c 100644 | |
10 | index cdbedd5..4f2da4c 100644 | |
11 | 11 | --- a/configure.ac |
12 | 12 | +++ b/configure.ac |
13 | 13 | @@ -69,6 +69,8 @@ AC_CANONICAL_TARGET |
14 | 14 | |
15 | AM_INIT_AUTOMAKE([1.11 tar-ustar dist-bzip2 -Wno-portability subdir-objects]) | |
15 | AM_INIT_AUTOMAKE([1.11 tar-ustar dist-bzip2 -Wno-portability subdir-objects foreign]) | |
16 | 16 | |
17 | 17 | +AM_MAINTAINER_MODE |
18 | 18 | + |
0 | From: Debian Cyrus SASL Team | |
1 | <pkg-cyrus-sasl2-debian-devel@lists.alioth.debian.org> | |
2 | Date: Thu, 24 Mar 2016 11:35:03 +0100 | |
3 | Subject: Define _XOPEN_SOURCE in auth_shadow.c to get proper crypt() prototype | |
4 | MIME-Version: 1.0 | |
5 | Content-Type: text/plain; charset="utf-8" | |
6 | Content-Transfer-Encoding: 8bit | |
7 | ||
8 | will define a correct function prototype for the crypt function. This avoids | |
9 | segfaults on architectures where the size of a pointer is greater than the size | |
10 | of an integer (ia64 and amd64 are examples). This may be detected by looking | |
11 | for build log lines such as the following: | |
12 | auth_shadow.c:183: warning: implicit declaration of function ‘crypt’ | |
13 | auth_shadow.c:183: warning: cast to pointer from integer of different size | |
14 | --- | |
15 | saslauthd/auth_shadow.c | 1 + | |
16 | 1 file changed, 1 insertion(+) | |
17 | ||
18 | diff --git a/saslauthd/auth_shadow.c b/saslauthd/auth_shadow.c | |
19 | index d69e380..68d1cdd 100644 | |
20 | --- a/saslauthd/auth_shadow.c | |
21 | +++ b/saslauthd/auth_shadow.c | |
22 | @@ -39,6 +39,7 @@ | |
23 | ||
24 | #ifdef AUTH_SHADOW | |
25 | ||
26 | +#define _XOPEN_SOURCE | |
27 | #define PWBUFSZ 256 /***SWB***/ | |
28 | ||
29 | # include <unistd.h> |
11 | 11 | 1 file changed, 1 insertion(+), 1 deletion(-) |
12 | 12 | |
13 | 13 | diff --git a/lib/Makefile.am b/lib/Makefile.am |
14 | index 36f18fa..2402557 100644 | |
14 | index 03dba39..1f13558 100644 | |
15 | 15 | --- a/lib/Makefile.am |
16 | 16 | +++ b/lib/Makefile.am |
17 | @@ -89,7 +89,7 @@ endif | |
17 | @@ -92,7 +92,7 @@ endif | |
18 | 18 | |
19 | 19 | libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS) |
20 | 20 | @echo adding static plugins and dependencies |
21 | 21 | - $(AR) cru .libs/$@ $(SASL_STATIC_OBJS) |
22 | 22 | + $(AR) cru $@ $(SASL_STATIC_OBJS) |
23 | @for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \ | |
23 | @for i in ./libsasl2.la ../common/libplugin_common.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \ | |
24 | 24 | if test ! -f $$i; then continue; fi; . $$i; \ |
25 | 25 | for j in $$dependency_libs foo; do \ |
9 | 9 | 2 files changed, 3 insertions(+), 3 deletions(-) |
10 | 10 | |
11 | 11 | diff --git a/saslauthd/Makefile.am b/saslauthd/Makefile.am |
12 | index 75dc105..3314433 100644 | |
12 | index b7df9e1..855dd17 100644 | |
13 | 13 | --- a/saslauthd/Makefile.am |
14 | 14 | +++ b/saslauthd/Makefile.am |
15 | @@ -19,7 +19,7 @@ EXTRA_saslauthd_sources = getaddrinfo.c getnameinfo.c | |
15 | @@ -21,7 +21,7 @@ EXTRA_saslauthd_sources = getaddrinfo.c getnameinfo.c | |
16 | 16 | saslauthd_DEPENDENCIES = saslauthd-main.o $(LTLIBOBJS_FULL) |
17 | 17 | saslauthd_LDADD = @SASL_KRB_LIB@ \ |
18 | 18 | @GSSAPIBASE_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \ |
19 | - @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ $(LTLIBOBJS_FULL) | |
20 | + @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ $(LTLIBOBJS_FULL) | |
19 | - @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ $(LTLIBOBJS_FULL) $(CRYPTO_COMPAT_OBJS) $(LIBSASLDB_OBJS) | |
20 | + @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ $(LTLIBOBJS_FULL) $(CRYPTO_COMPAT_OBJS) $(LIBSASLDB_OBJS) | |
21 | 21 | |
22 | 22 | testsaslauthd_SOURCES = testsaslauthd.c utils.c |
23 | 23 | testsaslauthd_LDADD = @LIB_SOCKET@ |
0 | From: Debian Cyrus SASL Team | |
1 | <pkg-cyrus-sasl2-debian-devel@lists.alioth.debian.org> | |
2 | Date: Thu, 24 Mar 2016 11:35:04 +0100 | |
3 | Subject: Drop krb5support dependency | |
4 | ||
5 | --- | |
6 | m4/sasl2.m4 | 3 --- | |
7 | 1 file changed, 3 deletions(-) | |
8 | ||
9 | diff --git a/m4/sasl2.m4 b/m4/sasl2.m4 | |
10 | index dd0ec69..3fdba93 100644 | |
11 | --- a/m4/sasl2.m4 | |
12 | +++ b/m4/sasl2.m4 | |
13 | @@ -110,9 +110,6 @@ if test "$gssapi" != no; then | |
14 | fi | |
15 | ||
16 | if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then | |
17 | - # check for libkrb5support first | |
18 | - AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET}) | |
19 | - | |
20 | gss_failed=0 | |
21 | AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1, | |
22 | ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET}) |
0 | From: Debian Cyrus SASL Team | |
1 | <pkg-cyrus-sasl2-debian-devel@lists.alioth.debian.org> | |
2 | Date: Thu, 24 Mar 2016 11:35:04 +0100 | |
3 | Subject: LDAP fixes | |
4 | ||
5 | --- | |
6 | plugins/ldapdb.c | 2 ++ | |
7 | 1 file changed, 2 insertions(+) | |
8 | ||
9 | diff --git a/plugins/ldapdb.c b/plugins/ldapdb.c | |
10 | index 2016210..789a38c 100644 | |
11 | --- a/plugins/ldapdb.c | |
12 | +++ b/plugins/ldapdb.c | |
13 | @@ -252,6 +252,8 @@ static int ldapdb_auxprop_lookup(void *glob_context, | |
14 | ||
15 | #if defined(LDAP_PROXY_AUTHZ_FAILURE) | |
16 | case LDAP_PROXY_AUTHZ_FAILURE: | |
17 | +#elif defined(LDAP_X_PROXY_AUTHZ_FAILURE) | |
18 | + case LDAP_X_PROXY_AUTHZ_FAILURE: | |
19 | #endif | |
20 | case LDAP_INAPPROPRIATE_AUTH: | |
21 | case LDAP_INVALID_CREDENTIALS: |
7 | 7 | 1 file changed, 7 insertions(+), 106 deletions(-) |
8 | 8 | |
9 | 9 | diff --git a/lib/dlopen.c b/lib/dlopen.c |
10 | index b9c1c80..8561bef 100644 | |
10 | index 1cea55f..9cb1ce7 100644 | |
11 | 11 | --- a/lib/dlopen.c |
12 | 12 | +++ b/lib/dlopen.c |
13 | 13 | @@ -247,105 +247,6 @@ static int _sasl_plugin_load(char *plugin, void *library, |
7 | 7 | 1 file changed, 4 insertions(+), 4 deletions(-) |
8 | 8 | |
9 | 9 | diff --git a/configure.ac b/configure.ac |
10 | index 770e45c..8936d93 100644 | |
10 | index 4f2da4c..29b74e9 100644 | |
11 | 11 | --- a/configure.ac |
12 | 12 | +++ b/configure.ac |
13 | @@ -978,9 +978,9 @@ case "$with_sqlite" in | |
13 | @@ -981,9 +981,9 @@ case "$with_sqlite" in | |
14 | 14 | notfound) AC_WARN([SQLite Library not found]); true;; |
15 | 15 | *) |
16 | 16 | if test -d ${with_sqlite}/lib; then |
22 | 22 | fi |
23 | 23 | |
24 | 24 | LIB_SQLITE_DIR=$LIB_SQLITE |
25 | @@ -1030,9 +1030,9 @@ case "$with_sqlite3" in | |
25 | @@ -1033,9 +1033,9 @@ case "$with_sqlite3" in | |
26 | 26 | notfound) AC_WARN([SQLite3 Library not found]); true;; |
27 | 27 | *) |
28 | 28 | if test -d ${with_sqlite3}/lib; then |
7 | 7 | 1 file changed, 2 insertions(+), 2 deletions(-) |
8 | 8 | |
9 | 9 | diff --git a/plugins/gssapi.c b/plugins/gssapi.c |
10 | index 5204e54..a33f8a3 100644 | |
10 | index 15a8823..452263e 100644 | |
11 | 11 | --- a/plugins/gssapi.c |
12 | 12 | +++ b/plugins/gssapi.c |
13 | @@ -1624,10 +1624,10 @@ static int gssapi_client_mech_step(void *conn_context, | |
13 | @@ -1746,10 +1746,10 @@ static int gssapi_client_mech_step(void *conn_context, | |
14 | 14 | } |
15 | 15 | |
16 | 16 | /* Setup req_flags properly */ |
0 | From: Debian Cyrus SASL Team | |
1 | <pkg-cyrus-sasl2-debian-devel@lists.alioth.debian.org> | |
2 | Date: Thu, 24 Mar 2016 11:35:04 +0100 | |
3 | Subject: Fix segfault in GSSAPI | |
4 | ||
5 | --- | |
6 | plugins/gssapi.c | 8 +++----- | |
7 | 1 file changed, 3 insertions(+), 5 deletions(-) | |
8 | ||
9 | diff --git a/plugins/gssapi.c b/plugins/gssapi.c | |
10 | index a33f8a3..da94663 100644 | |
11 | --- a/plugins/gssapi.c | |
12 | +++ b/plugins/gssapi.c | |
13 | @@ -389,6 +389,7 @@ sasl_gss_encode(void *context, const struct iovec *invec, unsigned numiov, | |
14 | } | |
15 | ||
16 | if (output_token->value && output) { | |
17 | + int len; | |
18 | unsigned char * p; | |
19 | ||
20 | ret = _plug_buf_alloc(text->utils, | |
21 | @@ -405,11 +406,8 @@ sasl_gss_encode(void *context, const struct iovec *invec, unsigned numiov, | |
22 | ||
23 | p = (unsigned char *) text->encode_buf; | |
24 | ||
25 | - p[0] = (output_token->length>>24) & 0xFF; | |
26 | - p[1] = (output_token->length>>16) & 0xFF; | |
27 | - p[2] = (output_token->length>>8) & 0xFF; | |
28 | - p[3] = output_token->length & 0xFF; | |
29 | - | |
30 | + len = htonl(output_token->length); | |
31 | + memcpy(text->encode_buf, &len, 4); | |
32 | memcpy(text->encode_buf + 4, output_token->value, output_token->length); | |
33 | } | |
34 |
0 | From: Debian Cyrus SASL Team | |
1 | <pkg-cyrus-sasl2-debian-devel@lists.alioth.debian.org> | |
2 | Date: Thu, 24 Mar 2016 11:35:04 +0100 | |
3 | Subject: Fix dovecot authentication | |
4 | ||
5 | --- | |
6 | lib/checkpw.c | 10 ++++------ | |
7 | 1 file changed, 4 insertions(+), 6 deletions(-) | |
8 | ||
9 | diff --git a/lib/checkpw.c b/lib/checkpw.c | |
10 | index c38dffc..7250aba 100644 | |
11 | --- a/lib/checkpw.c | |
12 | +++ b/lib/checkpw.c | |
13 | @@ -587,16 +587,14 @@ static int read_wait(int fd, unsigned delta) | |
14 | /* Timeout. */ | |
15 | errno = ETIMEDOUT; | |
16 | return -1; | |
17 | - case +1: | |
18 | - if (FD_ISSET(fd, &rfds)) { | |
19 | - /* Success, file descriptor is readable. */ | |
20 | - return 0; | |
21 | - } | |
22 | - return -1; | |
23 | case -1: | |
24 | if (errno == EINTR || errno == EAGAIN) | |
25 | continue; | |
26 | default: | |
27 | + if (FD_ISSET(fd, &rfds)) { | |
28 | + /* Success, file descriptor is readable. */ | |
29 | + return 0; | |
30 | + } | |
31 | /* Error catch-all. */ | |
32 | return -1; | |
33 | } |
7 | 7 | 1 file changed, 1 insertion(+), 1 deletion(-) |
8 | 8 | |
9 | 9 | diff --git a/configure.ac b/configure.ac |
10 | index 8936d93..39c0240 100644 | |
10 | index 29b74e9..95e3065 100644 | |
11 | 11 | --- a/configure.ac |
12 | 12 | +++ b/configure.ac |
13 | @@ -281,7 +281,7 @@ AC_ARG_WITH(pam, [ --with-pam=DIR use PAM (rooted in DIR) [[yes]] ], | |
13 | @@ -286,7 +286,7 @@ AC_ARG_WITH(pam, [ --with-pam=DIR use PAM (rooted in DIR) [[yes]] ], | |
14 | 14 | if test "$with_pam" != no; then |
15 | 15 | if test -d $with_pam; then |
16 | 16 | CPPFLAGS="$CPPFLAGS -I${with_pam}/include" |
0 | From: Debian Cyrus SASL Team | |
1 | <pkg-cyrus-sasl2-debian-devel@lists.alioth.debian.org> | |
2 | Date: Thu, 24 Mar 2016 11:35:05 +0100 | |
3 | Subject: Send IMAP logout | |
4 | ||
5 | --- | |
6 | saslauthd/auth_rimap.c | 21 +++++++++++++++++++++ | |
7 | 1 file changed, 21 insertions(+) | |
8 | ||
9 | diff --git a/saslauthd/auth_rimap.c b/saslauthd/auth_rimap.c | |
10 | index bdf89b3..e9d8da5 100644 | |
11 | --- a/saslauthd/auth_rimap.c | |
12 | +++ b/saslauthd/auth_rimap.c | |
13 | @@ -100,6 +100,7 @@ static struct addrinfo *ai = NULL; /* remote authentication host */ | |
14 | service we connect to. */ | |
15 | #define TAG "saslauthd" /* IMAP command tag */ | |
16 | #define LOGIN_CMD (TAG " LOGIN ") /* IMAP login command (with tag) */ | |
17 | +#define LOGOUT_CMD (TAG " LOGOUT ") /* IMAP logout command (with tag)*/ | |
18 | #define NETWORK_IO_TIMEOUT 30 /* network I/O timeout (seconds) */ | |
19 | #define RESP_LEN 1000 /* size of read response buffer */ | |
20 | ||
21 | @@ -317,10 +318,12 @@ auth_rimap ( | |
22 | int s=-1; /* socket to remote auth host */ | |
23 | struct addrinfo *r; /* remote socket address info */ | |
24 | struct iovec iov[5]; /* for sending LOGIN command */ | |
25 | + struct iovec iov2[1]; /* for sending LOGOUT command */ | |
26 | char *qlogin; /* pointer to "quoted" login */ | |
27 | char *qpass; /* pointer to "quoted" password */ | |
28 | char *c; /* scratch pointer */ | |
29 | int rc; /* return code scratch area */ | |
30 | + int rcl; /* return code scratch area */ | |
31 | char rbuf[RESP_LEN]; /* response read buffer */ | |
32 | char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV]; | |
33 | int saved_errno; | |
34 | @@ -515,6 +518,24 @@ auth_rimap ( | |
35 | } | |
36 | } | |
37 | } | |
38 | + | |
39 | + /* close remote imap */ | |
40 | + iov2[0].iov_base = LOGOUT_CMD; | |
41 | + iov2[0].iov_len = sizeof(LOGOUT_CMD) - 1; | |
42 | + iov2[1].iov_base = "\r\n"; | |
43 | + iov2[1].iov_len = sizeof("\r\n") - 1; | |
44 | + | |
45 | + if (flags & VERBOSE) { | |
46 | + syslog(LOG_DEBUG, "auth_rimap: sending %s%s %s", | |
47 | + LOGOUT_CMD, qlogin, qpass); | |
48 | + } | |
49 | + alarm(NETWORK_IO_TIMEOUT); | |
50 | + rcl = retry_writev(s, iov2, 2); | |
51 | + alarm(0); | |
52 | + if (rcl == -1) { | |
53 | + syslog(LOG_WARNING, "auth_rimap: writev logout: %m"); | |
54 | + } | |
55 | + | |
56 | (void) close(s); /* we're done with the remote */ | |
57 | if (rc == -1) { | |
58 | syslog(LOG_WARNING, "auth_rimap: read (response): %m"); |
0 | From: Debian Cyrus SASL Team | |
1 | <pkg-cyrus-sasl2-debian-devel@lists.alioth.debian.org> | |
2 | Date: Thu, 24 Mar 2016 11:35:05 +0100 | |
3 | Subject: Fix canonuser ldapdb garbage in out buffer | |
4 | ||
5 | --- | |
6 | plugins/ldapdb.c | 1 + | |
7 | 1 file changed, 1 insertion(+) | |
8 | ||
9 | diff --git a/plugins/ldapdb.c b/plugins/ldapdb.c | |
10 | index 789a38c..d09985d 100644 | |
11 | --- a/plugins/ldapdb.c | |
12 | +++ b/plugins/ldapdb.c | |
13 | @@ -407,6 +407,7 @@ ldapdb_canon_server(void *glob_context, | |
14 | if ( len > out_max ) | |
15 | len = out_max; | |
16 | memcpy(out, bvals[0]->bv_val, len); | |
17 | + out[len] = '\0'; | |
18 | *out_ulen = len; | |
19 | ber_bvecfree(bvals); | |
20 | } |
8 | 8 | 2 files changed, 9 insertions(+), 3 deletions(-) |
9 | 9 | |
10 | 10 | diff --git a/m4/sasl2.m4 b/m4/sasl2.m4 |
11 | index 3fdba93..922d072 100644 | |
11 | index 537e283..05bf915 100644 | |
12 | 12 | --- a/m4/sasl2.m4 |
13 | 13 | +++ b/m4/sasl2.m4 |
14 | @@ -275,6 +275,7 @@ if test "$gssapi" != no; then | |
14 | @@ -277,6 +277,7 @@ if test "$gssapi" != no; then | |
15 | 15 | ]) |
16 | 16 | fi |
17 | 17 | fi |
20 | 20 | AC_CHECK_FUNCS(gss_encapsulate_token) |
21 | 21 | AC_CHECK_FUNCS(gss_oid_equal) |
22 | 22 | diff --git a/plugins/gssapi.c b/plugins/gssapi.c |
23 | index da94663..9c4aa79 100644 | |
23 | index 452263e..a477a23 100644 | |
24 | 24 | --- a/plugins/gssapi.c |
25 | 25 | +++ b/plugins/gssapi.c |
26 | @@ -1406,7 +1406,7 @@ static sasl_server_plug_t gssapi_server_plugins[] = | |
26 | @@ -1531,7 +1531,7 @@ static sasl_server_plug_t gssapi_server_plugins[] = | |
27 | 27 | }; |
28 | 28 | |
29 | 29 | int gssapiv2_server_plug_init( |
32 | 32 | const sasl_utils_t *utils __attribute__((unused)), |
33 | 33 | #else |
34 | 34 | const sasl_utils_t *utils, |
35 | @@ -1416,7 +1416,7 @@ int gssapiv2_server_plug_init( | |
35 | @@ -1541,7 +1541,7 @@ int gssapiv2_server_plug_init( | |
36 | 36 | sasl_server_plug_t **pluglist, |
37 | 37 | int *plugcount) |
38 | 38 | { |
41 | 41 | const char *keytab = NULL; |
42 | 42 | char keytab_path[1024]; |
43 | 43 | unsigned int rl; |
44 | @@ -1426,7 +1426,7 @@ int gssapiv2_server_plug_init( | |
44 | @@ -1551,7 +1551,7 @@ int gssapiv2_server_plug_init( | |
45 | 45 | return SASL_BADVERS; |
46 | 46 | } |
47 | 47 | |
50 | 50 | /* unfortunately, we don't check for readability of keytab if it's |
51 | 51 | the standard one, since we don't know where it is */ |
52 | 52 | |
53 | @@ -1449,7 +1449,12 @@ int gssapiv2_server_plug_init( | |
53 | @@ -1574,7 +1574,12 @@ int gssapiv2_server_plug_init( | |
54 | 54 | |
55 | 55 | strncpy(keytab_path, keytab, 1024); |
56 | 56 |
0 | From: Debian Cyrus SASL Team | |
1 | <pkg-cyrus-sasl2-debian-devel@lists.alioth.debian.org> | |
2 | Date: Thu, 24 Mar 2016 11:35:05 +0100 | |
3 | Subject: Release server creds when they are no longer needed | |
4 | ||
5 | --- | |
6 | plugins/gssapi.c | 6 ++++++ | |
7 | 1 file changed, 6 insertions(+) | |
8 | ||
9 | diff --git a/plugins/gssapi.c b/plugins/gssapi.c | |
10 | index 9c4aa79..fb2f0df 100644 | |
11 | --- a/plugins/gssapi.c | |
12 | +++ b/plugins/gssapi.c | |
13 | @@ -978,6 +978,12 @@ gssapi_server_mech_authneg(context_t *text, | |
14 | text->server_creds = GSS_C_NO_CREDENTIAL; | |
15 | } | |
16 | ||
17 | + /* Release server creds which are no longer needed */ | |
18 | + if ( text->server_creds != GSS_C_NO_CREDENTIAL) { | |
19 | + maj_stat = gss_release_cred(&min_stat, &text->server_creds); | |
20 | + text->server_creds = GSS_C_NO_CREDENTIAL; | |
21 | + } | |
22 | + | |
23 | cleanup: | |
24 | if (text->server_creds != GSS_C_NO_CREDENTIAL) { | |
25 | GSS_LOCK_MUTEX(params->utils); |
0 | From: Debian Cyrus SASL Team | |
1 | <pkg-cyrus-sasl2-debian-devel@lists.alioth.debian.org> | |
2 | Date: Thu, 24 Mar 2016 11:35:05 +0100 | |
3 | Subject: Fix typo in debugging logs | |
4 | ||
5 | --- | |
6 | saslauthd/cache.c | 6 +++--- | |
7 | 1 file changed, 3 insertions(+), 3 deletions(-) | |
8 | ||
9 | diff --git a/saslauthd/cache.c b/saslauthd/cache.c | |
10 | index 543e176..62a4daa 100644 | |
11 | --- a/saslauthd/cache.c | |
12 | +++ b/saslauthd/cache.c | |
13 | @@ -264,7 +264,7 @@ int cache_lookup(const char *user, const char *realm, const char *service, const | |
14 | if (memcmp(pwd_digest, read_bucket->pwd_digest, 16) == 0) { | |
15 | ||
16 | if (flags & VERBOSE) | |
17 | - logger(L_DEBUG, L_FUNC, debug, user, realm, service, "found with valid passwd"); | |
18 | + logger(L_DEBUG, L_FUNC, debug, user, service, realm, "found with valid passwd"); | |
19 | ||
20 | cache_un_lock(hash_offset); | |
21 | table_stats->hits++; | |
22 | @@ -272,14 +272,14 @@ int cache_lookup(const char *user, const char *realm, const char *service, const | |
23 | } | |
24 | ||
25 | if (flags & VERBOSE) | |
26 | - logger(L_DEBUG, L_FUNC, debug, user, realm, service, "found with invalid passwd, update pending"); | |
27 | + logger(L_DEBUG, L_FUNC, debug, user, service, realm, "found with invalid passwd, update pending"); | |
28 | ||
29 | result->status = CACHE_FLUSH; | |
30 | ||
31 | } else { | |
32 | ||
33 | if (flags & VERBOSE) | |
34 | - logger(L_DEBUG, L_FUNC, debug, user, realm, service, "not found, update pending"); | |
35 | + logger(L_DEBUG, L_FUNC, debug, user, service, realm, "not found, update pending"); | |
36 | ||
37 | result->status = CACHE_FLUSH_WITH_RESCAN; | |
38 | } |
7 | 7 | 2 files changed, 2 insertions(+), 2 deletions(-) |
8 | 8 | |
9 | 9 | diff --git a/lib/Makefile.am b/lib/Makefile.am |
10 | index 2402557..7eac924 100644 | |
10 | index 1f13558..bf38288 100644 | |
11 | 11 | --- a/lib/Makefile.am |
12 | 12 | +++ b/lib/Makefile.am |
13 | 13 | @@ -43,7 +43,7 @@ |
17 | 17 | -sasl_version = 3:0:0 |
18 | 18 | +sasl_version = 2:25:0 |
19 | 19 | |
20 | AM_CPPFLAGS=-DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb | |
21 | ||
20 | AM_CPPFLAGS=-DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins \ | |
21 | -I$(top_builddir)/include -I$(top_srcdir)/sasldb -I$(top_srcdir)/common | |
22 | 22 | diff --git a/plugins/Makefile.am b/plugins/Makefile.am |
23 | index 452596e..6f755e1 100644 | |
23 | index be118bb..4729781 100644 | |
24 | 24 | --- a/plugins/Makefile.am |
25 | 25 | +++ b/plugins/Makefile.am |
26 | 26 | @@ -47,7 +47,7 @@ |
30 | 30 | -plugin_version = 3:0:0 |
31 | 31 | +plugin_version = 2:25:0 |
32 | 32 | |
33 | AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include | |
33 | AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_srcdir)/common -I$(top_builddir)/include | |
34 | 34 | AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version) -no-undefined |
0 | From: Debian Cyrus SASL Team | |
1 | <pkg-cyrus-sasl2-debian-devel@lists.alioth.debian.org> | |
2 | Date: Thu, 24 Mar 2016 11:35:05 +0100 | |
3 | Subject: Fix 'return SASL_FAIL;' in void sasl_dispose() | |
4 | ||
5 | --- | |
6 | lib/common.c | 2 +- | |
7 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
8 | ||
9 | diff --git a/lib/common.c b/lib/common.c | |
10 | index b83557d..8e9ae09 100644 | |
11 | --- a/lib/common.c | |
12 | +++ b/lib/common.c | |
13 | @@ -841,7 +841,7 @@ void sasl_dispose(sasl_conn_t **pconn) | |
14 | ||
15 | if (!free_mutex || free_mutex == 0x1) | |
16 | free_mutex = sasl_MUTEX_ALLOC(); | |
17 | - if (!free_mutex) return SASL_FAIL; | |
18 | + if (!free_mutex) return; | |
19 | ||
20 | result = sasl_MUTEX_LOCK(free_mutex); | |
21 | if (result!=SASL_OK) return; |
8 | 8 | 2 files changed, 13 insertions(+), 1 deletion(-) |
9 | 9 | |
10 | 10 | diff --git a/Makefile.am b/Makefile.am |
11 | index f72bb26..b84342e 100644 | |
11 | index 07aa781..6ddb6e9 100644 | |
12 | 12 | --- a/Makefile.am |
13 | 13 | +++ b/Makefile.am |
14 | 14 | @@ -44,6 +44,15 @@ ACLOCAL_AMFLAGS = -I m4 |
27 | 27 | if SASLAUTHD |
28 | 28 | SAD = saslauthd |
29 | 29 | else |
30 | @@ -77,6 +86,10 @@ EXTRA_DIST=config win32 mac dlcompat-20010505 NTMakefile INSTALL.TXT \ | |
31 | pkgconfigdir = $(libdir)/pkgconfig | |
32 | pkgconfig_DATA = libsasl2.pc | |
30 | @@ -141,6 +150,10 @@ pkgconfig_DATA = libsasl2.pc | |
31 | ## define this unconditionally because dist-hook references it | |
32 | SPHINX_CACHE = docsrc/.doctrees | |
33 | 33 | |
34 | 34 | +libsasl2.pc: $(srcdir)/libsasl2.pc.in Makefile |
35 | 35 | + rm -f $@ |
36 | 36 | + $(do_subst) < $(srcdir)/libsasl2.pc.in > $@ |
37 | 37 | + |
38 | 38 | dist-hook: |
39 | @find $(distdir) -exec chmod o+w {} ';' | |
39 | @find $(distdir) -exec chmod u+w {} ';' | |
40 | 40 | @find $(distdir) -name CVS -print | xargs -t rm -rf |
41 | 41 | diff --git a/configure.ac b/configure.ac |
42 | index 39c0240..fce5075 100644 | |
42 | index 95e3065..275f242 100644 | |
43 | 43 | --- a/configure.ac |
44 | 44 | +++ b/configure.ac |
45 | @@ -1563,7 +1563,6 @@ extern int asprintf(char **str, const char *fmt, ...); | |
45 | @@ -1590,7 +1590,6 @@ AH_BOTTOM([#if defined __GNUC__ && __GNUC__ > 6 | |
46 | 46 | AC_CONFIG_HEADERS(config.h) |
47 | 47 | |
48 | 48 | AC_OUTPUT(Makefile |
0 | From: Sebastian Pipping <sebastian@pipping.org> | |
1 | Date: Fri, 5 Jul 2013 18:34:50 +0200 | |
2 | Subject: 2.1.26: Allow "* CAPABILITY" lines in IMAP login reply (v4) | |
3 | ||
4 | --- | |
5 | saslauthd/auth_rimap.c | 125 +++++++++++++++++++++++++++++++++++++++++++------ | |
6 | 1 file changed, 111 insertions(+), 14 deletions(-) | |
7 | ||
8 | diff --git a/saslauthd/auth_rimap.c b/saslauthd/auth_rimap.c | |
9 | index e9d8da5..3fcfbd4 100644 | |
10 | --- a/saslauthd/auth_rimap.c | |
11 | +++ b/saslauthd/auth_rimap.c | |
12 | @@ -3,6 +3,7 @@ | |
13 | ||
14 | /* COPYRIGHT | |
15 | * Copyright (c) 1998 Messaging Direct Ltd. | |
16 | + * Copyright (c) 2013 Sebastian Pipping <sebastian@pipping.org> | |
17 | * All rights reserved. | |
18 | * | |
19 | * Redistribution and use in source and binary forms, with or without | |
20 | @@ -101,6 +102,9 @@ static struct addrinfo *ai = NULL; /* remote authentication host */ | |
21 | #define TAG "saslauthd" /* IMAP command tag */ | |
22 | #define LOGIN_CMD (TAG " LOGIN ") /* IMAP login command (with tag) */ | |
23 | #define LOGOUT_CMD (TAG " LOGOUT ") /* IMAP logout command (with tag)*/ | |
24 | +#define LOGIN_REPLY_GOOD (TAG " OK") /* Expected IMAP login reply, good edition (with tag) */ | |
25 | +#define LOGIN_REPLY_BAD (TAG " NO") /* Expected IMAP login reply, bad edition (with tag) */ | |
26 | +#define LOGIN_REPLY_CAP "* CAPABILITY" /* Expected IMAP login reply, capabilities edition */ | |
27 | #define NETWORK_IO_TIMEOUT 30 /* network I/O timeout (seconds) */ | |
28 | #define RESP_LEN 1000 /* size of read response buffer */ | |
29 | ||
30 | @@ -288,6 +292,109 @@ auth_rimap_init ( | |
31 | ||
32 | /* END FUNCTION: auth_rimap_init */ | |
33 | ||
34 | +typedef enum _t_login_status { | |
35 | + LOGIN_STATUS_UNKNOWN, | |
36 | + | |
37 | + LOGIN_STATUS_ACCEPTED, | |
38 | + LOGIN_STATUS_REJECTED, | |
39 | + LOGIN_STATUS_MALFORMED | |
40 | +} t_login_status; | |
41 | + | |
42 | +/* FUNCTION: warn_malformed_imap_login_reply */ | |
43 | +void | |
44 | +warn_malformed_imap_login_reply( | |
45 | + /* PARAMETERS */ | |
46 | + const char * server_reply /* I: plaintext server reply */ | |
47 | + /* END PARAMETERS */ | |
48 | + ) | |
49 | +{ | |
50 | + syslog(LOG_WARNING, "auth_rimap: unexpected response to auth request: %s", server_reply); | |
51 | +} | |
52 | + | |
53 | +/* END FUNCTION: warn_malformed_imap_login_reply */ | |
54 | + | |
55 | +/* FUNCTION: process_login_reply */ | |
56 | + | |
57 | +/* SYNOPSIS | |
58 | + * Classify IMAP server reply into accepted, rejected or malformed. | |
59 | + * END SYNOPSIS */ | |
60 | + | |
61 | +t_login_status | |
62 | +process_login_reply( | |
63 | + /* PARAMETERS */ | |
64 | + char * server_reply, /* I/O: plaintext server reply */ | |
65 | + const char * login /* I : plaintext authenticator */ | |
66 | + /* END PARAMETERS */ | |
67 | + ) | |
68 | +{ | |
69 | + /* VARIABLES */ | |
70 | + t_login_status res = LOGIN_STATUS_UNKNOWN; | |
71 | + char * line_first = server_reply; | |
72 | + char * line_after_last; | |
73 | + /* END VARIABLES */ | |
74 | + | |
75 | + for (;;) { | |
76 | + /* find line boundary */ | |
77 | + line_after_last = strpbrk(line_first, "\x0a\x0d"); | |
78 | + if (line_after_last == NULL) { | |
79 | + warn_malformed_imap_login_reply(line_first); | |
80 | + return LOGIN_STATUS_MALFORMED; | |
81 | + } | |
82 | + | |
83 | + /* handle single line */ | |
84 | + { | |
85 | + /* terminate line (reverted later) */ | |
86 | + const char backup = line_after_last[0]; | |
87 | + line_after_last[0] = '\0'; | |
88 | + | |
89 | + /* classify current line */ | |
90 | + if (strncmp(line_first, LOGIN_REPLY_GOOD, sizeof(LOGIN_REPLY_GOOD) - 1) == 0) { | |
91 | + res = LOGIN_STATUS_ACCEPTED; | |
92 | + } else if (strncmp(line_first, LOGIN_REPLY_BAD, sizeof(LOGIN_REPLY_BAD) - 1) == 0) { | |
93 | + res = LOGIN_STATUS_REJECTED; | |
94 | + } else if (strncmp(line_first, LOGIN_REPLY_CAP, sizeof(LOGIN_REPLY_CAP) - 1) == 0) { | |
95 | + /* keep looking for ".. OK" or ".. NO" */ | |
96 | + } else { | |
97 | + res = LOGIN_STATUS_MALFORMED; | |
98 | + } | |
99 | + | |
100 | + /* report current line */ | |
101 | + if (res == LOGIN_STATUS_MALFORMED) { | |
102 | + warn_malformed_imap_login_reply(line_first); | |
103 | + } else if (flags & VERBOSE) { | |
104 | + syslog(LOG_DEBUG, "auth_rimap: [%s] %s", login, line_first); | |
105 | + } | |
106 | + | |
107 | + /* revert termination */ | |
108 | + line_after_last[0] = backup; | |
109 | + } | |
110 | + | |
111 | + /* are we done? */ | |
112 | + if (res != LOGIN_STATUS_UNKNOWN) { | |
113 | + return res; | |
114 | + } | |
115 | + | |
116 | + /* forward to next line */ | |
117 | + while ((line_after_last[0] == '\x0a') | |
118 | + || (line_after_last[0] == '\x0d')) { | |
119 | + line_after_last++; | |
120 | + } | |
121 | + | |
122 | + /* no more lines? */ | |
123 | + if (line_after_last[0] == '\0') { | |
124 | + warn_malformed_imap_login_reply(""); | |
125 | + return LOGIN_STATUS_MALFORMED; | |
126 | + } | |
127 | + | |
128 | + /* prepare for next round */ | |
129 | + line_first = line_after_last; | |
130 | + } | |
131 | + | |
132 | + assert(! "cannot be reached"); | |
133 | +} | |
134 | + | |
135 | +/* END FUNCTION: process_login_reply */ | |
136 | + | |
137 | /* FUNCTION: auth_rimap */ | |
138 | ||
139 | /* SYNOPSIS | |
140 | @@ -328,6 +435,7 @@ auth_rimap ( | |
141 | char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV]; | |
142 | int saved_errno; | |
143 | int niflags; | |
144 | + t_login_status login_status = LOGIN_STATUS_MALFORMED; | |
145 | /* END VARIABLES */ | |
146 | ||
147 | /* sanity checks */ | |
148 | @@ -543,25 +651,14 @@ auth_rimap ( | |
149 | } | |
150 | ||
151 | rbuf[rc] = '\0'; /* tie off response */ | |
152 | - c = strpbrk(rbuf, "\r\n"); | |
153 | - if (c != NULL) { | |
154 | - *c = '\0'; /* tie off line termination */ | |
155 | - } | |
156 | + login_status = process_login_reply(rbuf, login); | |
157 | ||
158 | - if (!strncmp(rbuf, TAG " OK", sizeof(TAG " OK")-1)) { | |
159 | - if (flags & VERBOSE) { | |
160 | - syslog(LOG_DEBUG, "auth_rimap: [%s] %s", login, rbuf); | |
161 | - } | |
162 | + if (login_status == LOGIN_STATUS_ACCEPTED) { | |
163 | return strdup("OK remote authentication successful"); | |
164 | } | |
165 | - if (!strncmp(rbuf, TAG " NO", sizeof(TAG " NO")-1)) { | |
166 | - if (flags & VERBOSE) { | |
167 | - syslog(LOG_DEBUG, "auth_rimap: [%s] %s", login, rbuf); | |
168 | - } | |
169 | + if (login_status == LOGIN_STATUS_REJECTED) { | |
170 | return strdup("NO remote server rejected your credentials"); | |
171 | } | |
172 | - syslog(LOG_WARNING, "auth_rimap: unexpected response to auth request: %s", | |
173 | - rbuf); | |
174 | return strdup(RESP_UNEXPECTED); | |
175 | ||
176 | } |
0 | From: Debian Cyrus SASL Team | |
1 | <pkg-cyrus-sasl2-debian-devel@lists.alioth.debian.org> | |
2 | Date: Thu, 24 Mar 2016 11:35:06 +0100 | |
3 | Subject: Fix early hangup in ipc_unix.c | |
4 | ||
5 | --- | |
6 | saslauthd/ipc_unix.c | 5 +++++ | |
7 | 1 file changed, 5 insertions(+) | |
8 | ||
9 | diff --git a/saslauthd/ipc_unix.c b/saslauthd/ipc_unix.c | |
10 | index 58a1fa6..63eca3e 100644 | |
11 | --- a/saslauthd/ipc_unix.c | |
12 | +++ b/saslauthd/ipc_unix.c | |
13 | @@ -217,6 +217,7 @@ void ipc_loop() { | |
14 | ||
15 | int rc; | |
16 | int conn_fd; | |
17 | + unsigned char dummy; | |
18 | ||
19 | ||
20 | while(1) { | |
21 | @@ -261,6 +262,8 @@ void ipc_loop() { | |
22 | } | |
23 | ||
24 | do_request(conn_fd); | |
25 | + shutdown(conn_fd, SHUT_WR); | |
26 | + while (read(conn_fd, &dummy, 1) > 0) { } | |
27 | close(conn_fd); | |
28 | ||
29 | if(flags & DETACH_TTY) { | |
30 | @@ -275,6 +278,8 @@ void ipc_loop() { | |
31 | * Normal prefork mode. | |
32 | *************************************************************/ | |
33 | do_request(conn_fd); | |
34 | + shutdown(conn_fd, SHUT_WR); | |
35 | + while (read(conn_fd, &dummy, 1) > 0) { } | |
36 | close(conn_fd); | |
37 | } | |
38 |
0 | From: =?utf-8?q?Ond=C5=99ej_Sur=C3=BD?= <ondrej@sury.org> | |
1 | Date: Tue, 25 Oct 2016 10:49:43 +0200 | |
2 | Subject: Change linking from sasldb/.libs/libsasldb.al to sasldb/libsasldb.la | |
3 | ||
4 | --- | |
5 | configure.ac | 5 ----- | |
6 | utils/Makefile.am | 4 ++-- | |
7 | 2 files changed, 2 insertions(+), 7 deletions(-) | |
8 | ||
9 | diff --git a/configure.ac b/configure.ac | |
10 | index fce5075..c6deaf0 100644 | |
11 | --- a/configure.ac | |
12 | +++ b/configure.ac | |
13 | @@ -612,14 +612,9 @@ AC_ARG_ENABLE(auth-sasldb, [ --enable-auth-sasldb enable experimental SASLdb | |
14 | authsasldb=$enableval, | |
15 | authsasldb=no) | |
16 | if test "$authsasldb" != no; then | |
17 | - if test ! -d "../sasldb"; then | |
18 | - echo "ERROR: Cannot build sasldb module outside of the full SASL source tree." | |
19 | - exit 0; | |
20 | - fi | |
21 | AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support]) | |
22 | SASL_DB_PATH_CHECK() | |
23 | SASL_DB_CHECK() | |
24 | - SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al" | |
25 | fi | |
26 | ||
27 | AC_ARG_ENABLE(httpform, [ --enable-httpform enable HTTP form authentication [[no]] ], | |
28 | diff --git a/utils/Makefile.am b/utils/Makefile.am | |
29 | index 17f0457..a9e9a0a 100644 | |
30 | --- a/utils/Makefile.am | |
31 | +++ b/utils/Makefile.am | |
32 | @@ -42,8 +42,8 @@ | |
33 | # | |
34 | ################################################################ | |
35 | ||
36 | -all_sasl_libs = ../lib/libsasl2.la $(SASL_DB_LIB) $(LIB_SOCKET) | |
37 | -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) | |
38 | +all_sasl_libs = ../lib/libsasl2.la ../sasldb/libsasldb.la $(SASL_DB_LIB) $(LIB_SOCKET) | |
39 | +all_sasl_static_libs = ../lib/.libs/libsasl2.a ../sasldb/.libs/libsasldb.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) | |
40 | ||
41 | sbin_PROGRAMS = @SASL_DB_UTILS@ @SMTPTEST_PROGRAM@ pluginviewer dbconverter-2 | |
42 | EXTRA_PROGRAMS = saslpasswd2 sasldblistusers2 testsuite testsuitestatic smtptest pluginviewer |
8 | 8 | 3 files changed, 7 insertions(+), 25 deletions(-) |
9 | 9 | |
10 | 10 | diff --git a/configure.ac b/configure.ac |
11 | index c6deaf0..708cfca 100644 | |
11 | index 275f242..58dcecd 100644 | |
12 | 12 | --- a/configure.ac |
13 | 13 | +++ b/configure.ac |
14 | 14 | @@ -55,6 +55,7 @@ AC_INIT([cyrus-sasl], |
19 | 19 | |
20 | 20 | dnl use ./config.cache as the default cache file. |
21 | 21 | dnl we require a cache file to successfully configure our build. |
22 | @@ -1248,9 +1249,7 @@ AC_CHECK_FUNC(getsubopt, [AC_DEFINE(HAVE_GETSUBOPT,[], | |
22 | @@ -1256,9 +1257,7 @@ AC_CHECK_FUNC(getsubopt, [AC_DEFINE(HAVE_GETSUBOPT,[], | |
23 | 23 | [do we have getsubopt()?])], [sasl_cv_getsubopt=yes]) |
24 | 24 | if test $sasl_cv_getsubopt = yes; then |
25 | 25 | AC_LIBOBJ(getsubopt) |
28 | 28 | -AC_SUBST(GETSUBOPT) |
29 | 29 | |
30 | 30 | dnl Check for snprintf |
31 | sasl_cv_snprintf=no | |
32 | @@ -1259,11 +1258,7 @@ AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF,[],[Does the system have snprin | |
31 | sasl_cv_snprintf=yes | |
32 | @@ -1267,11 +1266,7 @@ AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF,[],[Does the system have snprin | |
33 | 33 | AC_CHECK_FUNC(vsnprintf, [AC_DEFINE(HAVE_VSNPRINTF,[],[Does the system have vsnprintf()?])], [sasl_cv_snprintf=yes]) |
34 | if test $sasl_cv_snprintf = yes; then | |
35 | AC_LIBOBJ(snprintf) | |
36 | - SNPRINTFOBJS="snprintf.o" | |
37 | - LTSNPRINTFOBJS="snprintf.lo" | |
34 | if test $sasl_cv_snprintf = no; then | |
35 | AC_LIBOBJ(snprintf) | |
36 | - SNPRINTFOBJS="snprintf.o" | |
37 | - LTSNPRINTFOBJS="snprintf.lo" | |
38 | 38 | fi |
39 | 39 | -AC_SUBST(SNPRINTFOBJS) |
40 | 40 | -AC_SUBST(LTSNPRINTFOBJS) |
41 | 41 | |
42 | 42 | dnl do we need to link in -lresolv? |
43 | 43 | AC_CHECK_LIB(resolv, inet_aton) |
44 | @@ -1276,11 +1271,7 @@ IPv6_CHECK_FUNC(getaddrinfo, [IPv6_CHECK_FUNC(gai_strerror, | |
44 | @@ -1284,11 +1279,7 @@ IPv6_CHECK_FUNC(getaddrinfo, [IPv6_CHECK_FUNC(gai_strerror, | |
45 | 45 | sasl_cv_getaddrinfo=no])]) |
46 | 46 | if test $sasl_cv_getaddrinfo = yes; then |
47 | 47 | AC_LIBOBJ(getaddrinfo) |
53 | 53 | |
54 | 54 | dnl Check for getnameinfo |
55 | 55 | GETNAMEINFOOBJS="" |
56 | @@ -1289,14 +1280,7 @@ IPv6_CHECK_FUNC(getnameinfo, | |
56 | @@ -1297,14 +1288,7 @@ IPv6_CHECK_FUNC(getnameinfo, | |
57 | 57 | [AC_DEFINE(HAVE_GETNAMEINFO,[],[Do we have a getnameinfo() function?])], [sasl_cv_getnameinfo=yes]) |
58 | 58 | if test $sasl_cv_getnameinfo = yes; then |
59 | 59 | AC_LIBOBJ(getnameinfo) |
69 | 69 | AC_C_CONST |
70 | 70 | AC_C_INLINE |
71 | 71 | diff --git a/lib/Makefile.am b/lib/Makefile.am |
72 | index 7eac924..f73231e 100644 | |
72 | index bf38288..66bc41f 100644 | |
73 | 73 | --- a/lib/Makefile.am |
74 | 74 | +++ b/lib/Makefile.am |
75 | @@ -63,19 +63,18 @@ endif | |
75 | @@ -66,19 +66,18 @@ endif | |
76 | 76 | common_headers = saslint.h |
77 | common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c $(DLOPEN_C) ../plugins/plugin_common.c | |
77 | common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c $(DLOPEN_C) | |
78 | 78 | |
79 | 79 | -LTLIBOBJS = @LTLIBOBJS@ |
80 | 80 | -LIB_DOOR= @LIB_DOOR@ |
90 | 90 | libsasl2_la_SOURCES = $(common_sources) $(common_headers) |
91 | 91 | libsasl2_la_LDFLAGS = -version-info $(sasl_version) -no-undefined -Wl,--version-script=$(top_srcdir)/Versions |
92 | 92 | libsasl2_la_DEPENDENCIES = $(LTLIBOBJS) $(top_srcdir)/Versions |
93 | -libsasl2_la_LIBADD = libobj.la $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR) | |
94 | +libsasl2_la_LIBADD = $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR) | |
93 | -libsasl2_la_LIBADD = libobj.la $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR) $(PLUGIN_COMMON_OBJS) | |
94 | +libsasl2_la_LIBADD = $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR) $(PLUGIN_COMMON_OBJS) | |
95 | 95 | |
96 | 96 | if MACOSX |
97 | 97 | framedir = /Library/Frameworks/SASL2.framework |
98 | 98 | diff --git a/saslauthd/Makefile.am b/saslauthd/Makefile.am |
99 | index 3314433..9d299d9 100644 | |
99 | index 855dd17..6e8d53b 100644 | |
100 | 100 | --- a/saslauthd/Makefile.am |
101 | 101 | +++ b/saslauthd/Makefile.am |
102 | 102 | @@ -2,8 +2,7 @@ AUTOMAKE_OPTIONS = 1.7 |
106 | 106 | -LTLIBOBJS = @LTLIBOBJS@ |
107 | 107 | -LTLIBOBJS_FULL = $(addprefix ${top_srcdir}/lib/,${LTLIBOBJS}) |
108 | 108 | +LDADD = ../lib/libobj.la |
109 | CRYPTO_COMPAT_OBJS = $(top_builddir)/common/libcrypto_compat.la | |
110 | LIBSASLDB_OBJS = $(top_builddir)/sasldb/libsasldb.la | |
109 | 111 | |
110 | saslauthd_SOURCES = mechanisms.c globals.h \ | |
111 | mechanisms.h auth_dce.c auth_dce.h auth_getpwent.c \ | |
112 | @@ -16,10 +15,10 @@ saslauthd_SOURCES = mechanisms.c globals.h \ | |
112 | @@ -18,10 +17,10 @@ saslauthd_SOURCES = mechanisms.c globals.h \ | |
113 | 113 | ipc_unix.c ipc_doors.c saslauthd-main.c saslauthd-main.h \ |
114 | 114 | md5.c saslauthd_md5.h |
115 | 115 | EXTRA_saslauthd_sources = getaddrinfo.c getnameinfo.c |
117 | 117 | +saslauthd_DEPENDENCIES = saslauthd-main.o |
118 | 118 | saslauthd_LDADD = @SASL_KRB_LIB@ \ |
119 | 119 | @GSSAPIBASE_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \ |
120 | - @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ $(LTLIBOBJS_FULL) | |
121 | + @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ | |
120 | - @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ $(LTLIBOBJS_FULL) $(CRYPTO_COMPAT_OBJS) $(LIBSASLDB_OBJS) | |
121 | + @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ $(CRYPTO_COMPAT_OBJS) $(LIBSASLDB_OBJS) | |
122 | 122 | |
123 | 123 | testsaslauthd_SOURCES = testsaslauthd.c utils.c |
124 | 124 | testsaslauthd_LDADD = @LIB_SOCKET@ |
6 | 6 | 1 file changed, 3 insertions(+), 1 deletion(-) |
7 | 7 | |
8 | 8 | diff --git a/configure.ac b/configure.ac |
9 | index 708cfca..e9f451d 100644 | |
9 | index 58dcecd..38eaddb 100644 | |
10 | 10 | --- a/configure.ac |
11 | 11 | +++ b/configure.ac |
12 | @@ -919,7 +919,9 @@ case "$with_pgsql" in | |
12 | @@ -927,7 +927,9 @@ case "$with_pgsql" in | |
13 | 13 | LIB_PGSQL_DIR=$LIB_PGSQL |
14 | 14 | LIB_PGSQL="$LIB_PGSQL -lpq" |
15 | 15 |
3 | 3 | 0004-Include-dbconverter-2-in-sbin_PROGRAMS-and-set-defau.patch |
4 | 4 | 0005-Fixes-in-library-mutexes.patch |
5 | 5 | 0006-Enable-autoconf-maintainer-mode.patch |
6 | 0007-Define-_XOPEN_SOURCE-in-auth_shadow.c-to-get-proper-.patch | |
7 | 6 | 0008-Don-t-overwrite-PIC-objects-with-non-PIC-variant.patch |
8 | 7 | 0009-Look-for-generic-Berkeley-DB-first.patch |
9 | 8 | 0010-Update-required-libraries-when-ld-as-needed-is-used.patch |
10 | 0011-Drop-krb5support-dependency.patch | |
11 | 0012-LDAP-fixes.patch | |
12 | 9 | 0013-Don-t-use-la-files-for-opening-plugins.patch |
13 | 10 | 0014-Don-t-use-R-when-searching-for-SQLite-libraries.patch |
14 | 11 | 0015-Revert-1.103-revision-to-unbreak-GSSAPI.patch |
15 | 0016-Fix-segfault-in-GSSAPI.patch | |
16 | 0017-Fix-dovecot-authentication.patch | |
17 | 12 | 0018-Temporary-multiarch-fixes.patch |
18 | 13 | 0019-Add-reference-to-LDAP_SASLAUTHD-file-to-the-saslauth.patch |
19 | 0020-Send-IMAP-logout.patch | |
20 | 0021-Fix-canonuser-ldapdb-garbage-in-out-buffer.patch | |
21 | 14 | 0022-Fix-keytab-option-for-MIT-Kerberos.patch |
22 | 0023-Release-server-creds-when-they-are-no-longer-needed.patch | |
23 | 0024-Fix-typo-in-debugging-logs.patch | |
24 | 15 | 0025-Revert-upstream-soname-bump.patch |
25 | 0026-Fix-return-SASL_FAIL-in-void-sasl_dispose.patch | |
26 | 16 | 0027-properly-create-libsasl2.pc.patch |
27 | 0028-2.1.26-Allow-CAPABILITY-lines-in-IMAP-login-reply-v4.patch | |
28 | 0029-Fix-early-hangup-in-ipc_unix.c.patch | |
29 | 0030-Change-linking-from-sasldb-.libs-libsasldb.al-to-sas.patch | |
30 | 17 | 0031-Cleanup-for-modern-autotools.patch |
31 | 18 | 0032-Add-with_pgsql-include-postgresql-to-include-path.patch |