directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r201605 - in /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi: AbstractContextFactory.java DefaultContextFactoryService.java
Date Fri, 24 Jun 2005 12:28:40 GMT
Author: trustin
Date: Fri Jun 24 05:28:40 2005
New Revision: 201605

URL: http://svn.apache.org/viewcvs?rev=201605&view=rev
Log:
apacheds-main fails to start up kerberos protocol because authentication information is deleted
from environment when apacheds-core starts.
I changed core to retain authentication information.

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java?rev=201605&r1=201604&r2=201605&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java
Fri Jun 24 05:28:40 2005
@@ -80,10 +80,10 @@
         Configuration cfg = Configuration.toConfiguration( env );
         env = ( Hashtable ) env.clone();
         
-        String principal = extractPrincipal( env );
-        byte[] credential = extractCredential( env );
-        String authentication = extractAuthentication( env );
-        String providerUrl = extractProviderUrl( env );
+        String principal = getPrincipal( env );
+        byte[] credential = getCredential( env );
+        String authentication = getAuthentication( env );
+        String providerUrl = getProviderUrl( env );
 
         // Execute configuration
         if( cfg instanceof ShutdownConfiguration )
@@ -106,11 +106,11 @@
         return service.getConfiguration().getJndiContext( principal, credential, authentication,
providerUrl );
     }
 
-    private String extractProviderUrl( Hashtable env )
+    private String getProviderUrl( Hashtable env )
     {
         String providerUrl;
         Object value;
-        value = env.remove( Context.PROVIDER_URL );
+        value = env.get( Context.PROVIDER_URL );
         if( value == null )
         {
             value = "";
@@ -119,10 +119,10 @@
         return providerUrl;
     }
 
-    private String extractAuthentication( Hashtable env )
+    private String getAuthentication( Hashtable env )
     {
         String authentication;
-        Object value = env.remove( Context.SECURITY_AUTHENTICATION );
+        Object value = env.get( Context.SECURITY_AUTHENTICATION );
         if( value == null )
         {
             authentication = "none";
@@ -134,10 +134,10 @@
         return authentication;
     }
 
-    private byte[] extractCredential( Hashtable env ) throws ConfigurationException
+    private byte[] getCredential( Hashtable env ) throws ConfigurationException
     {
         byte[] credential;
-        Object value = env.remove( Context.SECURITY_CREDENTIALS );
+        Object value = env.get( Context.SECURITY_CREDENTIALS );
         if( value == null )
         {
             credential = null;
@@ -157,10 +157,10 @@
         return credential;
     }
 
-    private String extractPrincipal( Hashtable env )
+    private String getPrincipal( Hashtable env )
     {
         String principal;
-        Object value = env.remove( Context.SECURITY_PRINCIPAL );
+        Object value = env.get( Context.SECURITY_PRINCIPAL );
         if( value == null )
         {
             principal = null;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java?rev=201605&r1=201604&r2=201605&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java
Fri Jun 24 05:28:40 2005
@@ -125,6 +125,10 @@
         }
         
         Hashtable environment = getEnvironment();
+        environment.remove( Context.SECURITY_PRINCIPAL );
+        environment.remove( Context.SECURITY_CREDENTIALS );
+        environment.remove( Context.SECURITY_AUTHENTICATION );
+        
         if( principal != null )
         {
             environment.put( Context.SECURITY_PRINCIPAL, principal );



Mime
View raw message