[Date Prev][Date Next] [Chronological] [Thread] [Top]

Problems with deleting and adding entries with same RDN



Hi all,

I have a problem with openldap v. 2.0.21 on a Linux Mandrake 8.2.
I would like to be able to add and delete entries conforming
to a schema. I have created an objectclass called 'box'
according to the following schema-definition:


---------------------- start of schema --------------------------

attributeType ( 1.3.6.1.4.1.13582.2.2.3.1 NAME 'ip'
                DESC 'ip address'
                SUP ipHostNumber )


attributeType ( 1.3.6.1.4.1.13582.2.2.3.2 NAME 'mac'
                DESC 'mac address'
                SUP macAddress )


attributeType ( 1.3.6.1.4.1.13582.2.2.3.3 NAME 'serial'
                DESC 'serial number'
                EQUALITY caseIgnoreMatch
                SUBSTR caseIgnoreSubstringsMatch
                SYNTAX  1.3.6.1.4.1.1466.115.121.1.44{64} )


attributeType ( 1.3.6.1.4.1.13582.2.2.3.8 NAME 'subscriberref'
                DESC 'Reference to subscriber'
                SUP name )

attributeType ( 1.3.6.1.4.1.13582.2.2.3.12 NAME 'hostname'
                DESC 'Hostname'
                EQUALITY caseIgnoreMatch
                SUBSTR caseIgnoreSubstringsMatch 
                SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

attributeType ( 1.3.6.1.4.1.13582.2.2.3.13 NAME 'subscriberno'
                DESC 'Subscriber id'
                EQUALITY caseIgnoreMatch
                SUBSTR caseIgnoreSubstringsMatch 
                SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

attributeType ( 1.3.6.1.4.1.13582.2.2.3.14 NAME 'pin'
                DESC '4 digit pin code'
                EQUALITY numericStringMatch 
                SUBSTR numericStringSubstringsMatch
                SYNTAX 1.3.6.1.4.1.1466.115.121.1.36{4} )

attributeType ( 1.3.6.1.4.1.13582.2.2.3.17 NAME 'id'
                DESC 'Id'
                EQUALITY caseIgnoreMatch
                SUBSTR caseIgnoreSubstringsMatch 
                SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

objectclass (1.3.6.1.4.1.13582.2.2.4.5 NAME 'box'
                DESC 'STB'
                SUP top
                MAY  (objectclass $ id $ cn $ mac $ serial $ ip $ hostname $ subscriberno $ pin) )

---------------- end of schema -------------------------------------

The schema file is included in slapd.conf and server starts correctly.

There are 2 problems with this:

1)
The first problem is, that if I add an entry (say with RDN of id=1001),
delete it and then add a new entry with same RDN (id=1001),
I get an error 68 (Name Already Bound) even though the entry does not
exist if I check it manually with an ldap-client. I'm trying to do
this through the java ldap-interface 1.2.4 (jndi) from sun. I don't think it
is the java API causing the problem, since this error survives a
restart of the java-program, but I'm not sure.

Does anybody know if openldap cashes something and if so, how one
could avoid this?

2)
If I add en entry (say with RDN of id=1001), delete it, then add
another entry ( with RDN id=1000 ) and then try to rename it to id=1001, the
openldap-server crashes with a Communication Exception (error 80)!!

It could at first glance seem like a bug in openldap, since it is not a
great thing to be able to crash it from any client, however, could
this have something to do with my schema-definition?

Any help would be appreciated.

Best regards
Mads Thiessen