mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
More parsing fixes
This commit is contained in:
parent
38383fca41
commit
c9141a9a08
@ -89,7 +89,7 @@ static ConfigTable bdbcfg[] = {
|
|||||||
bdb_cf_gen, "( OLcfgAt:1.9 NAME 'dbLockDetect' "
|
bdb_cf_gen, "( OLcfgAt:1.9 NAME 'dbLockDetect' "
|
||||||
"DESC 'Deadlock detection algorithm' "
|
"DESC 'Deadlock detection algorithm' "
|
||||||
"SYNTAX OMsDirectoryString )", NULL, NULL },
|
"SYNTAX OMsDirectoryString )", NULL, NULL },
|
||||||
{ "mode", "mode", 2, 2, 0, ARG_LONG|ARG_OFFSET,
|
{ "mode", "mode", 2, 2, 0, ARG_INT|ARG_OFFSET,
|
||||||
(void *)offsetof(struct bdb_info, bi_dbenv_mode),
|
(void *)offsetof(struct bdb_info, bi_dbenv_mode),
|
||||||
"( OLcfgAt:1.10 NAME 'dbMode' "
|
"( OLcfgAt:1.10 NAME 'dbMode' "
|
||||||
"DESC 'Unix permissions of database files' "
|
"DESC 'Unix permissions of database files' "
|
||||||
@ -98,7 +98,7 @@ static ConfigTable bdbcfg[] = {
|
|||||||
bdb_cf_gen, "( OLcfgAt:1.11 NAME 'dbSearchStack' "
|
bdb_cf_gen, "( OLcfgAt:1.11 NAME 'dbSearchStack' "
|
||||||
"DESC 'Depth of search stack in IDLs' "
|
"DESC 'Depth of search stack in IDLs' "
|
||||||
"SYNTAX OMsInteger )", NULL, NULL },
|
"SYNTAX OMsInteger )", NULL, NULL },
|
||||||
{ "shm_key", "key", 2, 2, 0, ARG_INT|ARG_NONZERO|ARG_OFFSET,
|
{ "shm_key", "key", 2, 2, 0, ARG_INT|ARG_OFFSET,
|
||||||
(void *)offsetof(struct bdb_info, bi_shm_key),
|
(void *)offsetof(struct bdb_info, bi_shm_key),
|
||||||
"( OLcfgAt:1.12 NAME 'dbShmKey' "
|
"( OLcfgAt:1.12 NAME 'dbShmKey' "
|
||||||
"DESC 'Key for shared memory region' "
|
"DESC 'Key for shared memory region' "
|
||||||
|
@ -78,7 +78,6 @@ typedef struct CfEntryInfo {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
ConfigFile *cb_config;
|
ConfigFile *cb_config;
|
||||||
CfEntryInfo *cb_root;
|
CfEntryInfo *cb_root;
|
||||||
BackendDB *cb_be; /* config backend */
|
|
||||||
BackendDB cb_db; /* underlying database */
|
BackendDB cb_db; /* underlying database */
|
||||||
int cb_got_ldif;
|
int cb_got_ldif;
|
||||||
} CfBackInfo;
|
} CfBackInfo;
|
||||||
@ -621,10 +620,10 @@ static ConfigOCs cf_ocs[] = {
|
|||||||
"NAME 'olcDatabaseConfig' "
|
"NAME 'olcDatabaseConfig' "
|
||||||
"DESC 'OpenLDAP Database-specific options' "
|
"DESC 'OpenLDAP Database-specific options' "
|
||||||
"SUP olcConfig STRUCTURAL "
|
"SUP olcConfig STRUCTURAL "
|
||||||
"MAY ( olcDatabase $ olcAccess $ olcLastMod $ olcLimits $ "
|
"MAY ( olcDatabase $ olcSuffix $ olcAccess $ olcLastMod $ olcLimits $ "
|
||||||
"olcMaxDerefDepth $ olcPlugin $ olcReadOnly $ olcReplica $ "
|
"olcMaxDerefDepth $ olcPlugin $ olcReadOnly $ olcReplica $ "
|
||||||
"olcReplogFile $ olcRequires $ olcRestrict $ olcRootDN $ olcRootPW $ "
|
"olcReplogFile $ olcRequires $ olcRestrict $ olcRootDN $ olcRootPW $ "
|
||||||
"olcSchemaDN $ olcSecurity $ olcSizeLimit $ olcSuffix $ olcSyncrepl $ "
|
"olcSchemaDN $ olcSecurity $ olcSizeLimit $ olcSyncrepl $ "
|
||||||
"olcTimeLimit $ olcUpdateDN $ olcUpdateRef ) )",
|
"olcTimeLimit $ olcUpdateDN $ olcUpdateRef ) )",
|
||||||
Cft_Database, &cfOc_database },
|
Cft_Database, &cfOc_database },
|
||||||
{ "( OLcfgOc:6 "
|
{ "( OLcfgOc:6 "
|
||||||
@ -1370,7 +1369,8 @@ config_suffix(ConfigArgs *c) {
|
|||||||
struct berval pdn, ndn;
|
struct berval pdn, ndn;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (c->be == frontendDB) return 1;
|
if (c->be == frontendDB || SLAP_MONITOR(c->be) ||
|
||||||
|
SLAP_CONFIG(c->be)) return 1;
|
||||||
|
|
||||||
if (c->op == SLAP_CONFIG_EMIT) {
|
if (c->op == SLAP_CONFIG_EMIT) {
|
||||||
if (!BER_BVISNULL( &c->be->be_suffix[0] )) {
|
if (!BER_BVISNULL( &c->be->be_suffix[0] )) {
|
||||||
@ -3037,7 +3037,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, SlapReply *rs )
|
|||||||
goto ok;
|
goto ok;
|
||||||
/* FALLTHRU */
|
/* FALLTHRU */
|
||||||
case Cft_Global:
|
case Cft_Global:
|
||||||
ca.be = cfb->cb_be;
|
ca.be = backendDB;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Cft_Backend:
|
case Cft_Backend:
|
||||||
@ -3705,7 +3705,6 @@ config_back_db_init( Backend *be )
|
|||||||
|
|
||||||
cfb = ch_calloc( 1, sizeof(CfBackInfo));
|
cfb = ch_calloc( 1, sizeof(CfBackInfo));
|
||||||
cfb->cb_config = &cf_prv;
|
cfb->cb_config = &cf_prv;
|
||||||
cfb->cb_be = be;
|
|
||||||
be->be_private = cfb;
|
be->be_private = cfb;
|
||||||
|
|
||||||
ber_dupbv( &be->be_rootdn, &config_rdn );
|
ber_dupbv( &be->be_rootdn, &config_rdn );
|
||||||
|
@ -233,9 +233,7 @@ int config_check_vals(ConfigTable *Conf, ConfigArgs *c, int check_only ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int config_set_vals(ConfigTable *Conf, ConfigArgs *c) {
|
int config_set_vals(ConfigTable *Conf, ConfigArgs *c) {
|
||||||
int i, rc, arg_type, iarg;
|
int i, rc, arg_type;
|
||||||
long larg;
|
|
||||||
ber_len_t barg;
|
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
||||||
arg_type = Conf->arg_type;
|
arg_type = Conf->arg_type;
|
||||||
@ -269,9 +267,9 @@ int config_set_vals(ConfigTable *Conf, ConfigArgs *c) {
|
|||||||
if(arg_type & ARGS_POINTER)
|
if(arg_type & ARGS_POINTER)
|
||||||
switch(arg_type & ARGS_POINTER) {
|
switch(arg_type & ARGS_POINTER) {
|
||||||
case ARG_ON_OFF:
|
case ARG_ON_OFF:
|
||||||
case ARG_INT: *(int*)ptr = iarg; break;
|
case ARG_INT: *(int*)ptr = c->value_int; break;
|
||||||
case ARG_LONG: *(long*)ptr = larg; break;
|
case ARG_LONG: *(long*)ptr = c->value_long; break;
|
||||||
case ARG_BER_LEN_T: *(ber_len_t*)ptr = barg; break;
|
case ARG_BER_LEN_T: *(ber_len_t*)ptr = c->value_ber_t; break;
|
||||||
case ARG_STRING: {
|
case ARG_STRING: {
|
||||||
char *cc = *(char**)ptr;
|
char *cc = *(char**)ptr;
|
||||||
if(cc) {
|
if(cc) {
|
||||||
|
Loading…
Reference in New Issue
Block a user