|
|
723150 |
From 451838933f9989d1ff9c46dbb3cae7619166a4d8 Mon Sep 17 00:00:00 2001
|
|
|
723150 |
From: Thierry Bordaz <tbordaz@redhat.com>
|
|
|
723150 |
Date: Fri, 21 Oct 2016 16:28:59 +0200
|
|
|
723150 |
Subject: [PATCH 67/67] Ticket 49016 - (un)register/migration/remove may fail
|
|
|
723150 |
if there is no suffix on 'userRoot' backend
|
|
|
723150 |
|
|
|
723150 |
Bug Description:
|
|
|
723150 |
If an instance has no suffix on 'userRoot' backend, then the info structure
|
|
|
723150 |
may contain empty 'Suffix'.
|
|
|
723150 |
In fact if the last backend has no suffix (like cn=config), it overwite all
|
|
|
723150 |
previsously found value.
|
|
|
723150 |
This affect register (and possibly unregister/migrate/remove)
|
|
|
723150 |
|
|
|
723150 |
Fix Description:
|
|
|
723150 |
Before overwriting the 'Suffix' value, check that the found backend contains
|
|
|
723150 |
'nsslapd-suffix'.
|
|
|
723150 |
|
|
|
723150 |
https://fedorahosted.org/389/ticket/49016
|
|
|
723150 |
|
|
|
723150 |
Reviewed by: Noriko Hosoi (Thank you Noriko)
|
|
|
723150 |
|
|
|
723150 |
Platforms tested: RHEL 7.2
|
|
|
723150 |
|
|
|
723150 |
Flag Day: no
|
|
|
723150 |
|
|
|
723150 |
Doc impact: no
|
|
|
723150 |
|
|
|
723150 |
(cherry picked from commit 1bafab5ae1e894ae3680679e03e457b9ace7e7d2)
|
|
|
723150 |
---
|
|
|
723150 |
ldap/admin/src/scripts/DSUtil.pm.in | 4 +++-
|
|
|
723150 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
723150 |
|
|
|
723150 |
diff --git a/ldap/admin/src/scripts/DSUtil.pm.in b/ldap/admin/src/scripts/DSUtil.pm.in
|
|
|
723150 |
index 756d6ea..eac59a3 100644
|
|
|
723150 |
--- a/ldap/admin/src/scripts/DSUtil.pm.in
|
|
|
723150 |
+++ b/ldap/admin/src/scripts/DSUtil.pm.in
|
|
|
723150 |
@@ -975,7 +975,9 @@ sub createInfFromConfig {
|
|
|
723150 |
}
|
|
|
723150 |
# use the userRoot suffix if available
|
|
|
723150 |
while ($ent) {
|
|
|
723150 |
- $suffix = $ent->getValues('nsslapd-suffix');
|
|
|
723150 |
+ if ($ent->getValues('nsslapd-suffix')) {
|
|
|
723150 |
+ $suffix = $ent->getValues('nsslapd-suffix');
|
|
|
723150 |
+ }
|
|
|
723150 |
last if ($ent->hasValue('cn', 'userRoot', 1));
|
|
|
723150 |
$ent = $conn->nextEntry();
|
|
|
723150 |
}
|
|
|
723150 |
--
|
|
|
723150 |
2.9.3
|
|
|
723150 |
|