[Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm idl_new.c, 1.4, 1.5

Noriko Hosoi (nhosoi) fedora-directory-commits at redhat.com
Wed Mar 15 00:51:23 UTC 2006


Author: nhosoi

Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20599

Modified Files:
	idl_new.c 
Log Message:
[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 at redhat.com)



Index: idl_new.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/idl_new.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- idl_new.c	19 Apr 2005 22:07:38 -0000	1.4
+++ idl_new.c	15 Mar 2006 00:51:14 -0000	1.5
@@ -244,9 +244,7 @@
     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; "




More information about the Fedora-directory-commits mailing list