set rc before calling Debug, from Paul B. Henson

This commit is contained in:
sthen 2017-08-06 10:50:05 +00:00
parent 0f283f058e
commit 5ed33d829b

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-servers_slapd_back-mdb_init_c,v 1.3 2017/08/04 12:34:56 sthen Exp $
$OpenBSD: patch-servers_slapd_back-mdb_init_c,v 1.4 2017/08/06 10:50:05 sthen Exp $
Index: servers/slapd/back-mdb/init.c
--- servers/slapd/back-mdb/init.c.orig
+++ servers/slapd/back-mdb/init.c
@ -24,11 +24,11 @@ Index: servers/slapd/back-mdb/init.c
+ */
+
+ if ( !(flags & MDB_WRITEMAP) ) {
+ rc = MDB_INCOMPATIBLE;
+ Debug( LDAP_DEBUG_ANY,
+ LDAP_XSTRING(mdb_db_open) ": database \"%s\" does not have writemap. "
+ "This is required on systems without unified buffer cache.\n",
+ be->be_suffix[0].bv_val, rc, 0 );
+ rc = MDB_INCOMPATIBLE;
+ goto fail;
+ }
+#endif