|
|
723150 |
From 99a0def5c6b9910616d95ee7cd15ecad5b406951 Mon Sep 17 00:00:00 2001
|
|
|
723150 |
From: Thierry Bordaz <tbordaz@redhat.com>
|
|
|
723150 |
Date: Mon, 30 Jan 2017 17:38:01 +0100
|
|
|
723150 |
Subject: [PATCH] Ticket 49016 - (un)register/migration/remove may fail if
|
|
|
723150 |
there is no suffix on 'userRoot' backend
|
|
|
723150 |
|
|
|
723150 |
Bug Description:
|
|
|
723150 |
Previous fix was incomplete in case none of the backend entries have
|
|
|
723150 |
'nsslapd-suffix' value
|
|
|
723150 |
|
|
|
723150 |
Fix Description:
|
|
|
723150 |
|
|
|
723150 |
Just return if $suffix keep unmodified
|
|
|
723150 |
|
|
|
723150 |
https://fedorahosted.org/389/ticket/49016
|
|
|
723150 |
|
|
|
723150 |
Reviewed by: nhosoi
|
|
|
723150 |
|
|
|
723150 |
Platforms tested: F23, F25
|
|
|
723150 |
|
|
|
723150 |
Flag Day: no
|
|
|
723150 |
|
|
|
723150 |
Doc impact: no
|
|
|
723150 |
|
|
|
723150 |
(cherry picked from commit bd5fdfc8f4a560eae99672b712235c1260ee42b0)
|
|
|
723150 |
(cherry picked from commit 1abb0ffb2930d019f58d5dac1937ddbb56c9287f)
|
|
|
723150 |
---
|
|
|
723150 |
ldap/admin/src/scripts/DSUtil.pm.in | 8 +++++++-
|
|
|
723150 |
1 file changed, 7 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 eac59a3..c8eb14d 100644
|
|
|
723150 |
--- a/ldap/admin/src/scripts/DSUtil.pm.in
|
|
|
723150 |
+++ b/ldap/admin/src/scripts/DSUtil.pm.in
|
|
|
723150 |
@@ -965,7 +965,7 @@ sub createInfFromConfig {
|
|
|
723150 |
$inf->{slapd}->{ServerPort} = $ent->getValues('nsslapd-port');
|
|
|
723150 |
$inf->{slapd}->{ServerIdentifier} = $id;
|
|
|
723150 |
|
|
|
723150 |
- my $suffix;
|
|
|
723150 |
+ my $suffix = "";
|
|
|
723150 |
$ent = $conn->search("cn=ldbm database,cn=plugins,cn=config",
|
|
|
723150 |
"one", "(objectclass=*)");
|
|
|
723150 |
if (!$ent) {
|
|
|
723150 |
@@ -981,6 +981,12 @@ sub createInfFromConfig {
|
|
|
723150 |
last if ($ent->hasValue('cn', 'userRoot', 1));
|
|
|
723150 |
$ent = $conn->nextEntry();
|
|
|
723150 |
}
|
|
|
723150 |
+ if ( "" eq "$suffix" )
|
|
|
723150 |
+ {
|
|
|
723150 |
+ push @{$errs}, "error_opening_dseldif", $fname, $!;
|
|
|
723150 |
+ $conn->close();
|
|
|
723150 |
+ return 0;
|
|
|
723150 |
+ }
|
|
|
723150 |
|
|
|
723150 |
# we also need the instance dir
|
|
|
723150 |
$ent = $conn->search("cn=config", "base", "(objectclass=*)");
|
|
|
723150 |
--
|
|
|
723150 |
2.9.3
|
|
|
723150 |
|