diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index af86a6f62b..93231fefbc 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -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; ie_id ) { int j;