Wednesday, April 27, 2016

[389-commits] admserv/cgi-src40

admserv/cgi-src40/ds_remove.in | 6 ++++++
1 file changed, 6 insertions(+)

New commits:
commit edc5dbc514da3aeb6dca5f0a218f3330cea0fce3
Author: Noriko Hosoi <nhosoi@redhat.com>
Date: Wed Apr 27 11:28:14 2016 -0700

Ticket #48410 - 389-admin - Unable to remove / unregister a DS instance from admin server

Description: The cgi ds_remove missed to map ServerAdminId.
NMC_ErrInfo: The map value 'ServerAdminID' for key 'as_uid' did
not map to a value in any of the given information files.
This patch adds the mapping using admpw.conf.

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

Reviewed by mreynolds@redhat.com (Thank you, Mark!!)

diff --git a/admserv/cgi-src40/ds_remove.in b/admserv/cgi-src40/ds_remove.in
index cb7abe3..851afde 100755
--- a/admserv/cgi-src40/ds_remove.in
+++ b/admserv/cgi-src40/ds_remove.in
@@ -113,6 +113,12 @@ $inf->{General}->{ConfigDirectoryLdapURL} = $query->param('ldap_url') ||
$admConf->{ldapurl};
$inf->{General}->{AdminDomain} = $query->param('admin_domain') ||
$admConf->{AdminDomain};
+my $admpw = AdminUtil::getAdmpw($admConf);
+if ($admpw && %{$admpw}) {
+ unless (defined($inf->{admin}->{ServerAdminID})) {
+ $inf->{admin}->{ServerAdminID} = $admpw->{ServerAdminID};
+ }
+}

# Unregister the server from the configuration ds
# get config ds url from input or admconf

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

No comments:

Post a Comment