From 17a4215256387d7736b102430b02a30076bd8b7b Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 1 Jul 2005 02:08:14 +0000 Subject: [PATCH] ITS#3815 fix olcDbConfig parsing --- servers/slapd/back-bdb/config.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-bdb/config.c b/servers/slapd/back-bdb/config.c index ec013a2512..fef94300ae 100644 --- a/servers/slapd/back-bdb/config.c +++ b/servers/slapd/back-bdb/config.c @@ -509,10 +509,21 @@ bdb_cf_gen(ConfigArgs *c) break; case BDB_CONFIG: { - char *ptr = c->line + STRLENOF("dbconfig"); + char *ptr = c->line; struct berval bv; - while (!isspace(*ptr)) ptr++; - while (isspace(*ptr)) ptr++; + + if ( c->op == SLAP_CONFIG_ADD ) { + ptr += STRLENOF("dbconfig"); + while (!isspace(*ptr)) ptr++; + while (isspace(*ptr)) ptr++; + } else { + if (*ptr == '{') { + ptr = strchr( ptr+1, '}'); + if (!ptr) + return(1); + ptr++; + } + } if ( bdb->bi_flags & BDB_IS_OPEN ) { bdb->bi_flags |= BDB_UPD_CONFIG;