From dbbe3de5b21b7b79283f699083f89b0c79571ea0 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Wed, 15 Mar 2006 00:52:02 +0000 Subject: [185477] ldif2db allows entries without a parent to be imported The problem is that the new IDL code is not exposing the DB_NOTFOUND error when the index key is not found. Import checks if the result was DB_NOTFOUND when checking for the parent entry's entrydn index. This works fine with the old IDL code. (nkinder@redhat.com) --- ldap/servers/slapd/back-ldbm/idl_new.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ldap/servers/slapd/back-ldbm/idl_new.c b/ldap/servers/slapd/back-ldbm/idl_new.c index cb391498..15c022a7 100644 --- a/ldap/servers/slapd/back-ldbm/idl_new.c +++ b/ldap/servers/slapd/back-ldbm/idl_new.c @@ -244,9 +244,7 @@ IDList * idl_new_fetch( ret = cursor->c_get(cursor,&key,&data,DB_SET); #endif if (0 != ret) { - if (DB_NOTFOUND == ret) { - ret = 0; - } else { + if (DB_NOTFOUND != ret) { #ifdef DB_USE_BULK_FETCH if (ret == ENOMEM) { LDAPDebug(LDAP_DEBUG_ANY, "database index is corrupt; " -- cgit