From: Pierangelo Masarati Date: Thu, 14 Sep 2006 01:02:28 +0000 (+0000) Subject: URIs need to be between double quotes X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~151 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1f257bf5ede73f284ce09ae4013b1be205a85374;p=openldap URIs need to be between double quotes --- diff --git a/servers/slapd/back-ldap/config.c b/servers/slapd/back-ldap/config.c index fab18dcb8a..1bbcf7dacf 100644 --- a/servers/slapd/back-ldap/config.c +++ b/servers/slapd/back-ldap/config.c @@ -295,8 +295,8 @@ static ConfigOCs ldapocs[] = { "NAME 'olcLDAPConfig' " "DESC 'LDAP backend configuration' " "SUP olcDatabaseConfig " - "MUST olcDbURI " - "MAY ( olcDbStartTLS " + "MAY ( olcDbURI " + "$ olcDbStartTLS " "$ olcDbACLAuthcDn " "$ olcDbACLPasswd " "$ olcDbACLBind " @@ -715,10 +715,14 @@ ldap_back_cf_gen( ConfigArgs *c ) switch( c->type ) { case LDAP_BACK_CFG_URI: if ( li->li_uri != NULL ) { - struct berval bv; + struct berval bv, bv2; ber_str2bv( li->li_uri, 0, 0, &bv ); - value_add_one( &c->rvalue_vals, &bv ); + bv2.bv_len = bv.bv_len + STRLENOF( "\"\"" ); + bv2.bv_val = ch_malloc( bv2.bv_len + 1 ); + snprintf( bv2.bv_val, bv2.bv_len + 1, + "\"%s\"", bv.bv_val ); + ber_bvarray_add( &c->rvalue_vals, &bv2 ); } else { rc = 1;