directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r421706 - in /directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core: authn/SimpleAuthenticator.java jndi/ServerContext.java
Date Thu, 13 Jul 2006 20:51:04 GMT
Author: akarasulu
Date: Thu Jul 13 13:51:04 2006
New Revision: 421706

URL: http://svn.apache.org/viewvc?rev=421706&view=rev
Log:
skipping normalizationService in lookup bypass for SimpleAuthenticator and making hasEntry
in context use bypasses

Modified:
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?rev=421706&r1=421705&r2=421706&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
Thu Jul 13 13:51:04 2006
@@ -60,6 +60,7 @@
     static
     {
         Set c = new HashSet();
+        c.add( "normalizationService" );
         c.add( "authenticationService" );
         c.add( "authorizationService" );
         c.add( "defaultAuthorizationService" );

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=421706&r1=421705&r2=421706&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
Thu Jul 13 13:51:04 2006
@@ -18,6 +18,8 @@
 
 
 import java.io.Serializable;
+import java.util.Collection;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
@@ -86,6 +88,22 @@
     /** The Principal associated with this context */
     private LdapPrincipal principal;
 
+    private static final Collection HASENTRY_BYPASS;
+
+    static
+    {
+        Set c = new HashSet();
+        c.add( "normalizationService" );
+        c.add( "authenticationService" );
+        c.add( "authorizationService" );
+        c.add( "defaultAuthorizationService" );
+        c.add( "schemaService" );
+        c.add( "subentryService" );
+        c.add( "operationalAttributeService" );
+        c.add( "eventService" );
+        HASENTRY_BYPASS = Collections.unmodifiableCollection( c );
+    }
+    
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -118,6 +136,11 @@
         LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( this.env );
         dn = props.getProviderDn();
 
+        if ( ! ( ( DirectoryPartitionNexusProxy ) nexusProxy ).hasEntry( dn, HASENTRY_BYPASS
) )
+        {
+            throw new NameNotFoundException( dn + " does not exist" );
+        }
+
         // need to issue a bind operation here
         this.nexusProxy.bind( props.getBindDn(), props.getCredentials(), props.getAuthenticationMechanisms(),
props
             .getSaslAuthId() );
@@ -125,11 +148,6 @@
         if ( dn.size() == 0 )
         {
             return;
-        }
-        
-        if ( !nexusProxy.hasEntry( dn ) )
-        {
-            throw new NameNotFoundException( dn + " does not exist" );
         }
     }
 



Mime
View raw message