You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Stefan Zoerner <st...@labeo.de> on 2007/04/16 20:55:38 UTC

New schema subsystem question (elements with same oid?)

Hi all!

I found some time to test the new schema sub system of ApacheDS 1.5 and 
I am really impressed how nice it works.

During some additions of new attribute types and object classes, I found 
a behavior for which I am not sure whether it is an error: I was able to 
add a new object class and a new attribute type with the same OID value.

I used an LDIF import to extend my schema, my attribute type for 
instance looked like this (just a test OID used):

dn: m-oid=9.9.9,ou=attributeTypes,cn=sevenSeasSchema,ou=schema
m-usage: USER_APPLICATIONS
m-equality: integerOrderingMatch
objectClass: metaAttributeType
objectClass: metaTop
objectClass: top
m-name: numberOfGuns
m-oid: 9.9.9
m-singleValue: TRUE
m-description: Number of guns of a ship
m-collective: FALSE
m-obsolete: FALSE
m-noUserModification: FALSE
m-syntax: 1.3.6.1.4.1.1466.115.121.1.27

Afterwards I added the following objectclass:

dn: m-oid=9.9.9,ou=objectClasses,cn=sevenSeasSchema,ou=schema
objectClass: top
objectClass: metaTop
objectClass: metaObjectclass
m-supObjectClass: top
m-oid: 9.9.9
m-name: ship
m-must: cn
m-may: numberOfGuns
m-may: description
m-typeObjectClass: STRUCTURAL
m-obsolete: FALSE
m-description: A ship

I assumed this should fail (two schema elements with the same OID added 
to the schema). Am I right here? Or is it not allowed to use a plain 
LDIF import to load schema elements? If it is an error, I'll try to 
isolate the problem to several tests and raise a JIRA ...

Thanks in advance and greetings from Hamburg,
     Stefan



Re: New schema subsystem question (elements with same oid?)

Posted by Alex Karasulu <ak...@apache.org>.
Yep this is a bug.  Good catch Stefan.  I think the fix for this is really
easy though.  All we have to do is check and see if the OID is taken in the
OID registry and throw an exception in the handling code.

We should also do other checks like to see if any of the aliases for the
schema objects are also being used and if so take the same course of action
with a detailed error message in the thrown exception.

Alex

On 4/17/07, Stefan Zoerner <st...@labeo.de> wrote:
>
> Hi Emmanuel!
>
> Emmanuel Lecharny wrote:
> > it's good to see you back :) I guess you were pretty busy with day job
> ...
>
> Unfortunately, you are right. And I have started to write the third
> edition of my German LDAP book.
>
>
>
> >     During some additions of new attribute types and object classes, I
> found
> >     a behavior for which I am not sure whether it is an error: I was
> able to
> >     add a new object class and a new attribute type with the same OID
> >     value.
>
> > Sounds bad :(
>
> It took me longer than I thought to find the first error. The system
> seems to be very solid at a first glance.
>
> >
> > Yeah, we deserved a JIRA here, I think...
> >
> > Thanks for having found this nasty bug !
> >
>
> I will do some further tests and raise it soon.
>
> Greetings,
>      Stefan
>
>

Re: New schema subsystem question (elements with same oid?)

Posted by Stefan Zoerner <st...@labeo.de>.
Hi Emmanuel!

Emmanuel Lecharny wrote:
> it's good to see you back :) I guess you were pretty busy with day job ...

Unfortunately, you are right. And I have started to write the third 
edition of my German LDAP book.



>     During some additions of new attribute types and object classes, I found
>     a behavior for which I am not sure whether it is an error: I was able to
>     add a new object class and a new attribute type with the same OID
>     value. 

> Sounds bad :(

It took me longer than I thought to find the first error. The system 
seems to be very solid at a first glance.

> 
> Yeah, we deserved a JIRA here, I think...
> 
> Thanks for having found this nasty bug !
> 

I will do some further tests and raise it soon.

Greetings,
     Stefan


Re: New schema subsystem question (elements with same oid?)

Posted by Emmanuel Lecharny <el...@gmail.com>.
Hi Stefan,

it's good to see you back :) I guess you were pretty busy with day job ...

On 4/16/07, Stefan Zoerner <st...@labeo.de> wrote:
>
> Hi all!
>
> I found some time to test the new schema sub system of ApacheDS 1.5 and
> I am really impressed how nice it works.
>
> During some additions of new attribute types and object classes, I found
> a behavior for which I am not sure whether it is an error: I was able to
> add a new object class and a new attribute type with the same OID value.


Sounds bad :(

I used an LDIF import to extend my schema, my attribute type for
> instance looked like this (just a test OID used):
>
> dn: m-oid=9.9.9,ou=attributeTypes,cn=sevenSeasSchema,ou=schema
> m-usage: USER_APPLICATIONS
> m-equality: integerOrderingMatch
> objectClass: metaAttributeType
> objectClass: metaTop
> objectClass: top
> m-name: numberOfGuns
> m-oid: 9.9.9
> m-singleValue: TRUE
> m-description: Number of guns of a ship
> m-collective: FALSE
> m-obsolete: FALSE
> m-noUserModification: FALSE
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.27
>
> Afterwards I added the following objectclass:
>
> dn: m-oid=9.9.9,ou=objectClasses,cn=sevenSeasSchema,ou=schema
> objectClass: top
> objectClass: metaTop
> objectClass: metaObjectclass
> m-supObjectClass: top
> m-oid: 9.9.9
> m-name: ship
> m-must: cn
> m-may: numberOfGuns
> m-may: description
> m-typeObjectClass: STRUCTURAL
> m-obsolete: FALSE
> m-description: A ship
>
> I assumed this should fail (two schema elements with the same OID added
> to the schema). Am I right here? Or is it not allowed to use a plain
> LDIF import to load schema elements? If it is an error, I'll try to
> isolate the problem to several tests and raise a JIRA ...


Yeah, we deserved a JIRA here, I think...

Thanks for having found this nasty bug !

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com