You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lecharny <el...@apache.org> on 2009/08/18 16:33:31 UTC

Pb with Schema Object names collision

RFC 4512 stipulates that Schema Objects names are case insensitives and 
can collide (ie, we can use the same name for an AT and an OC, for 
instance) :

RFC 4512, 6.2 :
"...
Implementations MUST be prepared that the same short name might be
   used in a subschema to refer to the different kinds of schema
   elements. That is, there might be an object class 'x-fubar' and an
   attribute type 'x-fubar' in a subschema.
..."

We have filed two JIRAs about it 
(https://issues.apache.org/jira/browse/DIRSERVER-1301/1302).

As I'm reviewing the OidRegistry code, as a follow up of the multiple 
Schema problems, I found that :

in cosine Schema :
------------------
attributetype ( 0.9.2342.19200300.100.1.55 NAME 'audio'
...

// RFC 2252, removed in RFC 4517
String AUDIO_SYNTAX                           = 
"1.3.6.1.4.1.1466.115.121.1.4";


in SystemSyntaxProducer :
-------------------------

        syntax = new BootstrapSyntax( SchemaConstants.AUDIO_SYNTAX, 
syntaxCheckerRegistry );
        syntax.setNames( new String[]
            { "Audio" } );
        syntax.setHumanReadable( false );
        cb.schemaObjectProduced( this, syntax.getOid(), syntax );

the byName() method in the oidRegistry will have the audio name pointing 
to 2 different OIDs, which is not allowed, as the name is expected to be 
case insensitive ...

We have to change the way the OIDs are registred, so that the lookup done in this registry is using the SchemaObject type we are looking for (we always know what kind of SchemaObject we are looking for).

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org