From 61f5f03a23c8ed92b595ae9257c4017b7fe56a57 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 25 Sep 2000 21:30:15 +0000 Subject: [PATCH] Disable sub directory support for now --- servers/slapd/back-bdb/back-bdb.h | 6 ++++++ servers/slapd/back-bdb/init.c | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-bdb/back-bdb.h b/servers/slapd/back-bdb/back-bdb.h index e47b9e5310..fec1848d96 100644 --- a/servers/slapd/back-bdb/back-bdb.h +++ b/servers/slapd/back-bdb/back-bdb.h @@ -41,9 +41,15 @@ LDAP_BEGIN_DECL #define BDB_DBENV_HOME LDAP_RUNDIR LDAP_DIRSEP "openldap-bdb" +#ifdef BDB_SUBDIRS #define BDB_TMP_SUBDIR LDAP_DIRSEP "tmp" #define BDB_LG_SUBDIR LDAP_DIRSEP "log" #define BDB_DATA_SUBDIR LDAP_DIRSEP "data" +#else +#define BDB_TMP_SUBDIR BDB_DBENV_HOME +#define BDB_LG_SUBDIR BDB_DBENV_HOME +#define BDB_DATA_SUBDIR BDB_DBENV_HOME +#endif #define BDB_NEXTID 0 #define BDB_DN2ID 1 diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 046a060900..8dc2e1a62f 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -94,6 +94,7 @@ bdb_db_open( BackendDB *be ) bdb->bi_dbenv->set_errpfx( bdb->bi_dbenv, be->be_suffix[0] ); bdb->bi_dbenv->set_errcall( bdb->bi_dbenv, bdb_errcall ); +#ifdef BDB_SUBDIRS { char dir[MAXPATHLEN]; size_t len = strlen( bdb->bi_dbenv_home ); @@ -129,6 +130,11 @@ bdb_db_open( BackendDB *be ) return rc; } } +#endif + + Debug( LDAP_DEBUG_TRACE, + "bi_back_db_open: dbenv_open(%s)\n", + bdb->bi_dbenv_home, 0, 0); rc = bdb->bi_dbenv->open( bdb->bi_dbenv, bdb->bi_dbenv_home, @@ -136,8 +142,8 @@ bdb_db_open( BackendDB *be ) bdb->bi_dbenv_mode ); if( rc != 0 ) { Debug( LDAP_DEBUG_ANY, - "bi_back_db_open: dbenv_open(%s) failed: %s (%d)\n", - bdb->bi_dbenv_home, db_strerror(rc), rc ); + "bi_back_db_open: dbenv_open failed: %s (%d)\n", + db_strerror(rc), rc, 0 ); return rc; } -- 2.39.5