Thursday, June 30, 2016

[389-commits] admserv/newinst

admserv/newinst/src/AdminUtil.pm.in | 6 ++++++
1 file changed, 6 insertions(+)

New commits:
commit 2eaaf09dcd93b1cab4d0d5cef59bc3f2110b754f
Author: Mark Reynolds <mreynolds@redhat.com>
Date: Thu Jun 30 11:45:35 2016 -0400

Ticket 48907 - register-ds-admin fails to find local config DS

Bug Description: If adm.conf's startLdap directive uses the server instance ID
without the prefix "slapd-" then the registeration script
keeps asking for an admin password and never progresses.

Fix Description: Allow getLocalConfigDS() to handle instacne names with/without
the "slapd-" prefix.

https://fedorahosted.org/389/ticket/48907

Reviewed by: nhosoi(Thanks!)

diff --git a/admserv/newinst/src/AdminUtil.pm.in b/admserv/newinst/src/AdminUtil.pm.in
index 3ded348..0ac607e 100644
--- a/admserv/newinst/src/AdminUtil.pm.in
+++ b/admserv/newinst/src/AdminUtil.pm.in
@@ -658,6 +658,12 @@ sub getLocalConfigDS {

if ($ldapStart =~ /slapd-(.+?)\//) {
$inst = $1;
+ } else {
+ # The instance name might not prefixed with "slapd-"
+ my @parts = split / /, $ldapStart;
+ if ($#parts > 0){
+ $inst = $parts[1];
+ }
}

return $inst;

--
389-commits mailing list
389-commits@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/389-commits@lists.fedoraproject.org

No comments:

Post a Comment