From edc5dbc514da3aeb6dca5f0a218f3330cea0fce3 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Apr 27 2016 19:42:52 +0000 Subject: 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