From 959c9ded0c297d00500678a0c80d7d6d8a5265fe Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Tue, 10 Jul 2007 16:03:42 +0000
Subject: [PATCH] Fix a set of problems with the configuration interface in which there were a number of cases in which insufficient validation was performed. In particular, if a new configuration object was added over protocol or an existing configuration object was changed from disabled to enabled, then the server would only perform generic validation for that component and would not have any way to perform more detailed validation that could detect larger numbers of problems.
---
opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java b/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
index 0aa204e..4572c17 100644
--- a/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
+++ b/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
@@ -36,17 +36,20 @@
import java.util.List;
import org.opends.server.admin.server.ConfigurationChangeListener;
+import org.opends.server.admin.std.server.CertificateMapperCfg;
import org.opends.server.admin.std.server.
SubjectDNToUserAttributeCertificateMapperCfg;
import org.opends.server.api.CertificateMapper;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
+import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.protocols.internal.InternalSearchOperation;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
import org.opends.server.types.ConfigChangeResult;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
import org.opends.server.types.InitializationException;
@@ -56,8 +59,6 @@
import org.opends.server.types.SearchScope;
import static org.opends.server.loggers.debug.DebugLogger.*;
-import org.opends.server.loggers.debug.DebugTracer;
-import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -241,12 +242,27 @@
/**
* {@inheritDoc}
*/
+ @Override()
+ public boolean isConfigurationAcceptable(CertificateMapperCfg configuration,
+ List<String> unacceptableReasons)
+ {
+ SubjectDNToUserAttributeCertificateMapperCfg config =
+ (SubjectDNToUserAttributeCertificateMapperCfg) configuration;
+ return isConfigurationChangeAcceptable(config, unacceptableReasons);
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
public boolean isConfigurationChangeAcceptable(
SubjectDNToUserAttributeCertificateMapperCfg
configuration,
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
+ DN configEntryDN = configuration.dn();
// Make sure that the subject attribute is defined in the server schema.
String attrName = configuration.getSubjectAttribute();
--
Gitblit v1.10.0