diff options
author | alee <alee@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-12-18 01:49:16 +0000 |
---|---|---|
committer | alee <alee@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-12-18 01:49:16 +0000 |
commit | 9870bcfe3fc135f3c6fa2c645f7947a6242ec435 (patch) | |
tree | 4d037fd4ac95f59f219f6d44c4f510d641b6ee61 /pki/base/common/src/com/netscape/cms/servlet | |
parent | 234b2a99d0845feeaebcf1acb3fd2fba757835a6 (diff) | |
download | pki-9870bcfe3fc135f3c6fa2c645f7947a6242ec435.tar.gz pki-9870bcfe3fc135f3c6fa2c645f7947a6242ec435.tar.xz pki-9870bcfe3fc135f3c6fa2c645f7947a6242ec435.zip |
Bugzilla BZ 547471: Apply PKI SELinux changes to PKI registry model
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@894 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/servlet')
3 files changed, 46 insertions, 1 deletions
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/UsrGrpAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/UsrGrpAdminServlet.java index f929587b4..a4d583dc7 100644 --- a/pki/base/common/src/com/netscape/cms/servlet/admin/UsrGrpAdminServlet.java +++ b/pki/base/common/src/com/netscape/cms/servlet/admin/UsrGrpAdminServlet.java @@ -2217,6 +2217,11 @@ public class UsrGrpAdminServlet extends AdminServlet { user.setPhone(phone); } + String userState = super.getParameter(req, Constants.PR_USER_STATE); + if (userState != null) { + user.setState(userState); + } + try { mMgr.modifyUser(user); NameValuePairs params = new NameValuePairs(); diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java index aa7ce76d6..2adeea469 100644 --- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java +++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java @@ -257,7 +257,13 @@ public class DonePanel extends WizardPanelBase { attrs = new LDAPAttributeSet(); attrs.add(new LDAPAttribute("objectclass", "top")); attrs.add(new LDAPAttribute("objectclass", "pkiSecurityDomain")); - attrs.add(new LDAPAttribute("name", secdomain)); + if (secdomain.equals("")) { + // this should not happen - just in case + CMS.debug("DonePanel display(): Security domain is an empty string!"); + throw new IOException("Security domain is an empty string!"); + } else { + attrs.add(new LDAPAttribute("name", secdomain)); + } attrs.add(new LDAPAttribute("ou", "Security Domain")); entry = new LDAPEntry(dn, attrs); conn.add(entry); diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java index 4337c5c64..9f2838b8c 100644 --- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java +++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateDomainXML.java @@ -251,6 +251,40 @@ public class UpdateDomainXML extends CMSServlet { String clone = httpReq.getParameter("clone"); String operation = httpReq.getParameter("operation"); + // ensure required parameters are present + // especially important for DS schema checking + String missing = ""; + if ((host == null) || host.equals("")) { + missing += " host "; + } + if ((name == null) || name.equals("")) { + missing += " name "; + } + if ((sport == null) || sport.equals("")) { + missing += " sport "; + } + if ((agentsport == null) || agentsport.equals("")) { + missing += " agentsport "; + } + if ((adminsport == null) || adminsport.equals("")) { + missing += " adminsport "; + } + if ((httpport == null) || httpport.equals("")) { + missing += " httpport "; + } + if ((domainmgr == null) || domainmgr.equals("")) { + missing += " domainmgr "; + } + if ((clone == null) || clone.equals("")) { + clone = "false"; + } + + if (! missing.equals("")) { + CMS.debug("UpdateDomainXML process: required parameters:" + missing + "not provided in request"); + outputError(httpResp, "Error: required parameters: " + missing + "not provided in request"); + return; + } + String basedn = null; String secstore = null; |