directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r190049 - in /directory/protocol-providers/ldap/branches/direve-158: project.xml src/main/java/org/apache/ldap/server/protocol/BindHandler.java
Date Sat, 11 Jun 2005 00:45:00 GMT
Author: trustin
Date: Fri Jun 10 17:44:59 2005
New Revision: 190049

URL: http://svn.apache.org/viewcvs?rev=190049&view=rev
Log:
* Caught up changes in DIREVE-158 branch in apacheds

Modified:
    directory/protocol-providers/ldap/branches/direve-158/project.xml
    directory/protocol-providers/ldap/branches/direve-158/src/main/java/org/apache/ldap/server/protocol/BindHandler.java

Modified: directory/protocol-providers/ldap/branches/direve-158/project.xml
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ldap/branches/direve-158/project.xml?rev=190049&r1=190048&r2=190049&view=diff
==============================================================================
--- directory/protocol-providers/ldap/branches/direve-158/project.xml (original)
+++ directory/protocol-providers/ldap/branches/direve-158/project.xml Fri Jun 10 17:44:59
2005
@@ -154,6 +154,12 @@
       <url>http://directory.apache.org/subprojects/ldap/common</url>
     </dependency>
     <dependency>
+      <groupId>directory</groupId>
+      <artifactId>apacheds-core</artifactId>
+      <version>0.9.1-SNAPSHOT</version>
+      <url>http://directory.apache.org/subprojects/apacheds</url>
+    </dependency>
+    <dependency>
       <groupId>directory-network</groupId>
       <artifactId>mina</artifactId>
       <version>0.7</version>

Modified: directory/protocol-providers/ldap/branches/direve-158/src/main/java/org/apache/ldap/server/protocol/BindHandler.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ldap/branches/direve-158/src/main/java/org/apache/ldap/server/protocol/BindHandler.java?rev=190049&r1=190048&r2=190049&view=diff
==============================================================================
--- directory/protocol-providers/ldap/branches/direve-158/src/main/java/org/apache/ldap/server/protocol/BindHandler.java
(original)
+++ directory/protocol-providers/ldap/branches/direve-158/src/main/java/org/apache/ldap/server/protocol/BindHandler.java
Fri Jun 10 17:44:59 2005
@@ -34,6 +34,8 @@
 import org.apache.ldap.common.message.LdapResultImpl;
 import org.apache.ldap.common.message.ResultCodeEnum;
 import org.apache.ldap.common.util.ExceptionUtils;
+import org.apache.ldap.server.configuration.Configuration;
+import org.apache.ldap.server.configuration.StartupConfiguration;
 import org.apache.mina.protocol.ProtocolSession;
 import org.apache.mina.protocol.handler.MessageHandler;
 
@@ -63,7 +65,7 @@
         resp.setLdapResult( result );
 
         Hashtable env = SessionRegistry.getSingleton().getEnvironment();
-
+        StartupConfiguration cfg = ( StartupConfiguration ) Configuration.toConfiguration(
env );
         // if the bind request is not simple then we freak: no strong auth yet
         if ( ! req.isSimple() )
         {
@@ -76,15 +78,8 @@
             return;
         }
 
-        boolean allowAnonymousBinds = true;
-
-        if ( env.containsKey( "server.disable.anonymous" ) )
-        {
-            allowAnonymousBinds = false;
-        }
-
+        boolean allowAnonymousBinds = cfg.isAllowAnonymousAccess();
         boolean emptyCredentials = req.getCredentials() == null || req.getCredentials().length
== 0;
-
         boolean emptyDn = req.getName() == null || req.getName().length() == 0;
 
         if ( emptyCredentials && emptyDn && ! allowAnonymousBinds )
@@ -107,11 +102,8 @@
         byte[] creds = req.getCredentials();
 
         Hashtable cloned = ( Hashtable ) env.clone();
-
         cloned.put( Context.SECURITY_PRINCIPAL, dn );
-
         cloned.put( Context.SECURITY_CREDENTIALS, creds );
-
         cloned.put( Context.SECURITY_AUTHENTICATION, "simple" );
 
         Control[] connCtls = ( Control[] ) req.getControls().toArray( EMPTY );



Mime
View raw message