mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-17 14:00:30 +08:00
ITS#7496, more for ITS#7483
Missing entries need to be checked at runtime too, not just slapcat. Apparently some people will still try to run slapd even after slapadd tells them their DB load was invalid.
This commit is contained in:
parent
ad9f847bf4
commit
2f53035a51
@ -121,12 +121,17 @@ int mdb_id2edata(
|
||||
MDB_val *data )
|
||||
{
|
||||
MDB_val key;
|
||||
int rc;
|
||||
|
||||
key.mv_data = &id;
|
||||
key.mv_size = sizeof(ID);
|
||||
|
||||
/* fetch it */
|
||||
return mdb_cursor_get( mc, &key, data, MDB_SET );
|
||||
rc = mdb_cursor_get( mc, &key, data, MDB_SET );
|
||||
/* stubs from missing parents - DB is actually invalid */
|
||||
if ( rc == MDB_SUCCESS && !data->mv_size )
|
||||
rc = MDB_NOTFOUND;
|
||||
return rc;
|
||||
}
|
||||
|
||||
int mdb_id2entry(
|
||||
@ -178,6 +183,9 @@ int mdb_id2entry(
|
||||
return MDB_SUCCESS;
|
||||
}
|
||||
}
|
||||
/* stubs from missing parents - DB is actually invalid */
|
||||
if ( rc == MDB_SUCCESS && !data.mv_size )
|
||||
rc = MDB_NOTFOUND;
|
||||
if ( rc ) return rc;
|
||||
|
||||
rc = mdb_entry_decode( op, &data, e );
|
||||
|
Loading…
Reference in New Issue
Block a user