Apache Directory Project - [jira] Commented: (DIRSERVER-1115) server-jndi:

This is Interesting: Free IT Magazines  
Home > Archive > Apache Directory Project > January 2008 > [jira] Commented: (DIRSERVER-1115) server-jndi:





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [jira] Commented: (DIRSERVER-1115) server-jndi:
Emmanuel Lecharny (JIRA)

2008-01-03, 7:11 am


[ https://issues.apache.org/jira/brow...1255554
6
]

Emmanuel Lecharny commented on DIRSERVER-1115:
----------------------------------------------

I will commit something slightly different :

Index: apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
========================================
===========================
--- apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java (revision 608424)
+++ apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java (working copy)
@@ -207,7 +207,7 @@
}





- protected void setLdifFilters( List<LdifLoadFilter> filters )

+ public void setLdifFilters( List<LdifLoadFilter> filters )

{

this.ldifFilters.clear();

this.ldifFilters.addAll( filters );

@@ -318,8 +318,9 @@
}





- LdapPrincipal admin = new LdapPrincipal( new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN ),

+ LdapPrincipal admin = new LdapPrincipal( new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED ),

AuthenticationLevel.STRONG );

+

DirContext root = directoryService.getJndiContext( admin );

ensureLdifFileBase( root );




We already have a constants which represent the normalized form of a ADMIN_SYSTEM DN, I suggest we use this one.

Can you check that and tell me if it's ok?

Otherwise, moving from protected to public seems to be a good idea.


> server-jndi: org.apache.directory.server.configuration.ApacheDS throws java.lang.IllegalStateException: Names used for principals must be normalized!
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1115
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1115
> Project: Directory ApacheDS
> Issue Type: Bug
> Affects Versions: 1.5.2
> Environment: Win 2003 Server, Sun JDK 1.5.1_11
> Reporter: Simon Temple
> Fix For: 1.5.2
>
> Attachments: ds.patch
>
>
> Alex suggested:
> " I recommend you proceed like so for now:
> (1) get a handle on the DirectoryService
> (2) access the attributeType registry via directoryService.getRegistries().getAttributeTypeRegistry()
> (3) from the attribute type registry access the normalizer map getNormalizerMap() or something like that
> (4) feed this into the dn.normalize() method of the dn you feed into LdapPrincipal"
> This fixes the runtime problem.
> ** In addition, I'd like to request the method setLdifFilters() is made public so an embedded application can continue to provide them (as was the case with 1.0 and 1.5.1) **
> I'm not a committer but will attach a patch file. Would you please consider and apply the patch?


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com