[
https://issues.apache.org/jira/browse/DIRSERVER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Lecharny closed DIRSERVER-373.
---------------------------------------
Closing all issues created in 2005 and before which are marked resolved
> GlobalOidRegistry.getOid(String) does not find bootstrap OIDs for uppercase
> names.
> ----------------------------------------------------------------------------------
>
> Key: DIRSERVER-373
> URL: https://issues.apache.org/jira/browse/DIRSERVER-373
> Project: Directory ApacheDS
> Issue Type: Bug
> Environment: NA
> Reporter: Jacob S. Barrett
> Assigned To: Alex Karasulu
> Attachments: Upercase-Attribute-Names.patch
>
>
> Some servers, like Microsoft Active Directory, use uppercase attribute names
> for some of the bootstrap attributes. For example, when proxying LDAP
> requests to an Active Directory where "OU=Domain Controllers" entry is found
> the uppercase OU will cause a NamingException("OID for name X was not found
> within the OID registry"). The patch below extends the search to include the
> normalized search of bootstrap registry and caching of the unnormalized name
> in the byName hashtable.
> Patch:
> Index:
> apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java
> ===================================================================
> ---
> apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java
> (revision 158112)
> +++
> apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java
> (working copy)
> @@ -142,16 +142,34 @@
> * returned on a getNameSet.
> */
> String lowerCase = name.trim().toLowerCase();
> - if ( ! name.equals( lowerCase )
> - && byName.containsKey( lowerCase ) )
> - {
> - String oid = ( String ) byName.get( lowerCase );
> - monitor.oidResolved( name, lowerCase, oid );
> + if ( ! name.equals( lowerCase ) )
> + {
> + if ( byName.containsKey( lowerCase ) )
> + {
> + String oid = ( String ) byName.get( lowerCase );
> + monitor.oidResolved( name, lowerCase, oid );
> +
> + // We expect to see this version of the key again so we add
> it
> + byName.put( name, oid );
> + return oid;
> + }
> +
> + /*
> + * Some LDAP servers (MS Active Directory) tend to use
> some of the
> + * bootstrap oid names as all caps, like OU. This
> should resolve that.
> + * Lets stash this in the byName if we find it.
> + */
> +
> + if ( bootstrap.hasOid( lowerCase) )
> + {
> + String oid = bootstrap.getOid( name );
> + monitor.oidResolved( name, oid );
>
> - // We expect to see this version of the key again so we add it
> - byName.put( name, oid );
> - return oid;
> - }
> + // We expect to see this version of the key again so we add
> it
> + byName.put( name, oid );
> + return oid;
> + }
> + }
>
> NamingException fault = new NamingException ( "OID for name '"
> + name + "' was not " + "found within the OID registry" );
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.