directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1075334 [2/2] - in /directory/apacheds/branches/akarasulu: ./ all/ core-annotations/ core-api/ core-api/src/main/java/org/apache/directory/server/core/ core-api/src/test/java/org/apache/directory/server/core/ core-avl/ core-constants/ core...
Date Mon, 28 Feb 2011 14:01:30 GMT
Propchange: directory/apacheds/branches/akarasulu/kerberos-test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/kerberos-test:980138-980936
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-test:1040956-1043765
 /directory/apacheds/branches/milestones/kerberos-test:1072812-1075328
-/directory/apacheds/trunk/kerberos-test:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/kerberos-test:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/kerberos-test:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/ldif-partition/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/ldif-partition:980138-980936
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/ldif-partition:1040956-1043765
 /directory/apacheds/branches/milestones/ldif-partition:1072812-1075328
-/directory/apacheds/trunk/ldif-partition:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/ldif-partition:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/ldif-partition:1067786-1067997

Modified: directory/apacheds/branches/akarasulu/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java?rev=1075334&r1=1075333&r2=1075334&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
(original)
+++ directory/apacheds/branches/akarasulu/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
Mon Feb 28 14:01:27 2011
@@ -176,7 +176,7 @@ public class LdifPartitionTest
     public void testLdifAddEntries() throws Exception
     {
         Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
-        CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG
),
+        CoreSession session = new MockCoreSession( new LdapPrincipal( schemaManager, adminDn,
AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
 
@@ -221,7 +221,7 @@ public class LdifPartitionTest
     public void testLdifAddExistingEntry() throws Exception
     {
         Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
-        CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG
),
+        CoreSession session = new MockCoreSession( new LdapPrincipal( schemaManager, adminDn,
AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
 
@@ -275,7 +275,7 @@ public class LdifPartitionTest
     public void testLdifDeleteExistingEntry() throws Exception
     {
         Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
-        CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG
),
+        CoreSession session = new MockCoreSession( new LdapPrincipal( schemaManager, adminDn,
AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
 
@@ -361,7 +361,7 @@ public class LdifPartitionTest
     public void testLdifSearchExistingEntry() throws Exception
     {
         Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
-        CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG
),
+        CoreSession session = new MockCoreSession( new LdapPrincipal( schemaManager, adminDn,
AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
 
@@ -585,7 +585,7 @@ public class LdifPartitionTest
     public void testSpecialCharacters() throws Exception
     {
         Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
-        CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG
),
+        CoreSession session = new MockCoreSession( new LdapPrincipal( schemaManager, adminDn,
AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
 
@@ -613,7 +613,7 @@ public class LdifPartitionTest
     public void testControlCharacters() throws Exception
     {
         Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
-        CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG
),
+        CoreSession session = new MockCoreSession( new LdapPrincipal( schemaManager, adminDn,
AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
 
@@ -644,7 +644,7 @@ public class LdifPartitionTest
     private CoreSession injectEntries() throws Exception
     {
         Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
-        CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG
),
+        CoreSession session = new MockCoreSession( new LdapPrincipal( schemaManager, adminDn,
AuthenticationLevel.STRONG ),
             new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
 

Modified: directory/apacheds/branches/akarasulu/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java?rev=1075334&r1=1075333&r2=1075334&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
(original)
+++ directory/apacheds/branches/akarasulu/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
Mon Feb 28 14:01:27 2011
@@ -135,13 +135,13 @@ public class SingleFileLdifPartitionTest
 
         if ( !loaded )
         {
-            fail( "Schema load failed : " + Exceptions.printErrors(schemaManager.getErrors())
);
+            fail( "Schema load failed : " + Exceptions.printErrors( schemaManager.getErrors()
) );
         }
 
         defaultCSNFactory = new CsnFactory( 0 );
 
         Dn adminDn = new Dn( schemaManager, "uid=admin,ou=system" );
-        mockSession = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG
),
+        mockSession = new MockCoreSession( new LdapPrincipal( schemaManager, adminDn, AuthenticationLevel.STRONG
),
             new MockDirectoryService( 1 ) );
 
         String contextEntryStr =

Propchange: directory/apacheds/branches/akarasulu/protocol-changepw/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-changepw:980138-980936
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw:1040956-1043765
 /directory/apacheds/branches/milestones/protocol-changepw:1072812-1075328
-/directory/apacheds/trunk/protocol-changepw:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/protocol-changepw:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/protocol-changepw:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/protocol-dhcp/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-dhcp:980138-980936
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-dhcp:1040956-1043765
 /directory/apacheds/branches/milestones/protocol-dhcp:1072812-1075328
-/directory/apacheds/trunk/protocol-dhcp:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/protocol-dhcp:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/protocol-dhcp:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/protocol-dns/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-dns:980138-980936
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-dns:1040956-1043765
 /directory/apacheds/branches/milestones/protocol-dns:1072812-1075328
-/directory/apacheds/trunk/protocol-dns:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/protocol-dns:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/protocol-dns:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/protocol-kerberos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-kerberos:980138-980936
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos:1040956-1043765
 /directory/apacheds/branches/milestones/protocol-kerberos:1072812-1075328
-/directory/apacheds/trunk/protocol-kerberos:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/protocol-kerberos:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/protocol-kerberos:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/protocol-ldap/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -4,5 +4,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-ldap:980138-980936
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-ldap:1040956-1043765
 /directory/apacheds/branches/milestones/protocol-ldap:1072812-1075328
-/directory/apacheds/trunk/protocol-ldap:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/protocol-ldap:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/protocol-ldap:1067786-1067997

Modified: directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java?rev=1075334&r1=1075333&r2=1075334&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java
(original)
+++ directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java
Mon Feb 28 14:01:27 2011
@@ -106,6 +106,7 @@ public class CramMd5CallbackHandler exte
             {
                 entry = cursor.get();
                 LdapPrincipal ldapPrincipal = new LdapPrincipal( 
+                    schemaManager, 
                     entry.getDn(), 
                     AuthenticationLevel.STRONG,
                     entry.get( SchemaConstants.USER_PASSWORD_AT ).getBytes() );

Modified: directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5CallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5CallbackHandler.java?rev=1075334&r1=1075333&r2=1075334&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5CallbackHandler.java
(original)
+++ directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/digestMD5/DigestMd5CallbackHandler.java
Mon Feb 28 14:01:27 2011
@@ -108,6 +108,7 @@ public class DigestMd5CallbackHandler ex
             {
                 entry = cursor.get();
                 LdapPrincipal ldapPrincipal = new LdapPrincipal( 
+                    schemaManager, 
                     entry.getDn(), 
                     AuthenticationLevel.STRONG,
                     entry.get( SchemaConstants.USER_PASSWORD_AT ).getBytes() );

Modified: directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiCallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiCallbackHandler.java?rev=1075334&r1=1075333&r2=1075334&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiCallbackHandler.java
(original)
+++ directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiCallbackHandler.java
Mon Feb 28 14:01:27 2011
@@ -84,7 +84,8 @@ public class GssapiCallbackHandler exten
 
         LOG.debug( "Converted username {} to Dn {}.", username, bindDn );
 
-        LdapPrincipal ldapPrincipal = new LdapPrincipal( new Dn( entry.getDistinguishedName()
),
+        LdapPrincipal ldapPrincipal = new LdapPrincipal( adminSession.getDirectoryService().getSchemaManager(),

+            new Dn( entry.getDistinguishedName() ),
             AuthenticationLevel.STRONG, StringConstants.EMPTY_BYTES );
         ldapSession.putSaslProperty( SaslConstants.SASL_AUTHENT_USER, ldapPrincipal );
         ldapSession.putSaslProperty( Context.SECURITY_PRINCIPAL, bindDn );

Modified: directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmMechanismHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmMechanismHandler.java?rev=1075334&r1=1075333&r2=1075334&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmMechanismHandler.java
(original)
+++ directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmMechanismHandler.java
Mon Feb 28 14:01:27 2011
@@ -64,7 +64,7 @@ public class NtlmMechanismHandler extend
                 initProvider();
             }
             
-            ss = new NtlmSaslServer( provider, bindRequest, ldapSession );
+            ss = new NtlmSaslServer( provider, bindRequest, ldapSession, ldapSession.getLdapServer().getDirectoryService().getAdminSession()
);
             ldapSession.putSaslProperty( SaslConstants.SASL_SERVER, ss );
         }
 

Modified: directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java?rev=1075334&r1=1075333&r2=1075334&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java
(original)
+++ directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java
Mon Feb 28 14:01:27 2011
@@ -55,9 +55,9 @@ public class NtlmSaslServer extends Abst
     private final NtlmProvider provider;
 
 
-    public NtlmSaslServer( NtlmProvider provider, BindRequest bindRequest, LdapSession ldapSession
)
+    public NtlmSaslServer( NtlmProvider provider, BindRequest bindRequest, LdapSession ldapSession,
CoreSession adminSession )
     {
-        super( ldapSession, null, bindRequest );
+        super( ldapSession, adminSession, bindRequest );
         this.provider = provider;
     }
 
@@ -158,7 +158,8 @@ public class NtlmSaslServer extends Abst
                     result = provider.authenticate( getLdapSession().getIoSession(), response
);
                     Dn dn = getBindRequest().getName();
                     dn.normalize( getLdapSession().getLdapServer().getDirectoryService().getSchemaManager()
);
-                    LdapPrincipal ldapPrincipal = new LdapPrincipal( dn, AuthenticationLevel.STRONG
);
+                    LdapPrincipal ldapPrincipal = new LdapPrincipal( getAdminSession().getDirectoryService().getSchemaManager(),

+                        dn, AuthenticationLevel.STRONG );
                     getLdapSession().putSaslProperty( SaslConstants.SASL_AUTHENT_USER, ldapPrincipal
);
                     getLdapSession().putSaslProperty( Context.SECURITY_PRINCIPAL, getBindRequest().getName().toString()
);
                 }

Modified: directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java?rev=1075334&r1=1075333&r2=1075334&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
(original)
+++ directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
Mon Feb 28 14:01:27 2011
@@ -37,6 +37,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.DnSerializer;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
@@ -144,7 +145,17 @@ public class ReplicaEventMessage impleme
         entry = new DefaultEntry( schemaManager );
 
         // Read the Dn
-        Dn dn = DnSerializer.deserialize(in);
+        Dn dn = null;
+        
+        try
+        {
+            dn = DnSerializer.deserialize( schemaManager, in );
+        }
+        catch ( LdapInvalidDnException lide )
+        {
+            throw new IOException( lide.getMessage() );
+        }
+        
         entry.setDn( dn );
 
         // Read the number of attributes

Propchange: directory/apacheds/branches/akarasulu/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -8,5 +8,5 @@
 /directory/apacheds/branches/apacheds-subtree/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:965203-965686
 /directory/apacheds/branches/milestones/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:1072812-1075328
 /directory/apacheds/branches/xdbm-refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:945827-946347
-/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:498338-580500,1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:498338-580500,1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/protocol-ntp/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-ntp:980138-980936
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-ntp:1040956-1043765
 /directory/apacheds/branches/milestones/protocol-ntp:1072812-1075328
-/directory/apacheds/trunk/protocol-ntp:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/protocol-ntp:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/protocol-ntp:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/protocol-shared/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-shared:980138-980936
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-shared:1040956-1043765
 /directory/apacheds/branches/milestones/protocol-shared:1072812-1075328
-/directory/apacheds/trunk/protocol-shared:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/protocol-shared:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/protocol-shared:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/server-annotations/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/server-annotations:980138-980937
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-annotations:1040956-1043765
 /directory/apacheds/branches/milestones/server-annotations:1072812-1075328
-/directory/apacheds/trunk/server-annotations:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/server-annotations:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/server-annotations:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/server-config/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -5,5 +5,5 @@
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-config:1040956-1043765
 /directory/apacheds/branches/milestones/server-config:1072812-1075328
 /directory/apacheds/branches/server-config-annotations/server-config:1042727-1043868
-/directory/apacheds/trunk/server-config:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/server-config:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/server-config:1067786-1067997

Modified: directory/apacheds/branches/akarasulu/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java?rev=1075334&r1=1075333&r2=1075334&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
(original)
+++ directory/apacheds/branches/akarasulu/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
Mon Feb 28 14:01:27 2011
@@ -775,6 +775,8 @@ public class ConfigPartitionReader
                 Set<AttributeType> musts = getAllMusts( objectClass );
                 LOG.debug( "Fetching the following MAY attributes : {}", dumpATs( musts )
);
                 readFields( bean, entry, musts, MANDATORY );
+                
+                bean.setDn( entry.getDn() );
 
                 // Done, we can add the bean into the list
                 beans.add( bean );

Propchange: directory/apacheds/branches/akarasulu/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -9,5 +9,5 @@
 /directory/apacheds/branches/milestones/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1072812-1075328
 /directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1042727-1043868
 /directory/apacheds/branches/xdbm-refactoring/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:945827-946347
-/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1067786-1067997

Modified: directory/apacheds/branches/akarasulu/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java?rev=1075334&r1=1075333&r2=1075334&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java
(original)
+++ directory/apacheds/branches/akarasulu/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java
Mon Feb 28 14:01:27 2011
@@ -32,15 +32,26 @@ import org.apache.directory.shared.util.
  */
 public abstract class AdsBaseBean
 {
-    /** The enabled flag */
+    /**
+     * The enabled flag, by default we treat every config entry
+     * as enabled if ads-enabled attribute is not present or if its
+     * value is set to 'TRUE'.
+     * A config entry is treated as disabled only if the value of 
+     * ads-enabled attribute is set to 'FALSE'
+     * 
+     * Note: the value true/false is case <b>insensitive</b>
+     */
     @ConfigurationElement(attributeType = "ads-enabled")
-    private boolean enabled = false;
+    private boolean enabled = true;
 
     /** The description */
     @ConfigurationElement(attributeType = "description")
     private String description;
 
+    /** the DN of the entry with which this bean is associated */
+    private Dn dn;
 
+    
     /**
      * Create a new BaseBean instance
      */
@@ -177,6 +188,11 @@ public abstract class AdsBaseBean
         {
             sb.append( tabs ).append( "description : '" ).append( description ).append( "'\n"
);
         }
+        
+        if ( dn != null )
+        {
+            sb.append( tabs ).append( "DN: " ).append( dn ).append( "'\n" );
+        }
 
         return sb.toString();
     }
@@ -185,6 +201,24 @@ public abstract class AdsBaseBean
     /**
      * {@inheritDoc}
      */
+    public void setDn( Dn dn )
+    {
+        this.dn = dn;
+    }
+
+
+     /**
+      * {@inheritDoc}
+      */
+    public Dn getDn()
+    {
+        return dn;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public String toString()
     {
         return toString( "" );

Propchange: directory/apacheds/branches/akarasulu/server-config/src/main/resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -12,5 +12,5 @@
 /directory/apacheds/branches/milestones/server-config/src/main/resources:1072812-1075328
 /directory/apacheds/branches/server-config-annotations/server-config/src/main/resources:1042727-1043868
 /directory/apacheds/branches/xdbm-refactoring/default-config/src/main/resources:945827-946347
-/directory/apacheds/trunk/server-config/src/main/resources:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/server-config/src/main/resources:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/server-config/src/main/resources:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -11,5 +11,5 @@
 /directory/apacheds/branches/milestones/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1072812-1075328
 /directory/apacheds/branches/server-config-annotations/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1042727-1043868
 /directory/apacheds/branches/xdbm-refactoring/default-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:945827-946347
-/directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/server-integ/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -4,5 +4,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/server-integ:980138-980937
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-integ:1040956-1043765
 /directory/apacheds/branches/milestones/server-integ:1072812-1075328
-/directory/apacheds/trunk/server-integ:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/server-integ:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/server-integ:1067786-1067997

Modified: directory/apacheds/branches/akarasulu/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java?rev=1075334&r1=1075333&r2=1075334&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
(original)
+++ directory/apacheds/branches/akarasulu/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
Mon Feb 28 14:01:27 2011
@@ -27,6 +27,7 @@ import static org.apache.directory.serve
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -78,6 +79,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
+import org.apache.directory.server.integ.ServerIntegrationUtils;
 import org.apache.directory.shared.ldap.model.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.csn.Csn;
@@ -90,9 +92,11 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.ldif.LdifUtils;
+import org.apache.directory.shared.ldap.model.message.AddResponse;
 import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.util.Strings;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.slf4j.Logger;
@@ -195,8 +199,8 @@ public class AddIT extends AbstractLdapT
         DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
 
         // modify object classes, add two more
-        Attributes attributes = LdifUtils.createAttributes("objectClass: organizationalPerson",
-                "objectClass: inetOrgPerson");
+        Attributes attributes = LdifUtils.createAttributes( "objectClass: organizationalPerson",
+                "objectClass: inetOrgPerson" );
 
         DirContext person = ( DirContext ) ctx.lookup( RDN );
         person.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, attributes );
@@ -551,7 +555,8 @@ public class AddIT extends AbstractLdapT
         ne = containerCtx.search( "ou=bestFruit", "(objectClass=*)", controls );
         assertTrue( ne.hasMore() );
         sr = ne.next();
-        assertEquals( "ldap://localhost:" + getLdapServer().getPort() + "/ou=favorite,ou=Fruits,ou=system",
sr.getName() );
+        assertEquals( "ldap://localhost:" + getLdapServer().getPort() + "/ou=favorite,ou=Fruits,ou=system",
+            sr.getName() );
         assertFalse( ne.hasMore() );
 
         // Remove alias and entry
@@ -740,7 +745,7 @@ public class AddIT extends AbstractLdapT
         }
 
         Dn userDn = new Dn( service.getSchemaManager(), principalDn );
-        LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
+        LdapPrincipal principal = new LdapPrincipal( service.getSchemaManager(), userDn,
AuthenticationLevel.SIMPLE );
 
         if ( dn == null )
         {
@@ -1255,8 +1260,8 @@ public class AddIT extends AbstractLdapT
         assertTrue( res.hasMore() );
         Attribute userPasswordAttribute = res.next().getAttributes().get( "userPassword"
);
         assertEquals( 2, userPasswordAttribute.size() );
-        assertTrue( userPasswordAttribute.contains( Strings.getBytesUtf8("test") ) );
-        assertTrue( userPasswordAttribute.contains( Strings.getBytesUtf8("ABC") ) );
+        assertTrue( userPasswordAttribute.contains( Strings.getBytesUtf8( "test" ) ) );
+        assertTrue( userPasswordAttribute.contains( Strings.getBytesUtf8( "ABC" ) ) );
         assertFalse( res.hasMore() );
     }
 
@@ -1329,6 +1334,7 @@ public class AddIT extends AbstractLdapT
         return attrs;
     }
 
+
     /**
      * <pre>
      * ou=system
@@ -1373,4 +1379,65 @@ public class AddIT extends AbstractLdapT
         // When trying to delete the alias entry an exception occurs.
         ctx.destroySubcontext( "cn=alias,ou=engineering" );
     }*/
+
+    /**
+     * Adding an entry with a non existing attribute type.
+     * 
+     * @throws Exception 
+     */
+    @Test
+    @Ignore
+    public void testAddEntryNonExistingAT() throws Exception
+    {
+        LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( getLdapServer()
);
+
+        Dn dn = new Dn( "cn=Kate Bush," + BASE );
+
+        Entry personEntry = new DefaultEntry();
+        personEntry.add( SchemaConstants.OBJECT_CLASS_AT, "person" );
+        personEntry.add( SchemaConstants.CN_AT, "Kate Bush" );
+        personEntry.add( SchemaConstants.SN_AT, "Bush" );
+        personEntry.add( "nonExistingAttribute", "value" );
+        personEntry.setDn( dn );
+
+        AddResponse response = connection.add( personEntry );
+
+        assertNotNull( response );
+        assertTrue( !ResultCodeEnum.SUCCESS.equals( response.getLdapResult().getResultCode()
) );
+
+        Entry entry = connection.lookup( dn );
+        assertNull( entry );
+
+        connection.close();
+    }
+
+
+    /**
+     * Adding an entry with a non existing attribute type.
+     * 
+     * @throws Exception 
+     */
+    @Test
+    public void testAddEntryNonExistingOC() throws Exception
+    {
+        LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( getLdapServer()
);
+
+        Dn dn = new Dn( "cn=Kate Bush," + BASE );
+
+        Entry personEntry = new DefaultEntry();
+        personEntry.add( SchemaConstants.OBJECT_CLASS_AT, "nonexistingOC" );
+        personEntry.add( SchemaConstants.CN_AT, "Kate Bush" );
+        personEntry.add( SchemaConstants.SN_AT, "Bush" );
+        personEntry.setDn( dn );
+
+        AddResponse response = connection.add( personEntry );
+
+        assertNotNull( response );
+        assertTrue( !ResultCodeEnum.SUCCESS.equals( response.getLdapResult().getResultCode()
) );
+
+        Entry entry = connection.lookup( dn );
+        assertNull( entry );
+
+        connection.close();
+    }
 }

Propchange: directory/apacheds/branches/akarasulu/server-jndi/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/server-jndi:980138-980937
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-jndi:1040956-1043765
 /directory/apacheds/branches/milestones/server-jndi:1072812-1075328
-/directory/apacheds/trunk/server-jndi:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/server-jndi:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/server-jndi:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/server-replication/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/server-replication:980138-980937
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-replication:1040956-1043765
 /directory/apacheds/branches/milestones/server-replication:1072812-1075328
-/directory/apacheds/trunk/server-replication:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/server-replication:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/server-replication:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/server-tools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/server-tools:980138-980937
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-tools:1040956-1043765
 /directory/apacheds/branches/milestones/server-tools:1072812-1075328
-/directory/apacheds/trunk/server-tools:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/server-tools:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/server-tools:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/service-builder/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -1,4 +1,4 @@
 /directory/apacheds/branches/antoine/service-builder:1038305-1044163
 /directory/apacheds/branches/milestones/service-builder:1072812-1075328
-/directory/apacheds/trunk/service-builder:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/service-builder:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/service-builder:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/test-framework/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -9,5 +9,5 @@
 /directory/apacheds/branches/apacheds-subtree/test-framework:965203-965686
 /directory/apacheds/branches/milestones/test-framework:1072812-1075328
 /directory/apacheds/branches/xdbm-refactoring/test-framework:945827-946347
-/directory/apacheds/trunk/test-framework:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/test-framework:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/test-framework:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/xdbm-partition/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/xdbm-partition:980138-980938
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/xdbm-partition:1040956-1043765
 /directory/apacheds/branches/milestones/xdbm-partition:1072812-1075328
-/directory/apacheds/trunk/xdbm-partition:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/xdbm-partition:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/xdbm-partition:1067786-1067997

Propchange: directory/apacheds/branches/akarasulu/xdbm-tools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:01:27 2011
@@ -3,5 +3,5 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/xdbm-tools:980138-980938
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/xdbm-tools:1040956-1043765
 /directory/apacheds/branches/milestones/xdbm-tools:1072812-1075328
-/directory/apacheds/trunk/xdbm-tools:1066126-1067785,1068026-1072718,1072813-1074641
+/directory/apacheds/trunk/xdbm-tools:1066126-1067785,1068026-1072718,1072800-1075329
 /directory/studio/trunk/xdbm-tools:1067786-1067997



Mime
View raw message