mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-27 03:20:22 +08:00
(From ITS#8958) allow 2.5 slapcat to read 2.4 DB
This commit is contained in:
parent
6237ae17db
commit
d877251b2c
@ -215,15 +215,18 @@ mdb_db_open( BackendDB *be, ConfigReply *cr )
|
|||||||
&mdb->mi_dbis[i] );
|
&mdb->mi_dbis[i] );
|
||||||
|
|
||||||
if ( rc != 0 ) {
|
if ( rc != 0 ) {
|
||||||
snprintf( cr->msg, sizeof(cr->msg), "database \"%s\": "
|
/* when read-only, it's ok for ID2VAL or IDXCKP to not exist */
|
||||||
"mdb_dbi_open(%s/%s) failed: %s (%d).",
|
if (( flags & MDB_CREATE ) || ( i < MDB_ID2VAL )) {
|
||||||
be->be_suffix[0].bv_val,
|
snprintf( cr->msg, sizeof(cr->msg), "database \"%s\": "
|
||||||
mdb->mi_dbenv_home, mdmi_databases[i].bv_val,
|
"mdb_dbi_open(%s/%s) failed: %s (%d).",
|
||||||
mdb_strerror(rc), rc );
|
be->be_suffix[0].bv_val,
|
||||||
Debug( LDAP_DEBUG_ANY,
|
mdb->mi_dbenv_home, mdmi_databases[i].bv_val,
|
||||||
LDAP_XSTRING(mdb_db_open) ": %s\n",
|
mdb_strerror(rc), rc );
|
||||||
cr->msg );
|
Debug( LDAP_DEBUG_ANY,
|
||||||
goto fail;
|
LDAP_XSTRING(mdb_db_open) ": %s\n",
|
||||||
|
cr->msg );
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( i == MDB_ID2ENTRY )
|
if ( i == MDB_ID2ENTRY )
|
||||||
|
Loading…
Reference in New Issue
Block a user