]> git.sur5r.net Git - openldap/commitdiff
Fix ITS#2905, properly detect duplicate entries
authorHoward Chu <hyc@openldap.org>
Mon, 12 Jan 2004 03:54:01 +0000 (03:54 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 12 Jan 2004 03:54:01 +0000 (03:54 +0000)
servers/slapd/back-bdb/tools.c

index af86a6f62be38dba385a848a545ea7a0f7c251d2..93231fefbc1cbbfa82602b91415166c41b17daf5 100644 (file)
@@ -265,6 +265,10 @@ static int bdb_tool_next_id(
        } else if ( !hole ) {
                unsigned i;
 
+               if ( e->e_id == NOID ) {
+                       return DB_KEYEXIST;
+               }
+
                for ( i=0; i<nholes; i++) {
                        if ( holes[i].id == e->e_id ) {
                                int j;