Skip to content
Snippets Groups Projects
Commit 68744ced authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

fix dn2id delete bug... breaks modrdn.

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