directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu (JIRA)" <>
Subject [jira] Commented: (DIRSERVER-904) Adding two schema elements of different type with the same OID is allowed, but it should not
Date Sat, 18 Aug 2007 00:18:30 GMT


Alex Karasulu commented on DIRSERVER-904:

Stefan Z I suspect this problem is still present however could you just confirm before I tackle
this issue.  I think we should fix this in 1.5.1 btw since it's a clear bug and can be fixed
easily.  If you have a test case for it I'd love to just
add it to core-unit or server-unit.  Thanks!

> Adding two schema elements of different type with the same OID is allowed, but it should
> ----------------------------------------------------------------------------------------------
>                 Key: DIRSERVER-904
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: schema
>    Affects Versions: 1.5.0
>         Environment: * ApacheDS 1.5.0
> * Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
> * Windows XP Professional SP2
>            Reporter: Stefan Zoerner
>             Fix For: 1.5.1
>         Attachments: numberOfGunsAttr.ldif, shipObjectClass.ldif
> If I try to add two schema elements with the same OID dynamically, the behavior depends
on the type of the elements (whether it differs or not).
> It is possible to add an object class and an an attribute type with the same OID, here
is an example (OID 9.9.9 used for demonstration purposes):
> LDIF of attribute type (also attached):
> dn: m-oid=9.9.9,ou=attributeTypes,cn=other,ou=schema
> 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:
> LDIF of object class:
> dn: m-oid=9.9.9,ou=objectClasses,cn=other,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
> The addition works, but it should not
> $ ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -w secret -a -f numberOfGunsAttr.ldif
> adding new entry m-oid=9.9.9,ou=attributeTypes,cn=other,ou=schema
> $ ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -w secret -a -f shipObjectClass.ldif
> adding new entry m-oid=9.9.9,ou=objectClasses,cn=other,ou=schema
> $
> If I try to add two attribute types with the same OID (for instance in different meta
schemata), an error occurs:
> $ ldapmodify -h localhost -p 10389 -D "uid=admin,ou=system" -w secret -a -f numberOfGunsAttr2.ldif
> adding new entry m-oid=9.9.9,ou=attributeTypes,cn=sevenSeasSchema,ou=schema
> ldap_add: Loop detected
> ldap_add: additional info: failed to add entry m-oid=9.9.9,ou=attributeTypes,cn=sevenSeasSchema,ou=schema:
attributeType w/ OID 9.9.9 has already been registered!
> $
> Although the "Loop detected" sounds strange to me, the behavior is correct (it is not
possible to add an attribute type with an existing OID).

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

View raw message