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

Re: White space in DN not significant when searching? (ITS#1191)



I modified slapadd (in HEAD) to error if the entry to be already
exists.  Please test.

At 07:36 AM 6/6/2001, johan.troedsson@ei.sigma.se wrote:
>Full_Name: Johan Troedsson
>Version: 2.0.11
>OS: Redhat Linux 6.2
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (195.163.68.70)
>
>
>I load the LDAP using slapadd with:
>
>dn: dc=test
>objectClass: dcObject
>dc: test
>
>dn: cn=A B,dc=test
>objectClass: top
>objectClass: person
>cn: A B
>sn: B
>
>dn: cn=A  B,dc=test
>objectClass: top
>objectClass: person
>cn: A  B
>sn: B
>
>When viewing the LDAP tree with a LDAP browser, the last node is not displayed.
>If I dump the LDAP with slapcat, the node is there as it should. I use LDBM as
>backend.
>
>Is this the correct behaviour?
>
>/Rgds Johan
>
>
>NOTE: 
>In the debug output:
>At the line
>=> dn2id_add( "CN=A B,DC=TEST", 3 )
>the space has been truncated...
>
>Debug output:
>
>slapadd startup: initiated.
>backend_startup: starting database
>=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/id2entry.dbb", 7, 600 )
>ldbm_cache_open (blksize 4096) (maxids 1022) (maxindirect 9)
><= ldbm_cache_open (opened 0)
>=> str2entry
><= str2entry(dc=test) -> -1 (0x80b59c0)
>oc_check_required entry (dc=test), objectclass "dcObject"
>oc_check_allowed type "objectClass"
>oc_check_allowed type "dc"
>=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/nextid.dbb", 7, 600 )
>ldbm_cache_open (blksize 4096) (maxids 1022) (maxindirect 9)
><= ldbm_cache_open (opened 1)
>=> ldbm_tool_entry_put( 1, "dc=test" )
>=> index_entry_add( 1, "dc=test" )
>=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/objectClass.dbb", 7, 600 )
>ldbm_cache_open (blksize 4096) (maxids 1022) (maxindirect 9)
><= ldbm_cache_open (opened 2)
>=> key_change(ADD,1)
><= key_change 0
><= index_entry_add( 1, "dc=test" ) success
>=> dn2id_add( "DC=TEST", 1 )
>=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/dn2id.dbb", 7, 600 )
>ldbm_cache_open (blksize 4096) (maxids 1022) (maxindirect 9)
><= ldbm_cache_open (opened 3)
><= dn2id_add 0
>added: "dc=test" (00000001)
>=> str2entry
><= str2entry(cn=A B,dc=test) -> -1 (0x80b59c0)
>oc_check_required entry (cn=A B,dc=test), objectclass "top"
>oc_check_required entry (cn=A B,dc=test), objectclass "person"
>oc_check_allowed type "objectClass"
>oc_check_allowed type "cn"
>oc_check_allowed type "sn"
>=> ldbm_tool_entry_put( 2, "cn=A B,dc=test" )
>=> index_entry_add( 2, "cn=A B,dc=test" )
>=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/objectClass.dbb", 7, 600 )
><= ldbm_cache_open (cache 2)
>=> key_change(ADD,2)
><= key_change 0
>=> key_change(ADD,2)
><= key_change 0
><= index_entry_add( 2, "cn=A B,dc=test" ) success
>=> dn2id_add( "CN=A B,DC=TEST", 2 )
>=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/dn2id.dbb", 7, 600 )
><= ldbm_cache_open (cache 3)
><= dn2id_add 0
>added: "cn=A B,dc=test" (00000002)
>=> str2entry
><= str2entry(cn=A  B,dc=test) -> -1 (0x80b59c0)
>oc_check_required entry (cn=A  B,dc=test), objectclass "top"
>oc_check_required entry (cn=A  B,dc=test), objectclass "person"
>oc_check_allowed type "objectClass"
>oc_check_allowed type "cn"
>oc_check_allowed type "sn"
>=> ldbm_tool_entry_put( 3, "cn=A  B,dc=test" )
>=> index_entry_add( 3, "cn=A  B,dc=test" )
>=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/objectClass.dbb", 7, 600 )
><= ldbm_cache_open (cache 2)
>=> key_change(ADD,3)
><= key_change 0
>=> key_change(ADD,3)
><= key_change 0
><= index_entry_add( 3, "cn=A  B,dc=test" ) success
>=> dn2id_add( "CN=A B,DC=TEST", 3 )
>=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/dn2id.dbb", 7, 600 )
><= ldbm_cache_open (cache 3)
><= dn2id_add 0
>added: "cn=A  B,dc=test" (00000003)
>=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/nextid.dbb", 7, 600 )
><= ldbm_cache_open (cache 1)
>slapadd shutdown: initiated
>ldbm backend syncing
>ldbm flushing db (/usr/local/var/openldap-ldbm/id2entry.dbb)
>ldbm closing db (/usr/local/var/openldap-ldbm/id2entry.dbb)
>ldbm flushing db (/usr/local/var/openldap-ldbm/nextid.dbb)
>ldbm closing db (/usr/local/var/openldap-ldbm/nextid.dbb)
>ldbm flushing db (/usr/local/var/openldap-ldbm/objectClass.dbb)
>ldbm closing db (/usr/local/var/openldap-ldbm/objectClass.dbb)
>ldbm flushing db (/usr/local/var/openldap-ldbm/dn2id.dbb)
>ldbm closing db (/usr/local/var/openldap-ldbm/dn2id.dbb)
>ldbm backend done syncing
>====> cache_release_all
>slapadd shutdown: freeing system resources.