From 51c184e7cb5b43a44e638bbb491e4843dc48a02fcfd45d590d56a9c971811fb6 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 17 Aug 2018 11:01:21 +0000 Subject: [PATCH] Accepting request 629739 from home:ckowalczyk:branches:network:ldap:bsc1089640 - Fix slapd segfaults in mdb_env_reader_dest + with patch 0016-Clear-shared-key-only-in-close-function.patch + (bsc#1089640) OBS-URL: https://build.opensuse.org/request/show/629739 OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=221 --- ...Clear-shared-key-only-in-close-function.patch | 16 ++++++++++++++++ openldap2.changes | 7 +++++++ openldap2.spec | 2 ++ 3 files changed, 25 insertions(+) create mode 100644 0016-Clear-shared-key-only-in-close-function.patch diff --git a/0016-Clear-shared-key-only-in-close-function.patch b/0016-Clear-shared-key-only-in-close-function.patch new file mode 100644 index 0000000..994cd1e --- /dev/null +++ b/0016-Clear-shared-key-only-in-close-function.patch @@ -0,0 +1,16 @@ +diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c +index 6bdf3151d..56212151b 100644 +--- a/libraries/liblmdb/mdb.c ++++ b/libraries/liblmdb/mdb.c +@@ -4692,6 +4692,11 @@ mdb_env_close0(MDB_env *env, int excl) + + if (env->me_flags & MDB_ENV_TXKEY) { + pthread_key_delete(env->me_txkey); ++ ++ // No need to call desctructor anymore, as all pid ++ // values are cleared below. ++ env->me_txkey = NULL; ++ + #ifdef _WIN32 + /* Delete our key from the global list */ + for (i=0; i