Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 9606 invoked from network); 21 Apr 2007 11:08:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Apr 2007 11:08:50 -0000 Received: (qmail 41121 invoked by uid 500); 21 Apr 2007 11:08:47 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 41070 invoked by uid 500); 21 Apr 2007 11:08:46 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 40784 invoked by uid 99); 21 Apr 2007 11:08:46 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Apr 2007 04:08:45 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Apr 2007 04:08:37 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 86A5471408A for ; Sat, 21 Apr 2007 04:08:17 -0700 (PDT) Message-ID: <9278815.1177153697548.JavaMail.jira@brutus> Date: Sat, 21 Apr 2007 04:08:17 -0700 (PDT) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Subject: [jira] Closed: (DIRSERVER-373) GlobalOidRegistry.getOid(String) does not find bootstrap OIDs for uppercase names. In-Reply-To: <1115806008.1111180280447.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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.