LDAP_BACK_CFG_T_F,
LDAP_BACK_CFG_WHOAMI,
LDAP_BACK_CFG_TIMEOUT,
- LDAP_BACK_CFG_REWRITE
+ LDAP_BACK_CFG_REWRITE,
+
+ LDAP_BACK_CFG_LAST
};
static ConfigTable ldapcfg[] = {
{ "uri", "uri", 2, 2, 0,
- ARG_STRING|ARG_MAGIC|LDAP_BACK_CFG_URI,
+ ARG_MAGIC|LDAP_BACK_CFG_URI,
ldap_back_cf_gen, "( OLcfgDbAt:0.14 "
"NAME 'olcDbURI' "
"DESC 'URI (list) for remote DSA' "
switch( c->type ) {
case LDAP_BACK_CFG_URI:
if ( li->li_uri != NULL ) {
- c->value_string = ch_strdup( li->li_uri );
+ struct berval bv;
+
+ ber_str2bv( li->li_uri, 0, 0, &bv );
+ value_add_one( &c->rvalue_vals, &bv );
} else {
rc = 1;
}
/* PARANOID: DN and more are not required nor allowed */
- urlrc = ldap_url_parselist_ext( &lud, c->value_string, ", \t" );
+ urlrc = ldap_url_parselist_ext( &lud, c->argv[ 1 ], ", \t" );
if ( urlrc != LDAP_URL_SUCCESS ) {
char *why;
AttributeDescription *ad = NULL;
const char *text;
+ /* Make sure we don't exceed the bits reserved for userland */
+ config_check_userland( LDAP_BACK_CFG_LAST );
+
bi->bi_cf_ocs = ldapocs;
rc = config_register_schema( ldapcfg, ldapocs );