From 1229cfcc3f9b00bc25acd9371f4d9f4fc5197889 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 22 Jun 2001 21:00:24 +0000 Subject: [PATCH] Backout directory config option --- doc/man/man5/slapd.conf.5 | 19 +++++-------- servers/slapd/back-ldbm/back-ldbm.h | 4 --- servers/slapd/back-ldbm/config.c | 42 ----------------------------- servers/slapd/back-ldbm/external.h | 3 --- servers/slapd/back-ldbm/init.c | 16 +++-------- tests/data/slapd-acl.conf | 3 --- tests/data/slapd-master.conf | 3 --- tests/data/slapd-pw.conf | 3 --- tests/data/slapd-ref-slave.conf | 3 --- tests/data/slapd-repl-master.conf | 3 --- tests/data/slapd-repl-slave.conf | 3 --- tests/data/slapd-schema.conf | 3 --- tests/data/slapd.conf | 3 --- 13 files changed, 11 insertions(+), 97 deletions(-) diff --git a/doc/man/man5/slapd.conf.5 b/doc/man/man5/slapd.conf.5 index 6e55a7fd92..2cd32ec51c 100644 --- a/doc/man/man5/slapd.conf.5 +++ b/doc/man/man5/slapd.conf.5 @@ -57,7 +57,7 @@ backslash character. .LP The specific configuration options available are discussed below in the Global Configuration Options, General Backend Options, General Database -Options, LDBM Backend-Specific Options, LDBM Database-Specific Options, +Options, LDBM Database-Specific Options, Shell Database-Specific Options, and Password Database-Specific Options sections. Refer to the "OpenLDAP Administrator's Guide" for more details on the slapd configuration @@ -617,17 +617,12 @@ Specify the referral to pass back when .BR slapd (8) is asked to modify a replicated local database. If specified multiple times, each url is provided. -.SH LDBM BACKEND-SPECIFIC OPTIONS -Options in this category only apply to the LDBM backend. That is, -they must follow "backend ldbm" line and come before any subsequent -"backend" or "database" lines. The LDBM backend is a high-performance -database that makes extensive use of indexing and caching to speed -data access. -.TP -.B directory -Specify the directory where shared LDBM files, namely those associated -with a BerkeleyDB environment, for all LDBM databases are kept. -The default is unset. +.\" .SH LDBM BACKEND-SPECIFIC OPTIONS +.\" Options in this category only apply to the LDBM backend. That is, +.\" they must follow "backend ldbm" line and come before any subsequent +.\" "backend" or "database" lines. The LDBM backend is a high-performance +.\" database that makes extensive use of indexing and caching to speed +.\" data access. .SH LDBM DATABASE-SPECIFIC OPTIONS Options in this category only apply to the LDBM databases. That is, they must follow "database ldbm" line and come before any subsequent diff --git a/servers/slapd/back-ldbm/back-ldbm.h b/servers/slapd/back-ldbm/back-ldbm.h index 2272579d1b..dd2c70871a 100644 --- a/servers/slapd/back-ldbm/back-ldbm.h +++ b/servers/slapd/back-ldbm/back-ldbm.h @@ -121,10 +121,6 @@ struct ldbminfo { int li_envdirok; }; -struct ldbm_backend_info { - char *lbi_directory; -}; - LDAP_END_DECL #include "proto-back-ldbm.h" diff --git a/servers/slapd/back-ldbm/config.c b/servers/slapd/back-ldbm/config.c index 428792378f..35b6d907b3 100644 --- a/servers/slapd/back-ldbm/config.c +++ b/servers/slapd/back-ldbm/config.c @@ -15,48 +15,6 @@ #include "slap.h" #include "back-ldbm.h" - -int -ldbm_back_config( - BackendInfo *bi, - const char *fname, - int lineno, - int argc, - char **argv -) -{ - struct ldbm_backend_info *lbi = - (struct ldbm_backend_info *) bi->bi_private; - - if ( lbi == NULL ) { - fprintf( stderr, "%s: line %d: ldbm backend info is null!\n", - fname, lineno ); - return 1; - } - - /* directory where database files live */ - if ( strcasecmp( argv[0], "directory" ) == 0 ) { - if ( argc < 2 ) { - fprintf( stderr, - "%s: line %d: missing dir in \"directory \" line\n", - fname, lineno ); - return( 1 ); - } - if ( lbi->lbi_directory ) { - free( lbi->lbi_directory ); - } - lbi->lbi_directory = ch_strdup( argv[1] ); - - /* anything else */ - } else { - fprintf( stderr, -"%s: line %d: unknown directive \"%s\" in ldbm backend definition (ignored)\n", - fname, lineno, argv[0] ); - } - - return 0; -} - int ldbm_back_db_config( Backend *be, diff --git a/servers/slapd/back-ldbm/external.h b/servers/slapd/back-ldbm/external.h index 03d937ea54..76a3771f05 100644 --- a/servers/slapd/back-ldbm/external.h +++ b/servers/slapd/back-ldbm/external.h @@ -13,9 +13,6 @@ extern int ldbm_back_initialize LDAP_P(( BackendInfo *bi )); extern int ldbm_back_open LDAP_P(( BackendInfo *bi )); extern int ldbm_back_close LDAP_P(( BackendInfo *bi )); extern int ldbm_back_destroy LDAP_P(( BackendInfo *bi )); -extern int ldbm_back_config LDAP_P(( BackendInfo *bi, - const char *fname, int lineno, - int argc, char **argv )); extern int ldbm_back_db_init LDAP_P(( BackendDB *bd )); extern int ldbm_back_db_open LDAP_P(( BackendDB *bd )); diff --git a/servers/slapd/back-ldbm/init.c b/servers/slapd/back-ldbm/init.c index 3dee2bc2c1..7592920b51 100644 --- a/servers/slapd/back-ldbm/init.c +++ b/servers/slapd/back-ldbm/init.c @@ -43,7 +43,7 @@ ldbm_back_initialize( bi->bi_controls = controls; bi->bi_open = ldbm_back_open; - bi->bi_config = ldbm_back_config; + bi->bi_config = NULL; bi->bi_close = ldbm_back_close; bi->bi_destroy = ldbm_back_destroy; @@ -86,14 +86,6 @@ ldbm_back_initialize( bi->bi_connection_init = 0; bi->bi_connection_destroy = 0; - { - struct ldbm_backend_info *lbi = malloc( - sizeof( struct ldbm_backend_info ) ); - - bi->bi_private = lbi; - lbi->lbi_directory = NULL; - } - return 0; } @@ -116,7 +108,7 @@ ldbm_back_open( = (struct ldbm_backend_info *) bi->bi_private; /* initialize the underlying database system */ - rc = ldbm_initialize( lbi->lbi_directory ); + rc = ldbm_initialize( NULL ); return rc; } @@ -186,8 +178,8 @@ ldbm_back_db_open( ) { struct ldbminfo *li = (struct ldbminfo *) be->be_private; - li->li_dbenv = ldbm_initialize_env(li->li_directory, - li->li_dbcachesize, &li->li_envdirok); + li->li_dbenv = ldbm_initialize_env( li->li_directory, + li->li_dbcachesize, &li->li_envdirok ); return 0; } diff --git a/tests/data/slapd-acl.conf b/tests/data/slapd-acl.conf index 3583472af6..da39acbccd 100644 --- a/tests/data/slapd-acl.conf +++ b/tests/data/slapd-acl.conf @@ -14,9 +14,6 @@ argsfile ./test-db/slapd.args # ldbm database definitions ####################################################################### -backend @BACKEND@ -# #ldbm#directory ./test-db - database @BACKEND@ cachesize 0 suffix "o=University of Michigan, c=US" diff --git a/tests/data/slapd-master.conf b/tests/data/slapd-master.conf index d1eb246f13..9934499be6 100644 --- a/tests/data/slapd-master.conf +++ b/tests/data/slapd-master.conf @@ -14,9 +14,6 @@ argsfile ./test-db/slapd.args # ldbm database definitions ####################################################################### -backend @BACKEND@ -# #ldbm#directory ./test-db - database @BACKEND@ suffix "o=University of Michigan, c=US" directory ./test-db diff --git a/tests/data/slapd-pw.conf b/tests/data/slapd-pw.conf index 0995db0cbc..509a1e21c1 100644 --- a/tests/data/slapd-pw.conf +++ b/tests/data/slapd-pw.conf @@ -16,9 +16,6 @@ argsfile ./test-db/slapd.args # ldbm database definitions ####################################################################### -backend @BACKEND@ -# #ldbm#directory ./test-db - database @BACKEND@ cachesize 0 suffix "o=University of Michigan, c=US" diff --git a/tests/data/slapd-ref-slave.conf b/tests/data/slapd-ref-slave.conf index 8af0ca2b27..305faa8ead 100644 --- a/tests/data/slapd-ref-slave.conf +++ b/tests/data/slapd-ref-slave.conf @@ -18,9 +18,6 @@ argsfile ./test-repl/slapd.args referral "ldap://localhost:9009/" -backend @BACKEND@ -# #ldbm#directory ./test-repl - database @BACKEND@ cachesize 0 suffix "o=University of Mich, c=US" diff --git a/tests/data/slapd-repl-master.conf b/tests/data/slapd-repl-master.conf index bb4944fe1b..9eea2a08da 100644 --- a/tests/data/slapd-repl-master.conf +++ b/tests/data/slapd-repl-master.conf @@ -16,9 +16,6 @@ argsfile ./test-db/slapd.args # ldbm database definitions ####################################################################### -backend @BACKEND@ -# #ldbm#directory ./test-db - database @BACKEND@ cachesize 0 suffix "o=University of Michigan, c=US" diff --git a/tests/data/slapd-repl-slave.conf b/tests/data/slapd-repl-slave.conf index f9f798e1fd..8086ba7487 100644 --- a/tests/data/slapd-repl-slave.conf +++ b/tests/data/slapd-repl-slave.conf @@ -17,9 +17,6 @@ argsfile ./test-repl/slapd.args # ldbm database definitions ####################################################################### -backend @BACKEND@ -# #ldbm#directory ./test-repl - database @BACKEND@ cachesize 0 suffix "o=University of Michigan, c=US" diff --git a/tests/data/slapd-schema.conf b/tests/data/slapd-schema.conf index 34acfc9255..c66d35127f 100644 --- a/tests/data/slapd-schema.conf +++ b/tests/data/slapd-schema.conf @@ -25,9 +25,6 @@ argsfile ./test-db/slapd.args # ldbm database definitions ####################################################################### -backend @BACKEND@ -# #ldbm#directory ./test-db - database @BACKEND@ suffix "o=OpenLDAP Project, l=Internet" directory ./test-db diff --git a/tests/data/slapd.conf b/tests/data/slapd.conf index 9d9e53ce47..641911c0b8 100644 --- a/tests/data/slapd.conf +++ b/tests/data/slapd.conf @@ -15,9 +15,6 @@ argsfile ./test-db/slapd.args # ldbm database definitions ####################################################################### -backend @BACKEND@ -# #ldbm#directory ./test-db - database @BACKEND@ suffix "o=University of Michigan, c=US" directory ./test-db