Browse Source

[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. ([email protected])

Noriko Hosoi 19 years ago
parent
commit
7ec2e6103b
1 changed files with 1 additions and 3 deletions
  1. 1 3
      ldap/servers/slapd/back-ldbm/idl_new.c

+ 1 - 3
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);
     ret = cursor->c_get(cursor,&key,&data,DB_SET);
 #endif
 #endif
     if (0 != ret) {
     if (0 != ret) {
-        if (DB_NOTFOUND == ret) {
-            ret = 0;
-        } else {
+        if (DB_NOTFOUND != ret) {
 #ifdef DB_USE_BULK_FETCH
 #ifdef DB_USE_BULK_FETCH
             if (ret == ENOMEM) {
             if (ret == ENOMEM) {
                 LDAPDebug(LDAP_DEBUG_ANY, "database index is corrupt; "
                 LDAPDebug(LDAP_DEBUG_ANY, "database index is corrupt; "