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/FIFOEntryCache.java | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java b/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
index d8bab05..12c9551 100644
--- a/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
+++ b/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
@@ -40,18 +40,21 @@
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
+import org.opends.server.admin.server.ConfigurationChangeListener;
+import org.opends.server.admin.std.server.EntryCacheCfg;
+import org.opends.server.admin.std.server.FIFOEntryCacheCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.EntryCache;
-import org.opends.server.admin.std.server.FIFOEntryCacheCfg;
-import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.config.ConfigAttribute;
import org.opends.server.config.ConfigException;
import org.opends.server.config.IntegerConfigAttribute;
import org.opends.server.config.IntegerWithUnitConfigAttribute;
import org.opends.server.config.StringConfigAttribute;
import org.opends.server.core.DirectoryServer;
+import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.CacheEntry;
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;
@@ -62,8 +65,6 @@
import static org.opends.server.config.ConfigConstants.*;
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.ServerConstants.*;
@@ -1283,6 +1284,19 @@
/**
* {@inheritDoc}
*/
+ @Override()
+ public boolean isConfigurationAcceptable(EntryCacheCfg configuration,
+ List<String> unacceptableReasons)
+ {
+ FIFOEntryCacheCfg config = (FIFOEntryCacheCfg) configuration;
+ return isConfigurationChangeAcceptable(config, unacceptableReasons);
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
public boolean isConfigurationChangeAcceptable(
FIFOEntryCacheCfg configuration,
List<String> unacceptableReasons
@@ -1435,6 +1449,8 @@
HashSet<SearchFilter> newIncludeFilters = null;
HashSet<SearchFilter> newExcludeFilters = null;
+ DN configEntryDN = configuration.dn();
+
// Read configuration.
newConfigEntryDN = configuration.dn();
newLockTimeout = configuration.getLockTimeout();
--
Gitblit v1.10.0