From 4fcab959c02ef360373e055f8a739f16286e8112 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 21 Mar 2005 20:07:05 +0000 Subject: [PATCH] Define SLAP_USE_CONFDIR, fix moduleload --- servers/slapd/bconfig.c | 11 +++++++---- servers/slapd/slap.h | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 3ee0e4fdda..b2998b72bd 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -1088,7 +1088,10 @@ config_generic(ConfigArgs *c) { /* Record this load on the current path */ { struct berval bv; - ber_str2bv(c->line, 0, 1, &bv); + char *ptr = c->line + STRLENOF('moduleload'); + while (!isspace(*ptr)) ptr++; + while (isspace(*ptr)) ptr++; + ber_str2bv(ptr, 0, 1, &bv); ber_bvarray_add( &modcur->mp_loads, &bv ); } break; @@ -2776,7 +2779,7 @@ read_config(const char *fname, const char *dir) { if ( config_setup_ldif( be, dir )) return 1; -#if 0 /* not yet */ +#ifdef SLAP_USE_CONFDIR /* If we read the config from back-ldif, nothing to do here */ if ( cfb->cb_got_ldif ) return 0; @@ -3562,7 +3565,7 @@ config_back_db_open( BackendDB *be ) /* Create schema nodes... cn=schema will contain the hardcoded core * schema, read-only. Child objects will contain runtime loaded schema - * files. FIXME + * files. */ rdn = schema_rdn; e = config_alloc_entry( ceparent, &rdn ); @@ -3591,7 +3594,7 @@ config_back_db_open( BackendDB *be ) #ifdef SLAPD_MODULES /* Create Module nodes... */ if ( modpaths.mp_loads ) { - ceprev = config_build_includes( &c, ceparent, op, &rs ); + ceprev = config_build_modules( &c, ceparent, op, &rs ); } #endif diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index 784b658567..a419a94103 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -69,6 +69,8 @@ LDAP_BEGIN_DECL #define LDAP_COLLECTIVE_ATTRIBUTES #define SLAP_CONTROL_X_TREE_DELETE LDAP_CONTROL_X_TREE_DELETE +#define SLAP_USE_CONFDIR /* partially implemented */ + #ifdef ENABLE_REWRITE #define SLAP_AUTH_REWRITE 1 /* use librewrite for sasl-regexp */ #endif -- 2.39.5