[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
(ITS#4402) attribute name is not recognized
Full_Name: jerome
Version: 2.2.13
OS: RedHat Linux
URL:
Submission from: (NULL) (64.208.49.60)
Hi,
I found out a different behaviour between OpenLDAP 2.1 and 2.2.
(between 2.1.22 and 2.2.13 to be precise)
First, add the following schema in your slapd.conf :
=================================
file test.schema
=================================
attributetype ( 1.1.1.1.1.1.1.1.1
NAME 'myAttr'
DESC 'The attribute used as a password'
EQUALITY objectIdentifierMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.38
SINGLE-VALUE )
objectclass ( 1.1.1.1.1.1.1.2.1
NAME 'myClass'
SUP top
STRUCTURAL
MUST ( cn )
MAY ( myAttr )
)
==================================
We just define a class with a single attribute which is an object identifier.
Now, try using ldapadd to create an instance of this class using the following
LDIF file :
==================================
file test.ldif
=================================
dn:cn=myObj
objectClass:myClass
cn:myObj
myAttr: userPassword
==================================
With OpenLDAP 2.1, it works fine. userPassword is recognized.
However, with OpenLDAP2.2, I have the following error :
==================================
adding new entry "cn=myObj"
ldap_add: Invalid syntax (21)
additional info: myAttr: value #0 invalid per syntax
==================================
It seems that the attribute name is not recognized
(I made some research on google and that was the meaning
of the error).
So, i tried with the real oid, so the following LDIF content :
==================================
file test2.ldif
=================================
dn:cn=myObj
objectClass:myClass
cn:myObj
myAttr: 2.5.4.35
==================================
and this time, it works fine.
Any idea on this strange behavior ?
Regards.