summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
diff options
context:
space:
mode:
authorjmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-11-10 22:42:50 +0000
committerjmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-11-10 22:42:50 +0000
commitce8cf39e8e912e86c631f61620218aac17a804c5 (patch)
treede1071f7beefb3c06be86c01c281405d28f44bd8 /pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
parent990c4cf798598d2cadc1595b8dc1fce71355179b (diff)
downloadpki-ce8cf39e8e912e86c631f61620218aac17a804c5.tar.gz
pki-ce8cf39e8e912e86c631f61620218aac17a804c5.tar.xz
pki-ce8cf39e8e912e86c631f61620218aac17a804c5.zip
Fix Bugzilla Bug 360721 - New Feature: Profile Integrity Check.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1493 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java')
-rw-r--r--pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java b/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
index 4f88bd1c5..ec1a277fa 100644
--- a/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
+++ b/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
@@ -58,6 +58,7 @@ public abstract class BasicProfile implements IProfile {
public static final String PROP_DESC = "desc";
public static final String PROP_NO_DEFAULT = "noDefaultImpl";
public static final String PROP_NO_CONSTRAINT= "noConstraintImpl";
+ public static final String PROP_GENERIC_EXT_DEFAULT= "genericExtDefaultImpl";
protected IProfileSubsystem mOwner = null;
protected IConfigStore mConfig = null;
@@ -857,8 +858,15 @@ public abstract class BasicProfile implements IProfile {
CMS.debug("WARNING, can't get constraint plugin id!");
}
- if ((curDefaultClassId.equals(defaultClassId) && !curDefaultClassId.equals(PROP_NO_DEFAULT)) ||
- (curConstraintClassId.equals(constraintClassId) && !curConstraintClassId.equals(PROP_NO_CONSTRAINT))) {
+ //Disallow duplicate defaults or constraints with the following exceptions:
+ // noDefaultImpl, genericExtDefaultImpl, noDefaultConstraint
+
+ if ((curDefaultClassId.equals(defaultClassId) &&
+ !curDefaultClassId.equals(PROP_NO_DEFAULT) &&
+ !curDefaultClassId.equals(PROP_GENERIC_EXT_DEFAULT)) ||
+ (curConstraintClassId.equals(constraintClassId) &&
+ !curConstraintClassId.equals(PROP_NO_CONSTRAINT))) {
+
matches++;
if (createConfig) {
if (matches == 1) {