fix dn2id delete bug... breaks modrdn.

This commit is contained in:
Kurt Zeilenga 1999-08-26 00:51:27 +00:00
parent 406f33eb12
commit 68744ced8d
5 changed files with 7 additions and 5 deletions

View file

@ -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)

View file

@ -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 );

View file

@ -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;
}

View file

@ -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

View file

@ -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..."