Hello community, here is the log from the commit of package dovecot22 for openSUSE:Factory checked in at 2017-10-21 20:21:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dovecot22 (Old) and /work/SRC/openSUSE:Factory/.dovecot22.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dovecot22" Sat Oct 21 20:21:37 2017 rev:36 rq:535500 version:2.2.33.2 Changes: -------- --- /work/SRC/openSUSE:Factory/dovecot22/dovecot22.changes 2017-10-17 01:53:48.822793174 +0200 +++ /work/SRC/openSUSE:Factory/.dovecot22.new/dovecot22.changes 2017-10-21 20:21:39.303339684 +0200 @@ -1,0 +2,11 @@ +Fri Oct 20 14:24:56 UTC 2017 - mrueck...@suse.de + +- update to 2.2.33.2 + - doveadm: Fix crash in proxying (or dsync replication) if remote + is running older than v2.2.33 + - auth: Fix memory leak in %{ldap_dn} + - dict-sql: Fix data types to work correctly with Cassandra +- drop 187fbf157d5c42f9f06ce52884fefbb4f66c070d.patch: + included in update + +------------------------------------------------------------------- Old: ---- 187fbf157d5c42f9f06ce52884fefbb4f66c070d.patch dovecot-2.2.33.1.tar.gz New: ---- dovecot-2.2.33.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dovecot22.spec ++++++ --- /var/tmp/diff_new_pack.jaIEia/_old 2017-10-21 20:21:40.263294731 +0200 +++ /var/tmp/diff_new_pack.jaIEia/_new 2017-10-21 20:21:40.267294544 +0200 @@ -17,10 +17,10 @@ Name: dovecot22 -Version: 2.2.33.1 +Version: 2.2.33.2 Release: 0 %define pkg_name dovecot -%define dovecot_version 2.2.33.1 +%define dovecot_version 2.2.33.2 %define dovecot_pigeonhole_version 0.4.21 %define dovecot_branch 2.2 %define dovecot_pigeonhole_source_dir %{pkg_name}-%{dovecot_branch}-pigeonhole-%{dovecot_pigeonhole_version} @@ -130,7 +130,6 @@ Patch: dovecot-2.2.18-dont_use_etc_ssl_certs.patch Patch1: dovecot-2.2.18-better_ssl_defaults.patch Patch2: dovecot-2.2.31-dhparams_fips_mode.patch -Patch3: 187fbf157d5c42f9f06ce52884fefbb4f66c070d.patch Summary: IMAP and POP3 Server Written Primarily with Security in Mind License: BSD-3-Clause and LGPL-2.1+ and MIT Group: Productivity/Networking/Email/Servers @@ -311,7 +310,6 @@ %patch -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 %{__gzip} -9v ChangeLog # Fix plugins dir. %{__sed} -i 's|#mail_plugin_dir = /usr/lib/dovecot|mail_plugin_dir = %{_libdir}/dovecot/modules|' doc/example-config/conf.d/10-mail.conf ++++++ dovecot-2.2.33.1.tar.gz -> dovecot-2.2.33.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.2.33.1/ChangeLog new/dovecot-2.2.33.2/ChangeLog --- old/dovecot-2.2.33.1/ChangeLog 2017-10-11 18:45:02.000000000 +0200 +++ new/dovecot-2.2.33.2/ChangeLog 2017-10-20 15:35:03.000000000 +0200 @@ -1,3 +1,52 @@ +2017-10-20 16:34:22 +0300 Timo Sirainen <timo.sirai...@dovecot.fi> (d6601f4ec) + + Released v2.2.33.2. + + +M NEWS +M configure.ac + +2017-10-19 15:39:28 +0300 Timo Sirainen <timo.sirai...@dovecot.fi> (366d80c44) + + auth: Fix %{ldap_dn} not to leak memory + + +M src/auth/db-ldap.c + +2017-10-16 15:41:56 +0300 Timo Sirainen <timo.sirai...@dovecot.fi> (b06c43234) + + cassandra: Support "timestamp" type fields properly + + Fixes setting them with prepared statements. Reading them never worked + earlier. + +M src/lib-sql/driver-cassandra.c + +2017-10-16 15:12:12 +0300 Timo Sirainen <timo.sirai...@dovecot.fi> (5d4780b89) + + cassandra: Include "prepared" when logging about prepared statement queries + + Mainly useful for debugging/testing. + +M src/lib-sql/driver-cassandra.c + +2017-10-16 14:49:56 +0300 Timo Sirainen <timo.sirai...@dovecot.fi> (be665d47d) + + cassandra: Fix using bigint types with unprepared statements + + This reverts the code to not using the statements with binding at all. + Alternative fix would be to start using explicit int32 or int64 parameter + types, but that breaks backwards compatibility a bit. + +M src/lib-sql/driver-cassandra.c + +2017-10-14 12:54:18 +0300 Timo Sirainen <timo.sirai...@dovecot.fi> (758404a3b) + + doveadm proxy: Don't crash if remote doesn't support log proxying + + +M src/doveadm/server-connection.c + 2017-10-11 19:43:04 +0300 Timo Sirainen <timo.sirai...@dovecot.fi> (e9afa7f18) Released v2.2.33.1. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.2.33.1/NEWS new/dovecot-2.2.33.2/NEWS --- old/dovecot-2.2.33.1/NEWS 2017-10-11 18:44:37.000000000 +0200 +++ new/dovecot-2.2.33.2/NEWS 2017-10-20 15:33:34.000000000 +0200 @@ -1,3 +1,10 @@ +v2.2.33.2 2017-10-20 Timo Sirainen <t...@iki.fi> + + - doveadm: Fix crash in proxying (or dsync replication) if remote is + running older than v2.2.33 + - auth: Fix memory leak in %{ldap_dn} + - dict-sql: Fix data types to work correctly with Cassandra + v2.2.33.1 2017-10-10 Timo Sirainen <t...@iki.fi> - dovecot-lda was logging to stderr instead of to the log file. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.2.33.1/configure new/dovecot-2.2.33.2/configure --- old/dovecot-2.2.33.1/configure 2017-10-11 18:44:48.000000000 +0200 +++ new/dovecot-2.2.33.2/configure 2017-10-20 15:34:49.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Dovecot 2.2.33.1. +# Generated by GNU Autoconf 2.69 for Dovecot 2.2.33.2. # # Report bugs to <dove...@dovecot.org>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='Dovecot' PACKAGE_TARNAME='dovecot' -PACKAGE_VERSION='2.2.33.1' -PACKAGE_STRING='Dovecot 2.2.33.1' +PACKAGE_VERSION='2.2.33.2' +PACKAGE_STRING='Dovecot 2.2.33.2' PACKAGE_BUGREPORT='dove...@dovecot.org' PACKAGE_URL='' @@ -1516,7 +1516,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Dovecot 2.2.33.1 to adapt to many kinds of systems. +\`configure' configures Dovecot 2.2.33.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1587,7 +1587,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Dovecot 2.2.33.1:";; + short | recursive ) echo "Configuration of Dovecot 2.2.33.2:";; esac cat <<\_ACEOF @@ -1778,7 +1778,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Dovecot configure 2.2.33.1 +Dovecot configure 2.2.33.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Dovecot $as_me 2.2.33.1, which was +It was created by Dovecot $as_me 2.2.33.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3375,7 +3375,7 @@ # Define the identity of the package. PACKAGE='dovecot' - VERSION='2.2.33.1' + VERSION='2.2.33.2' cat >>confdefs.h <<_ACEOF @@ -27996,7 +27996,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Dovecot $as_me 2.2.33.1, which was +This file was extended by Dovecot $as_me 2.2.33.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -28062,7 +28062,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Dovecot config.status 2.2.33.1 +Dovecot config.status 2.2.33.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.2.33.1/configure.ac new/dovecot-2.2.33.2/configure.ac --- old/dovecot-2.2.33.1/configure.ac 2017-10-11 18:44:37.000000000 +0200 +++ new/dovecot-2.2.33.2/configure.ac 2017-10-20 15:31:06.000000000 +0200 @@ -2,7 +2,7 @@ # Be sure to update ABI version also if anything changes that might require # recompiling plugins. Most importantly that means if any structs are changed. -AC_INIT([Dovecot],[2.2.33.1],[dove...@dovecot.org]) +AC_INIT([Dovecot],[2.2.33.2],[dove...@dovecot.org]) AC_DEFINE_UNQUOTED([DOVECOT_ABI_VERSION], "2.2.ABIv33($PACKAGE_VERSION)", [Dovecot ABI version]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_SRCDIR([src]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.2.33.1/dovecot-version.h new/dovecot-2.2.33.2/dovecot-version.h --- old/dovecot-2.2.33.1/dovecot-version.h 2017-10-11 18:45:02.000000000 +0200 +++ new/dovecot-2.2.33.2/dovecot-version.h 2017-10-20 15:35:03.000000000 +0200 @@ -1,7 +1,7 @@ #ifndef DOVECOT_VERSION_H #define DOVECOT_VERSION_H -#define DOVECOT_VERSION_FULL VERSION" (e9afa7f18)" +#define DOVECOT_VERSION_FULL VERSION" (d6601f4ec)" #define DOVECOT_BUILD_INFO DOVECOT_VERSION_FULL #endif /* DOVECOT_VERSION_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.2.33.1/src/auth/db-ldap.c new/dovecot-2.2.33.2/src/auth/db-ldap.c --- old/dovecot-2.2.33.1/src/auth/db-ldap.c 2017-10-10 17:15:50.000000000 +0200 +++ new/dovecot-2.2.33.2/src/auth/db-ldap.c 2017-10-20 15:31:02.000000000 +0200 @@ -1660,7 +1660,10 @@ db_ldap_field_dn_expand(const char *data ATTR_UNUSED, void *context ATTR_UNUSED) { struct db_ldap_result_iterate_context *ctx = context; - return ldap_get_dn(ctx->ld, ctx->ldap_msg); + char *dn = ldap_get_dn(ctx->ld, ctx->ldap_msg); + const char *dn_dup = t_strdup(dn); + ldap_memfree(dn); + return dn_dup; } static struct var_expand_func_table ldap_var_funcs_table[] = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.2.33.1/src/doveadm/server-connection.c new/dovecot-2.2.33.2/src/doveadm/server-connection.c --- old/dovecot-2.2.33.1/src/doveadm/server-connection.c 2017-10-10 17:15:50.000000000 +0200 +++ new/dovecot-2.2.33.2/src/doveadm/server-connection.c 2017-10-20 15:31:02.000000000 +0200 @@ -402,7 +402,8 @@ return FALSE; /* check logs */ - (void)server_connection_print_log(conn); + if (conn->log_input != NULL) + (void)server_connection_print_log(conn); switch (conn->state) { case SERVER_REPLY_STATE_DONE: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dovecot-2.2.33.1/src/lib-sql/driver-cassandra.c new/dovecot-2.2.33.2/src/lib-sql/driver-cassandra.c --- old/dovecot-2.2.33.1/src/lib-sql/driver-cassandra.c 2017-10-05 19:10:44.000000000 +0200 +++ new/dovecot-2.2.33.2/src/lib-sql/driver-cassandra.c 2017-10-20 15:31:02.000000000 +0200 @@ -138,6 +138,7 @@ sql_query_callback_t *callback; void *context; + unsigned int is_prepared:1; unsigned int query_sent:1; unsigned int finished:1; unsigned int paging_continues:1; @@ -774,7 +775,8 @@ i_fatal("gettimeofday() failed: %m"); string_t *str = t_str_new(128); - str_printfa(str, "cassandra: Finished query '%s' (", result->query); + str_printfa(str, "cassandra: Finished %squery '%s' (", + result->is_prepared ? "prepared " : "", result->query); if (all_pages) { str_printfa(str, "%u pages in total, ", result->page_num); row_count = result->total_row_count; @@ -1101,6 +1103,7 @@ static struct cassandra_result * driver_cassandra_query_init(struct cassandra_db *db, const char *query, enum cassandra_query_type query_type, + bool is_prepared, sql_query_callback_t *callback, void *context) { struct cassandra_result *result; @@ -1113,6 +1116,7 @@ result->context = context; result->query_type = query_type; result->query = i_strdup(query); + result->is_prepared = is_prepared; array_append(&db->results, &result, 1); return result; } @@ -1125,7 +1129,7 @@ struct cassandra_db *db = (struct cassandra_db *)_db; struct cassandra_result *result; - result = driver_cassandra_query_init(db, query, query_type, + result = driver_cassandra_query_init(db, query, query_type, FALSE, callback, context); result->statement = cass_statement_new(query, 0); (void)driver_cassandra_send_query(result); @@ -1256,6 +1260,7 @@ type = "int32"; break; } + case CASS_VALUE_TYPE_TIMESTAMP: case CASS_VALUE_TYPE_BIGINT: { cass_int64_t num; @@ -1350,6 +1355,7 @@ /* Initialize the next page as a new sql_result */ new_result = driver_cassandra_query_init(db, old_result->query, CASSANDRA_QUERY_TYPE_READ_MORE, + old_result->is_prepared, callback, context); /* Preserve the statement and update its paging state */ @@ -1548,7 +1554,7 @@ transaction_commit_callback, ctx); } else { ctx->stmt->result = - driver_cassandra_query_init(db, query, query_type, + driver_cassandra_query_init(db, query, query_type, TRUE, transaction_commit_callback, ctx); if (ctx->stmt->cass_stmt == NULL) { /* wait for prepare to finish */ @@ -1648,20 +1654,18 @@ const CassDataType *data_type; CassValueType value_type; - if (stmt->prep == NULL) { - value_type = value >= -2147483648 && value <= 2147483647 ? - CASS_VALUE_TYPE_INT : CASS_VALUE_TYPE_BIGINT; - } else { - /* prepared statements require exactly correct value type */ - data_type = cass_prepared_parameter_data_type(stmt->prep->prepared, column_idx); - value_type = cass_data_type_type(data_type); - } + i_assert(stmt->prep != NULL); + + /* statements require exactly correct value type */ + data_type = cass_prepared_parameter_data_type(stmt->prep->prepared, column_idx); + value_type = cass_data_type_type(data_type); switch (value_type) { case CASS_VALUE_TYPE_INT: if (value < -2147483648 || value > 2147483647) return CASS_ERROR_LIB_INVALID_VALUE_TYPE; return cass_statement_bind_int32(stmt->cass_stmt, column_idx, value); + case CASS_VALUE_TYPE_TIMESTAMP: case CASS_VALUE_TYPE_BIGINT: return cass_statement_bind_int64(stmt->cass_stmt, column_idx, value); case CASS_VALUE_TYPE_SMALL_INT: @@ -1826,24 +1830,12 @@ static struct sql_statement * driver_cassandra_statement_init(struct sql_db *db ATTR_UNUSED, - const char *query_template) + const char *query_template ATTR_UNUSED) { pool_t pool = pool_alloconly_create("cassandra sql statement", 1024); struct cassandra_sql_statement *stmt = p_new(pool, struct cassandra_sql_statement, 1); - - /* Count the number of parameters in the query. We'll assume that all - the changing parameters are bound, so there shouldn't be any - quoted strings with '?' in them. */ - const char *p = query_template; - size_t param_count = 0; - while ((p = strchr(p, '?')) != NULL) { - param_count++; - p++; - } - stmt->stmt.pool = pool; - stmt->cass_stmt = cass_statement_new(query_template, param_count); return &stmt->stmt; } @@ -1921,7 +1913,7 @@ (struct cassandra_sql_statement *)_stmt; if (stmt->cass_stmt != NULL) cass_statement_bind_string(stmt->cass_stmt, column_idx, value); - else { + else if (stmt->prep != NULL) { struct cassandra_sql_arg *arg = driver_cassandra_add_pending_arg(stmt, column_idx); arg->value_str = p_strdup(_stmt->pool, value); @@ -1939,7 +1931,7 @@ if (stmt->cass_stmt != NULL) { cass_statement_bind_bytes(stmt->cass_stmt, column_idx, value, value_size); - } else { + } else if (stmt->prep != NULL) { struct cassandra_sql_arg *arg = driver_cassandra_add_pending_arg(stmt, column_idx); arg->value_binary = p_memdup(_stmt->pool, value, value_size); @@ -1956,7 +1948,7 @@ if (stmt->cass_stmt != NULL) driver_cassandra_bind_int(stmt, column_idx, value); - else { + else if (stmt->prep != NULL) { struct cassandra_sql_arg *arg = driver_cassandra_add_pending_arg(stmt, column_idx); arg->value_int64 = value; @@ -1970,17 +1962,27 @@ struct cassandra_sql_statement *stmt = (struct cassandra_sql_statement *)_stmt; struct cassandra_db *db = (struct cassandra_db *)_stmt->db; + const char *query = sql_statement_get_query(_stmt); + bool is_prepared = stmt->cass_stmt != NULL || stmt->prep != NULL; - stmt->result = driver_cassandra_query_init(db, sql_statement_get_query(_stmt), + stmt->result = driver_cassandra_query_init(db, query, CASSANDRA_QUERY_TYPE_READ, + is_prepared, callback, context); - if (stmt->cass_stmt == NULL) { + if (stmt->cass_stmt != NULL) { + stmt->result->statement = stmt->cass_stmt; + } else if (stmt->prep != NULL) { /* wait for prepare to finish */ + return; } else { - stmt->result->statement = stmt->cass_stmt; - (void)driver_cassandra_send_query(stmt->result); - pool_unref(&_stmt->pool); + stmt->result->statement = cass_statement_new(query, 0); + if (stmt->pending_timestamp != 0) { + cass_statement_set_timestamp(stmt->result->statement, + stmt->pending_timestamp); + } } + (void)driver_cassandra_send_query(stmt->result); + pool_unref(&_stmt->pool); } static struct sql_result * @@ -2005,7 +2007,10 @@ transaction_set_failed(ctx, "Multiple changes in transaction not supported"); return; } - ctx->stmt = stmt; + if (stmt->prep != NULL) + ctx->stmt = stmt; + else + ctx->query = i_strdup(sql_statement_get_query(_stmt)); } const struct sql_db driver_cassandra_db = {