You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Alex Karasulu (JIRA)" <ji...@apache.org> on 2007/08/18 02:18:30 UTC

[jira] Commented: (DIRSERVER-904) Adding two schema elements of different type with the same OID is allowed, but it should not

    [ https://issues.apache.org/jira/browse/DIRSERVER-904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520728 ] 

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 not  
> ----------------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-904
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-904
>             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-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
> 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.