Accepting request 655860 from home:darix:branches:server:mail
- added 3c5101ffdd2a8115e03ed7180d53578765dea4c9.patch: fix crash with mysql/mariadb OBS-URL: https://build.opensuse.org/request/show/655860 OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot23?expand=0&rev=34
This commit is contained in:
parent
16852df8e8
commit
fbdf7e7877
36
3c5101ffdd2a8115e03ed7180d53578765dea4c9.patch
Normal file
36
3c5101ffdd2a8115e03ed7180d53578765dea4c9.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 3c5101ffdd2a8115e03ed7180d53578765dea4c9 Mon Sep 17 00:00:00 2001
|
||||
From: Aki Tuomi <aki.tuomi@dovecot.fi>
|
||||
Date: Tue, 4 Dec 2018 14:40:04 +0200
|
||||
Subject: [PATCH] driver-mysql: Avoid double-closing MySQL connection
|
||||
|
||||
Fixes double-free
|
||||
---
|
||||
src/lib-sql/driver-mysql.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/lib-sql/driver-mysql.c b/src/lib-sql/driver-mysql.c
|
||||
index c87e825e4b..5dd1c3124f 100644
|
||||
--- a/src/lib-sql/driver-mysql.c
|
||||
+++ b/src/lib-sql/driver-mysql.c
|
||||
@@ -173,7 +173,9 @@ static int driver_mysql_connect(struct sql_db *_db)
|
||||
static void driver_mysql_disconnect(struct sql_db *_db)
|
||||
{
|
||||
struct mysql_db *db = (struct mysql_db *)_db;
|
||||
- mysql_close(db->mysql);
|
||||
+ if (db->mysql != NULL)
|
||||
+ mysql_close(db->mysql);
|
||||
+ db->mysql = NULL;
|
||||
}
|
||||
|
||||
static int driver_mysql_parse_connect_string(struct mysql_db *db,
|
||||
@@ -311,7 +313,9 @@ static void driver_mysql_deinit_v(struct sql_db *_db)
|
||||
_db->no_reconnect = TRUE;
|
||||
sql_db_set_state(&db->api, SQL_DB_STATE_DISCONNECTED);
|
||||
|
||||
- mysql_close(db->mysql);
|
||||
+ if (db->mysql != NULL)
|
||||
+ mysql_close(db->mysql);
|
||||
+ db->mysql = NULL;
|
||||
|
||||
sql_connection_log_finished(_db);
|
||||
event_unref(&_db->event);
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 6 17:32:43 UTC 2018 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- added 3c5101ffdd2a8115e03ed7180d53578765dea4c9.patch:
|
||||
fix crash with mysql/mariadb
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 25 00:17:08 UTC 2018 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
|
@ -137,6 +137,7 @@ Source12: dovecot23.keyring
|
||||
Patch: dovecot-2.3.0-dont_use_etc_ssl_certs.patch
|
||||
Patch1: dovecot-2.3.0-better_ssl_defaults.patch
|
||||
Patch2: 10048229...de42b54a.patch
|
||||
Patch3: 3c5101ffdd2a8115e03ed7180d53578765dea4c9.patch
|
||||
Summary: IMAP and POP3 Server Written Primarily with Security in Mind
|
||||
License: BSD-3-Clause AND LGPL-2.1-or-later AND MIT
|
||||
Group: Productivity/Networking/Email/Servers
|
||||
@ -317,6 +318,7 @@ dovecot tree.
|
||||
%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
|
||||
|
Loading…
Reference in New Issue
Block a user