Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/389-ds-base.git#d9f3efb8f9f67cc8360f92669f3adce44ade4149
This commit is contained in:
DistroBaker 2020-10-30 02:30:32 +01:00
parent 33fed499c3
commit 9788aa4d18
4 changed files with 111 additions and 1540 deletions

1
.gitignore vendored
View File

@ -197,3 +197,4 @@
/389-ds-base-1.4.4.3.tar.bz2
/389-ds-base-1.4.4.4.tar.bz2
/389-ds-base-1.4.4.6.tar.bz2
/389-ds-base-1.4.5.0.tar.bz2

View File

@ -0,0 +1,103 @@
From 67c8b8702a249cb0ef1ebf49b6e87056cd5339f6 Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Tue, 27 Oct 2020 13:14:55 -0400
Subject: [PATCH] Issue 2526 - retrocl backend created out of order
Bug Description: A recent change verified that you do not create
a mappingtree entry before the backend entry was
created. The server created the retrocl backend
in the opposite order which broke the retrocl.
Fix Description: Create the retrocl backend entry before creating
the mapping tree entry.
Relates: https://github.com/389ds/389-ds-base/issues/2526
Reviewed by: viktor(Thanks!)
---
ldap/servers/plugins/retrocl/retrocl.c | 10 ++---
ldap/servers/plugins/retrocl/retrocl_create.c | 38 +++++++++----------
2 files changed, 22 insertions(+), 26 deletions(-)
diff --git a/ldap/servers/plugins/retrocl/retrocl.c b/ldap/servers/plugins/retrocl/retrocl.c
index 4af4d752b..8d6135dad 100644
--- a/ldap/servers/plugins/retrocl/retrocl.c
+++ b/ldap/servers/plugins/retrocl/retrocl.c
@@ -222,15 +222,11 @@ retrocl_select_backend(void)
slapi_entry_free(referral);
if (err != LDAP_SUCCESS || be == NULL || be == defbackend_get_backend()) {
- slapi_log_err(SLAPI_LOG_ERR, RETROCL_PLUGIN_NAME,
+ /* Could not find the backend for cn=changelog, either because
+ * it doesn't exist mapping tree not registered. */
+ slapi_log_err(SLAPI_LOG_PLUGIN, RETROCL_PLUGIN_NAME,
"retrocl_select_backend - Mapping tree select failed (%d) %s.\n", err, errbuf);
-
- /* could not find the backend for cn=changelog, either because
- * it doesn't exist
- * mapping tree not registered.
- */
err = retrocl_create_config();
-
if (err != LDAP_SUCCESS)
return err;
} else {
diff --git a/ldap/servers/plugins/retrocl/retrocl_create.c b/ldap/servers/plugins/retrocl/retrocl_create.c
index fb1503520..571e6899f 100644
--- a/ldap/servers/plugins/retrocl/retrocl_create.c
+++ b/ldap/servers/plugins/retrocl/retrocl_create.c
@@ -192,6 +192,25 @@ retrocl_create_config(void)
vals[0] = &val;
vals[1] = NULL;
+ retrocl_be_changelog = slapi_be_select_by_instance_name("changelog");
+
+ if (retrocl_be_changelog == NULL) {
+ /* This is not the nsslapd-changelogdir from cn=changelog4,cn=config */
+ char *bedir;
+
+ bedir = retrocl_get_config_str(CONFIG_CHANGELOG_DIRECTORY_ATTRIBUTE);
+ if (bedir == NULL) {
+ /* none specified */
+ }
+
+ rc = retrocl_create_be(bedir);
+ slapi_ch_free_string(&bedir);
+ if (rc != LDAP_SUCCESS && rc != LDAP_ALREADY_EXISTS) {
+ return rc;
+ }
+ retrocl_be_changelog = slapi_be_select_by_instance_name("changelog");
+ }
+
/* Assume the mapping tree node is missing. It doesn't hurt to
* attempt to add it if it already exists. You will see a warning
* in the errors file when the referenced backend does not exist.
@@ -256,25 +275,6 @@ retrocl_create_config(void)
return rc;
}
- retrocl_be_changelog = slapi_be_select_by_instance_name("changelog");
-
- if (retrocl_be_changelog == NULL) {
- /* This is not the nsslapd-changelogdir from cn=changelog4,cn=config */
- char *bedir;
-
- bedir = retrocl_get_config_str(CONFIG_CHANGELOG_DIRECTORY_ATTRIBUTE);
- if (bedir == NULL) {
- /* none specified */
- }
-
- rc = retrocl_create_be(bedir);
- slapi_ch_free_string(&bedir);
- if (rc != LDAP_SUCCESS && rc != LDAP_ALREADY_EXISTS) {
- return rc;
- }
- retrocl_be_changelog = slapi_be_select_by_instance_name("changelog");
- }
-
return LDAP_SUCCESS;
}
--
2.28.0

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,2 @@
SHA512 (389-ds-base-1.4.4.6.tar.bz2) = 4ce55096ce82b4de40341348ee6e8e785b27759980b5400567033ebeafd4b87317932d005ea213985db9a642aab11799c01e96a0a6df6747a92cbbda0c283c81
SHA512 (389-ds-base-1.4.5.0.tar.bz2) = a60299348f5f7c56293e8cfb57544fc28ac2b240ec1546eec96a8884340e971ecd1872e0a316ac532f5a431875f1314eea6cb85fd551f49857e891dd9b0ef385
SHA512 (jemalloc-5.2.1.tar.bz2) = 0bbb77564d767cef0c6fe1b97b705d368ddb360d55596945aea8c3ba5889fbce10479d85ad492c91d987caacdbbdccc706aa3688e321460069f00c05814fae02