From: Pierangelo Masarati Date: Wed, 26 Jan 2005 09:29:22 +0000 (+0000) Subject: don't add the trailing '??base' to URIs X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~248 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=74896472de0de4d8c08e6c25b6eba9f67a1f3f24;p=openldap don't add the trailing '??base' to URIs --- diff --git a/servers/slapd/back-meta/config.c b/servers/slapd/back-meta/config.c index 9682b2d7af..28b057ed01 100644 --- a/servers/slapd/back-meta/config.c +++ b/servers/slapd/back-meta/config.c @@ -172,7 +172,8 @@ meta_back_db_config( ludp->lud_dn[ 0 ] = '\0'; - for ( tmpludp = ludp->lud_next; tmpludp; tmpludp = tmpludp->lud_next ) { + /* check all, to apply the scope check on the first one */ + for ( tmpludp = ludp; tmpludp; tmpludp = tmpludp->lud_next ) { if ( tmpludp->lud_dn != NULL && tmpludp->lud_dn[ 0 ] != '\0' ) { fprintf( stderr, "%s: line %d: " "multiple URIs must have " @@ -181,6 +182,10 @@ meta_back_db_config( return( 1 ); } + + if ( tmpludp->lud_scope == LDAP_SCOPE_BASE ) { + tmpludp->lud_scope = LDAP_SCOPE_DEFAULT; + } } li->targets[ i ]->mt_uri = ldap_url_list2urls( ludp );