directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1065370 - in /directory/apacheds/trunk: core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/ core-jndi/src/main/java/org/apache/directory/server/core/jndi/ core/src/main/java/org/apache/directory/server/core/changelog/ ...
Date Sun, 30 Jan 2011 20:40:02 GMT
Author: akarasulu
Date: Sun Jan 30 20:40:02 2011
New Revision: 1065370

URL: http://svn.apache.org/viewvc?rev=1065370&view=rev
Log:
removing static instances of no value Controls like ManageDsaIT which are unsafe: thanks to
Stefan Seelmann

Modified:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java?rev=1065370&r1=1065369&r2=1065370&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
Sun Jan 30 20:40:02 2011
@@ -46,6 +46,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.ICodecControl;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.codec.controls.ppolicy.IPasswordPolicyResponse;
+import org.apache.directory.shared.ldap.codec.controls.ppolicy.PasswordPolicyRequest;
 import org.apache.directory.shared.ldap.codec.controls.ppolicy.PasswordPolicyRequestDecorator;
 import org.apache.directory.shared.ldap.codec.controls.ppolicy.PasswordPolicyResponseDecorator;
 import org.apache.directory.shared.ldap.model.constants.LdapSecurityConstants;
@@ -79,7 +80,8 @@ public class PasswordPolicyTest extends 
 
     private static final ILdapCodecService codec = new DefaultLdapCodecService();
     
-    private static final PasswordPolicyRequestDecorator PP_REQ_CTRL = new PasswordPolicyRequestDecorator(
codec );
+    private static final PasswordPolicyRequestDecorator PP_REQ_CTRL = 
+        new PasswordPolicyRequestDecorator( codec, new PasswordPolicyRequest() );
 
 
     @Before

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=1065370&r1=1065369&r2=1065370&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
(original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
Sun Jan 30 20:40:02 2011
@@ -74,11 +74,14 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.ldap.model.message.controls.Cascade;
+import org.apache.directory.shared.ldap.model.message.controls.CascadeImpl;
+import org.apache.directory.shared.ldap.model.message.controls.ManageDsaITImpl;
 import org.apache.directory.shared.ldap.codec.ICodecControl;
 import org.apache.directory.shared.ldap.codec.controls.CascadeDecorator;
 import org.apache.directory.shared.ldap.model.message.controls.ManageDsaIT;
 import org.apache.directory.shared.ldap.codec.controls.ManageDsaITDecorator;
 import org.apache.directory.shared.ldap.codec.controls.ppolicy.IPasswordPolicyRequest;
+import org.apache.directory.shared.ldap.codec.controls.ppolicy.PasswordPolicyRequest;
 import org.apache.directory.shared.ldap.codec.controls.ppolicy.PasswordPolicyRequestDecorator;
 import org.apache.directory.shared.ldap.codec.controls.ppolicy.PasswordPolicyResponseDecorator;
 import org.apache.directory.shared.ldap.codec.controls.ppolicy.PasswordPolicyResponseContainer;
@@ -387,7 +390,7 @@ public abstract class ServerContext impl
         switch ( controlId )
         {
             case CASCADE_CONTROL:
-                control = new CascadeDecorator( getDirectoryService().getLdapCodecService()
);
+                control = new CascadeDecorator( getDirectoryService().getLdapCodecService(),
new CascadeImpl() );
                 
                 break;
 
@@ -402,7 +405,7 @@ public abstract class ServerContext impl
                 break;
 
             case MANAGE_DSA_IT_CONTROL:
-                control = new ManageDsaITDecorator( getDirectoryService().getLdapCodecService()
);
+                control = new ManageDsaITDecorator( getDirectoryService().getLdapCodecService(),
new ManageDsaITImpl() );
                 
                 break;
 
@@ -419,7 +422,8 @@ public abstract class ServerContext impl
             case PASSWORD_POLICY_REQUEST_CONTROL:
                 if ( isRequest )
                 {
-                    control = new PasswordPolicyRequestDecorator( getDirectoryService().getLdapCodecService()
);
+                    control = new PasswordPolicyRequestDecorator( getDirectoryService().getLdapCodecService(),

+                        new PasswordPolicyRequest() );
                 }
                 else
                 {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java?rev=1065370&r1=1065369&r2=1065370&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
Sun Jan 30 20:40:02 2011
@@ -37,7 +37,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.partition.ByPassConstants;
 import org.apache.directory.server.core.schema.SchemaService;
-import org.apache.directory.shared.ldap.codec.controls.ManageDsaITDecorator;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -47,6 +46,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.ldif.ChangeType;
 import org.apache.directory.shared.ldap.model.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.model.ldif.LdifRevertor;
+import org.apache.directory.shared.ldap.model.message.controls.ManageDsaITImpl;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.slf4j.Logger;
@@ -352,9 +352,9 @@ public class ChangeLogInterceptor extend
         
         if ( moveAndRenameContext.isReferralIgnored() )
         {
-            forward.addControl( new ManageDsaITDecorator( directoryService.getLdapCodecService()
) );
+            forward.addControl( new ManageDsaITImpl() );
             LdifEntry reversedEntry = reverses.get( 0 );
-            reversedEntry.addControl( new ManageDsaITDecorator( directoryService.getLdapCodecService()
) );
+            reversedEntry.addControl( new ManageDsaITImpl() );
         }
         
         moveAndRenameContext.setChangeLogEvent( changeLog.log( getPrincipal(), forward, reverses
) );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java?rev=1065370&r1=1065369&r2=1065370&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
Sun Jan 30 20:40:02 2011
@@ -79,6 +79,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchResultDone;
 import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchResultReference;
+import org.apache.directory.shared.ldap.model.message.controls.ManageDsaITImpl;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
@@ -265,7 +266,8 @@ public class SyncReplConsumer implements
 
         if ( !config.isChaseReferrals() )
         {
-            searchRequest.addControl( new ManageDsaITDecorator( directoryService.getLdapCodecService()
) );
+            searchRequest.addControl( new ManageDsaITDecorator( directoryService.getLdapCodecService(),

+                new ManageDsaITImpl() ) );
         }
     }
 



Mime
View raw message