From: Howard Chu Date: Fri, 1 Jul 2005 02:08:14 +0000 (+0000) Subject: ITS#3815 fix olcDbConfig parsing X-Git-Tag: OPENLDAP_AC_BP~476 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=17a4215256387d7736b102430b02a30076bd8b7b;p=openldap ITS#3815 fix olcDbConfig parsing --- 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;