]> git.sur5r.net Git - openldap/commitdiff
ITS#3616 allow adding entry with zero-length DN if the suffix is zero-length
authorHoward Chu <hyc@openldap.org>
Sat, 9 Apr 2005 11:28:06 +0000 (11:28 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 9 Apr 2005 11:28:06 +0000 (11:28 +0000)
servers/slapd/back-bdb/tools.c

index c82ba7317836722f8d2ea4fcf1906246fc421836..a543f427c1cf17e113073a81cd1f434c258c4949 100644 (file)
@@ -239,7 +239,10 @@ static int bdb_tool_next_id(
        EntryInfo *ei = NULL, eidummy;
        int rc;
 
-       if (ndn.bv_len == 0) return 0;
+       if (ndn.bv_len == 0) {
+               e->e_id = 0;
+               return 0;
+       }
 
        rc = bdb_cache_find_ndn( op, tid, &ndn, &ei );
        if ( ei ) bdb_cache_entryinfo_unlock( ei );