Skip to content

Commit

Permalink
Apply patches for ITS 9146 and ITS 9150 (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
coudot committed Jan 16, 2020
1 parent 6e7712b commit 2f88c06
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 3 deletions.
30 changes: 30 additions & 0 deletions SOURCES/0001-ITS-9146-syncprov-fix-sessionlog-init.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 5603704d04f4ed43d62b36883073bd1157c9dd25 Mon Sep 17 00:00:00 2001
From: Howard Chu <[email protected]>
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

25 changes: 25 additions & 0 deletions SOURCES/0001-ITS-9150-fix-nosync-FALSE-config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 4e8f9b90e01d093ffe9818ebc9d44b0956cfd9d6 Mon Sep 17 00:00:00 2001
From: Howard Chu <[email protected]>
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

13 changes: 10 additions & 3 deletions SPECS/openldap-ltb.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -653,6 +657,9 @@ rm -rf %{buildroot}
# Changelog
#=================================================
%changelog
* Thu Jan 16 2020 - Clement Oudot <[email protected]> - 2.4.48-3
- Apply patch for ITS#9146
- Apply patch for ITS#9150
* Thu Aug 29 2019 - Clement Oudot <[email protected]> - 2.4.48-2
- Upgrade to initscript 2.5
- Upgrade to ppm 1.8
Expand Down

0 comments on commit 2f88c06

Please sign in to comment.