Commit 68744ced authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

fix dn2id delete bug... breaks modrdn.

parent 406f33eb
......@@ -74,7 +74,7 @@ int ldbm_cache_delete LDAP_P(( DBCache *db, Datum key ));
int dn2id_add LDAP_P(( Backend *be, const char *dn, ID id ));
ID dn2id LDAP_P(( Backend *be, const char *dn ));
ID_BLOCK *dn2idl LDAP_P(( Backend *be, const char *dn, int prefix ));
int dn2id_delete LDAP_P(( Backend *be, const char *dn ));
int dn2id_delete LDAP_P(( Backend *be, const char *dn, ID id ));
Entry * dn2entry_rw LDAP_P(( Backend *be, const char *dn, Entry **matched, int rw ));
#define dn2entry_r(be, dn, m) dn2entry_rw((be), (dn), (m), 0)
......
......@@ -317,7 +317,8 @@ loop_continue:
rc = 0;
done:
idl_free( candidates );
if( candidates != NULL )
idl_free( candidates );
ber_bvecfree( v2refs );
if( realbase ) free( realbase );
......
......@@ -184,7 +184,7 @@ ID ldbm_tool_entry_put(
rc = ldbm_cache_store( id2entry, key, data, LDBM_REPLACE );
if( rc != 0 ) {
(void) dn2id_delete( be, e->e_ndn );
(void) dn2id_delete( be, e->e_ndn, e->e_id );
return NOID;
}
......
......@@ -60,6 +60,7 @@ LDIFFLT=$DBDIR/ldif.flt
MASTEROUT=$DBDIR/master.out
SLAVEOUT=$DBDIR/slave.out
TESTOUT=$DBDIR/test.out
INITOUT=$DBDIR/init.out
SEARCHOUTMASTER=$DATADIR/search.out.master
MODIFYOUTMASTER=$DATADIR/modify.out.master
ADDDELOUTMASTER=$DATADIR/adddel.out.master
......
......@@ -31,8 +31,8 @@ echo "Testing slapd modrdn operations..."
# Make sure we can search the database
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
'objectclass=*' > /dev/null 2>&1
$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
'objectClass=*' > $INITOUT 2>&1
RC=$?
if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment