directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r609320 - /directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
Date Sun, 06 Jan 2008 14:49:05 GMT
Author: elecharny
Date: Sun Jan  6 06:49:04 2008
New Revision: 609320

URL: http://svn.apache.org/viewvc?rev=609320&view=rev
Log:
Applied Simon Temple patch

Modified:
    directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java

Modified: directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java?rev=609320&r1=609319&r2=609320&view=diff
==============================================================================
--- directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
(original)
+++ directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
Sun Jan  6 06:49:04 2008
@@ -29,6 +29,7 @@
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.protocol.shared.store.LdifFileLoader;
 import org.apache.directory.server.protocol.shared.store.LdifLoadFilter;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
@@ -207,7 +208,7 @@
     }
 
 
-    protected void setLdifFilters( List<LdifLoadFilter> filters )
+    public void setLdifFilters( List<LdifLoadFilter> filters )
     {
         this.ldifFilters.clear();
         this.ldifFilters.addAll( filters );
@@ -318,8 +319,15 @@
         }
 
 
-        LdapPrincipal admin = new LdapPrincipal( new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN
),
-                AuthenticationLevel.STRONG );
+        LdapDN dn = new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN );
+    
+        // Must normalize the dn or - IllegalStateException!
+        AttributeTypeRegistry reg = directoryService.getRegistries().getAttributeTypeRegistry();
+        dn.normalize( reg.getNormalizerMapping() );
+    
+        LdapPrincipal admin = new LdapPrincipal( dn, AuthenticationLevel.STRONG );
+        
+        
         DirContext root = directoryService.getJndiContext( admin );
         ensureLdifFileBase( root );
 



Mime
View raw message