summaryrefslogtreecommitdiffstats
path: root/base/server/cms/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2014-09-01 12:53:28 -0400
committerAde Lee <alee@redhat.com>2014-09-02 15:45:33 -0400
commit0507afc6b1226b2878aafde8487eba736c74514f (patch)
treed08bc1b97c7652ce30396619a126b1dab494bb0d /base/server/cms/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java
parent99e6330ce13e55ac325d76bdc33f1b1b00cba5d3 (diff)
downloadpki-0507afc6b1226b2878aafde8487eba736c74514f.tar.gz
pki-0507afc6b1226b2878aafde8487eba736c74514f.tar.xz
pki-0507afc6b1226b2878aafde8487eba736c74514f.zip
Fix kra-connector-remove
The code to remove the connector from the pki CLI was found to be broken because of invalid message type (partly due to void returns). On uninstall, we need to remove the kra-connector from all relevant CA's in the security domain. The best way to do this is to keep kra-connector info in LDAP, so that only one call is needed. Until that change has been made, we are adding a hack to remove the connector from all CA's in the secutrity domain (if it exists). Due to issues with proxy configurations, we will continue to use sslget and a url-encoded-form version of the servlet. In addition, it was found that when removing a KRA from a shared subsystem, the updateDomainXML servlet was erroneously returning failure when it was unsuccessful in removing a non-existent user from a group. Ticket 1113
Diffstat (limited to 'base/server/cms/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java')
-rw-r--r--base/server/cms/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/base/server/cms/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java b/base/server/cms/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java
index b783c359b..9aa150475 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java
@@ -96,7 +96,8 @@ public class UpdateDomainXML extends CMSServlet {
conn = connFactory.getConn();
conn.delete(dn);
} catch (LDAPException e) {
- if (e.getLDAPResultCode() != LDAPException.NO_SUCH_OBJECT) {
+ int resultCode = e.getLDAPResultCode();
+ if (resultCode != LDAPException.NO_SUCH_OBJECT) {
status = FAILED;
CMS.debug("Failed to delete entry" + e.toString());
}
@@ -129,7 +130,9 @@ public class UpdateDomainXML extends CMSServlet {
conn = connFactory.getConn();
conn.modify(dn, mod);
} catch (LDAPException e) {
- if (e.getLDAPResultCode() != LDAPException.NO_SUCH_OBJECT) {
+ int resultCode = e.getLDAPResultCode();
+ if ((resultCode != LDAPException.NO_SUCH_OBJECT) &&
+ (resultCode != LDAPException.NO_SUCH_ATTRIBUTE)) {
status = FAILED;
CMS.debug("Failed to modify entry" + e.toString());
}