diff --git a/SOURCES/0001-ITS-9146-syncprov-fix-sessionlog-init.patch b/SOURCES/0001-ITS-9146-syncprov-fix-sessionlog-init.patch new file mode 100644 index 0000000..e5df29d --- /dev/null +++ b/SOURCES/0001-ITS-9146-syncprov-fix-sessionlog-init.patch @@ -0,0 +1,30 @@ +From 5603704d04f4ed43d62b36883073bd1157c9dd25 Mon Sep 17 00:00:00 2001 +From: Howard Chu +Date: Wed, 8 Jan 2020 22:22:14 +0000 +Subject: [PATCH] ITS#9146 syncprov: fix sessionlog init + +--- + servers/slapd/overlays/syncprov.c | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c +index c8e457c42..0e1f362f0 100644 +--- a/servers/slapd/overlays/syncprov.c ++++ b/servers/slapd/overlays/syncprov.c +@@ -3079,12 +3079,7 @@ sp_cf_gen(ConfigArgs *c) + } + sl = si->si_logs; + if ( !sl ) { +- sl = ch_malloc( sizeof( sessionlog )); +- sl->sl_mincsn = NULL; +- sl->sl_sids = NULL; +- sl->sl_num = 0; +- sl->sl_numcsns = 0; +- sl->sl_head = sl->sl_tail = NULL; ++ sl = ch_calloc( 1, sizeof( sessionlog )); + ldap_pvt_thread_mutex_init( &sl->sl_mutex ); + si->si_logs = sl; + } +-- +2.20.1 + diff --git a/SOURCES/0001-ITS-9150-fix-nosync-FALSE-config.patch b/SOURCES/0001-ITS-9150-fix-nosync-FALSE-config.patch new file mode 100644 index 0000000..364765b --- /dev/null +++ b/SOURCES/0001-ITS-9150-fix-nosync-FALSE-config.patch @@ -0,0 +1,25 @@ +From 4e8f9b90e01d093ffe9818ebc9d44b0956cfd9d6 Mon Sep 17 00:00:00 2001 +From: Howard Chu +Date: Sat, 11 Jan 2020 04:24:54 +0000 +Subject: [PATCH] ITS#9150 fix nosync FALSE config + +--- + servers/slapd/back-mdb/config.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/servers/slapd/back-mdb/config.c b/servers/slapd/back-mdb/config.c +index 46cb59d1f..f1b86c07a 100644 +--- a/servers/slapd/back-mdb/config.c ++++ b/servers/slapd/back-mdb/config.c +@@ -594,7 +594,7 @@ mdb_cf_gen( ConfigArgs *c ) + if ( c->value_int ) + mdb->mi_dbenv_flags |= MDB_NOSYNC; + else +- mdb->mi_dbenv_flags ^= MDB_NOSYNC; ++ mdb->mi_dbenv_flags &= ~MDB_NOSYNC; + if ( mdb->mi_flags & MDB_IS_OPEN ) { + mdb_env_set_flags( mdb->mi_dbenv, MDB_NOSYNC, + c->value_int ); +-- +2.20.1 + diff --git a/SPECS/openldap-ltb.spec b/SPECS/openldap-ltb.spec index e701098..084fd3e 100644 --- a/SPECS/openldap-ltb.spec +++ b/SPECS/openldap-ltb.spec @@ -7,8 +7,8 @@ # Configure syslog and logrotate # Install a pwdChecker module # -# Copyright (C) 2008-2019 Clement OUDOT -# Copyright (C) 2018-2019 Worteks +# Copyright (C) 2008-2020 Clement OUDOT +# Copyright (C) 2018-2020 Worteks # Copyright (C) 2015 David COUTADEUR # Copyright (C) 2008 Raphael OUAZANA # Copyright (C) 2015 LINAGORA @@ -22,7 +22,7 @@ #================================================= %define real_name openldap %define real_version 2.4.48 -%define release_version 2%{?dist} +%define release_version 3%{?dist} # Fix for CentOS7 %if 0%{?rhel} == 7 @@ -91,6 +91,8 @@ Source5: openldap.logrotate Source6: %{ppm_name}-%{ppm_version}.tar.gz # Sources available on https://github.com/davidcoutadeur/explockout Source7: %{explockout_name}-%{explockout_version}.tar.gz +Patch1: 0001-ITS-9146-syncprov-fix-sessionlog-init.patch +Patch2: 0001-ITS-9150-fix-nosync-FALSE-config.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc, make @@ -226,6 +228,8 @@ exponential time #================================================= %prep %setup -n %{real_name}-%{real_version} +%patch1 -p1 +%patch2 -p1 %setup -n %{real_name}-%{real_version} -T -D -a 1 %setup -n %{real_name}-%{real_version} -T -D -a 2 %setup -n %{real_name}-%{real_version} -T -D -a 6 @@ -653,6 +657,9 @@ rm -rf %{buildroot} # Changelog #================================================= %changelog +* Thu Jan 16 2020 - Clement Oudot - 2.4.48-3 +- Apply patch for ITS#9146 +- Apply patch for ITS#9150 * Thu Aug 29 2019 - Clement Oudot - 2.4.48-2 - Upgrade to initscript 2.5 - Upgrade to ppm 1.8