summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2006-03-15 00:52:02 +0000
committerNoriko Hosoi <nhosoi@redhat.com>2006-03-15 00:52:02 +0000
commitdbbe3de5b21b7b79283f699083f89b0c79571ea0 (patch)
tree278910720fb3e0ba9fab890f432d5a4074f8a43b
parent471e39b439595a844a759e61cb9521b6ebdebb5b (diff)
[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)
-rw-r--r--ldap/servers/slapd/back-ldbm/idl_new.c4
1 files changed, 1 insertions, 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; "