be = select_backend( &e->e_nname, manageDSAit, 0 );
if ( be == NULL ) {
struct berval **ref = referral_rewrite( default_referral,
- NULL, e->e_dn, LDAP_SCOPE_DEFAULT );
+ NULL, &e->e_name, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
NULL, NULL, ref ? ref : default_referral, NULL );
struct berval **defref = be->be_update_refs
? be->be_update_refs : default_referral;
struct berval **ref = referral_rewrite( defref,
- NULL, e->e_dn, LDAP_SCOPE_DEFAULT );
+ NULL, &e->e_name, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL, NULL, NULL,
ref ? ref : defref, NULL );
if ( matched != NULL ) {
matched_dn = ch_strdup( matched->e_dn );
refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op,
- matched, e->e_dn, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
bdb_entry_return( be, matched );
matched = NULL;
} else {
refs = referral_rewrite( default_referral,
- NULL, e->e_dn, LDAP_SCOPE_DEFAULT );
+ NULL, &e->e_name, LDAP_SCOPE_DEFAULT );
}
Debug( LDAP_DEBUG_TRACE, "bdb_add: parent does not exist\n",
/* parent is a referral, don't allow add */
char *matched_dn = ch_strdup( p->e_dn );
struct berval **refs = is_entry_referral( p )
- ? get_entry_referrals( be, conn, op, p,
- e->e_dn, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, p )
: NULL;
Debug( LDAP_DEBUG_TRACE, "bdb_add: parent is referral\n",
matched_dn = ch_strdup( matched->e_dn );
refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- dn->bv_val, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
bdb_entry_return( be, matched );
} else {
refs = referral_rewrite( default_referral,
- NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, dn, LDAP_SCOPE_DEFAULT );
}
/* allow noauth binds */
if ( is_entry_referral( e ) ) {
/* entry is a referral, don't allow bind */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ conn, op, e );
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
0, 0 );
if ( matched != NULL ) {
matched_dn = ch_strdup( matched->e_dn );
refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- dn->bv_val, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
bdb_entry_return( be, matched );
matched = NULL;
} else {
refs = referral_rewrite( default_referral,
- NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, dn, LDAP_SCOPE_DEFAULT );
}
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
if (!manageDSAit && is_entry_referral( e ) ) {
/* entry is a referral, don't allow add */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ conn, op, e );
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
0, 0 );
if ( matched != NULL ) {
matched_dn = ch_strdup( matched->e_dn );
refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- dn->bv_val, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
bdb_entry_return( be, matched );
matched = NULL;
} else {
refs = referral_rewrite( default_referral,
- NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, dn, LDAP_SCOPE_DEFAULT );
}
send_ldap_result( conn, op, LDAP_REFERRAL,
/* parent is a referral, don't allow add */
/* parent is an alias, don't allow add */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ conn, op, e );
Debug( LDAP_DEBUG_TRACE,
"bdb_delete: entry is referral\n",
if ( matched != NULL ) {
matched_dn = ch_strdup( matched->e_dn );
refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- dn->bv_val, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
bdb_entry_return( be, matched );
matched = NULL;
} else {
refs = referral_rewrite( default_referral,
- NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, dn, LDAP_SCOPE_DEFAULT );
}
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
/* parent is a referral, don't allow add */
/* parent is an alias, don't allow add */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ conn, op, e );
Debug( LDAP_DEBUG_TRACE,
"bdb_modify: entry is referral\n",
if( matched != NULL ) {
matched_dn = strdup( matched->e_dn );
refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- dn->bv_val, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
bdb_entry_return( be, matched );
matched = NULL;
} else {
refs = referral_rewrite( default_referral,
- NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, dn, LDAP_SCOPE_DEFAULT );
}
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
/* parent is a referral, don't allow add */
/* parent is an alias, don't allow add */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ conn, op, e );
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry %s is referral\n",
e->e_dn, 0, 0 );
if( is_entry_referral( matched ) ) {
rc = LDAP_OTHER;
- refs = get_entry_referrals( be, conn, op,
- matched, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ refs = get_entry_referrals( be, conn, op, matched );
}
bdb_entry_return( be, matched );
} else if ( default_referral != NULL ) {
rc = LDAP_OTHER;
refs = referral_rewrite( default_referral,
- NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, dn, LDAP_SCOPE_DEFAULT );
}
if( refs != NULL ) {
if ( is_entry_referral( e ) ) {
/* entry is a referral */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ conn, op, e );
struct berval **rrefs = referral_rewrite(
- refs, e->e_dn, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ refs, &e->e_name, dn, LDAP_SCOPE_DEFAULT );
Debug( LDAP_DEBUG_TRACE,
"bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
}
if ( e == NULL ) {
- char *matched_dn = NULL;
+ struct berval *matched_dn = NULL;
struct berval **refs = NULL;
if ( matched != NULL ) {
struct berval **erefs;
- matched_dn = ch_strdup( matched->e_dn );
+ matched_dn = ber_bvdup( &matched->e_name );
erefs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- base->bv_val, scope )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
bdb_entry_return( be, matched );
if( erefs ) {
refs = referral_rewrite( erefs, matched_dn,
- base->bv_val, scope );
+ base, scope );
ber_bvecfree( erefs );
}
} else {
refs = referral_rewrite( default_referral,
- NULL, base->bv_val, scope );
+ NULL, base, scope );
}
send_ldap_result( conn, op, rc=LDAP_REFERRAL ,
- matched_dn, text, refs, NULL );
+ matched_dn->bv_val, text, refs, NULL );
ber_bvecfree( refs );
- free( matched_dn );
-
+ ber_bvfree( matched_dn );
return rc;
}
if (!manageDSAit && e != &slap_entry_root && is_entry_referral( e ) ) {
/* entry is a referral, don't allow add */
- char *matched_dn = ch_strdup( e->e_dn );
+ struct berval *matched_dn = ber_bvdup( &e->e_name );
struct berval **erefs = get_entry_referrals( be,
- conn, op, e, base->bv_val, scope );
+ conn, op, e );
struct berval **refs = NULL;
bdb_entry_return( be, e );
if( erefs ) {
refs = referral_rewrite( erefs, matched_dn,
- base->bv_val, scope );
+ base, scope );
ber_bvecfree( erefs );
}
0, 0, 0 );
send_ldap_result( conn, op, LDAP_REFERRAL,
- matched_dn, refs ? NULL : "bad referral object",
+ matched_dn->bv_val,
+ refs ? NULL : "bad referral object",
refs, NULL );
ber_bvecfree( refs );
- free( matched_dn );
-
+ ber_bvfree( matched_dn );
return 1;
}
is_entry_referral( e ) )
{
struct berval **erefs = get_entry_referrals(
- be, conn, op, e, NULL, scope );
- struct berval **refs = referral_rewrite( erefs, e->e_dn, NULL,
+ be, conn, op, e );
+ struct berval **refs = referral_rewrite( erefs,
+ &e->e_name, NULL,
scope == LDAP_SCOPE_SUBTREE
? LDAP_SCOPE_SUBTREE
: LDAP_SCOPE_BASE );
if ( matched != NULL ) {
matched_dn = ch_strdup( matched->e_dn );
refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- e->e_dn, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
cache_return_entry_r( &li->li_cache, matched );
} else {
refs = referral_rewrite( default_referral,
- NULL, e->e_dn, LDAP_SCOPE_DEFAULT );
+ NULL, &e->e_name, LDAP_SCOPE_DEFAULT );
}
#ifdef NEW_LOGGING
/* parent is a referral, don't allow add */
char *matched_dn = ch_strdup( p->e_dn );
struct berval **refs = is_entry_referral( p )
- ? get_entry_referrals( be, conn, op, p,
- e->e_dn, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, p )
: NULL;
/* free parent and writer lock */
matched_dn = ch_strdup( matched->e_dn );
refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- dn->bv_val, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
cache_return_entry_r( &li->li_cache, matched );
} else {
refs = referral_rewrite( default_referral,
- NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, dn, LDAP_SCOPE_DEFAULT );
}
/* allow noauth binds */
if ( is_entry_referral( e ) ) {
/* entry is a referral, don't allow bind */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ conn, op, e );
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
if ( matched != NULL ) {
matched_dn = ch_strdup( matched->e_dn );
refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- dn->bv_val, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
cache_return_entry_r( &li->li_cache, matched );
} else {
refs = referral_rewrite( default_referral,
- NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, dn, LDAP_SCOPE_DEFAULT );
}
send_ldap_result( conn, op, LDAP_REFERRAL,
if (!manageDSAit && is_entry_referral( e ) ) {
/* entry is a referral, don't allow add */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ conn, op, e );
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
if ( matched != NULL ) {
matched_dn = ch_strdup( matched->e_dn );
refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- dn->bv_val, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
cache_return_entry_r( &li->li_cache, matched );
} else {
refs = referral_rewrite( default_referral,
- NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, dn, LDAP_SCOPE_DEFAULT );
}
send_ldap_result( conn, op, LDAP_REFERRAL,
/* parent is a referral, don't allow add */
/* parent is an alias, don't allow add */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ conn, op, e );
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
0, 0 );
#endif
-
send_ldap_result( conn, op, LDAP_REFERRAL,
e->e_dn, NULL, refs, NULL );
if ( matched != NULL ) {
matched_dn = ch_strdup( matched->e_dn );
refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- dn->bv_val, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
cache_return_entry_r( &li->li_cache, matched );
} else {
refs = referral_rewrite( default_referral,
- NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, dn, LDAP_SCOPE_DEFAULT );
}
send_ldap_result( conn, op, LDAP_REFERRAL,
/* parent is a referral, don't allow add */
/* parent is an alias, don't allow add */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ conn, op, e );
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
if( matched != NULL ) {
matched_dn = strdup( matched->e_dn );
refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- dn->bv_val, LDAP_SCOPE_DEFAULT )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
cache_return_entry_r( &li->li_cache, matched );
} else {
refs = referral_rewrite( default_referral,
- NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, dn, LDAP_SCOPE_DEFAULT );
}
send_ldap_result( conn, op, LDAP_REFERRAL,
/* parent is a referral, don't allow add */
/* parent is an alias, don't allow add */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ conn, op, e );
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
if( is_entry_referral( matched ) ) {
rc = LDAP_OTHER;
- refs = get_entry_referrals( be, conn, op, matched,
- dn->bv_val, LDAP_SCOPE_DEFAULT );
+ refs = get_entry_referrals( be, conn, op, matched );
}
cache_return_entry_r( &li->li_cache, matched );
} else if ( default_referral != NULL ) {
rc = LDAP_OTHER;
refs = referral_rewrite( default_referral,
- NULL, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, dn, LDAP_SCOPE_DEFAULT );
}
if( refs != NULL ) {
if ( is_entry_referral( e ) ) {
/* entry is a referral */
struct berval **refs = get_entry_referrals( be,
- conn, op, e, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ conn, op, e );
struct berval **rrefs = referral_rewrite(
- refs, e->e_dn, dn->bv_val, LDAP_SCOPE_DEFAULT );
+ refs, &e->e_name, dn, LDAP_SCOPE_DEFAULT );
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
}
if ( e == NULL ) {
- char *matched_dn = NULL;
+ struct berval *matched_dn = NULL;
struct berval **refs = NULL;
if ( matched != NULL ) {
struct berval **erefs;
- matched_dn = ch_strdup( matched->e_dn );
+ matched_dn = ber_bvdup( &matched->e_name );
erefs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched,
- base->bv_val, scope )
+ ? get_entry_referrals( be, conn, op, matched )
: NULL;
cache_return_entry_r( &li->li_cache, matched );
if( erefs ) {
refs = referral_rewrite( erefs, matched_dn,
- base->bv_val, scope );
+ base, scope );
ber_bvecfree( erefs );
}
} else {
refs = referral_rewrite( default_referral,
- NULL, base->bv_val, scope );
+ NULL, base, scope );
}
send_ldap_result( conn, op, err,
- matched_dn, text, refs, NULL );
+ matched_dn->bv_val, text, refs, NULL );
ber_bvecfree( refs );
- free( matched_dn );
+ ber_bvfree( matched_dn );
return 1;
}
if (!manageDSAit && is_entry_referral( e ) ) {
/* entry is a referral, don't allow add */
- char *matched_dn = ch_strdup( e->e_dn );
+ struct berval *matched_dn = ber_bvdup( &e->e_name );
struct berval **erefs = get_entry_referrals( be,
- conn, op, e, base->bv_val, scope );
+ conn, op, e );
struct berval **refs = NULL;
cache_return_entry_r( &li->li_cache, e );
if( erefs ) {
refs = referral_rewrite( erefs, matched_dn,
- base->bv_val, scope );
+ base, scope );
ber_bvecfree( erefs );
}
if( refs ) {
send_ldap_result( conn, op, LDAP_REFERRAL,
- matched_dn, NULL, refs, NULL );
+ matched_dn->bv_val, NULL, refs, NULL );
ber_bvecfree( refs );
} else {
- send_ldap_result( conn, op, LDAP_OTHER, matched_dn,
- "bad referral object", NULL, NULL );
+ send_ldap_result( conn, op, LDAP_OTHER,
+ matched_dn->bv_val,
+ "bad referral object", NULL, NULL );
}
- free( matched_dn );
+ ber_bvfree( matched_dn );
return 1;
}
if( scopeok ) {
struct berval **erefs = get_entry_referrals(
- be, conn, op, e, NULL, cscope );
- struct berval **refs = referral_rewrite( erefs, e->e_dn, NULL,
+ be, conn, op, e );
+ struct berval **refs = referral_rewrite( erefs,
+ &e->e_name, NULL,
scope == LDAP_SCOPE_SUBTREE
? LDAP_SCOPE_SUBTREE
: LDAP_SCOPE_BASE );
if ( (be = select_backend( ndn, 0, 0 )) == NULL ) {
if ( default_referral ) {
struct berval **ref = referral_rewrite( default_referral,
- NULL, pdn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
NULL, NULL, ref ? ref : default_referral, NULL );
*/
if ( (be = select_backend( ndn, manageDSAit, 0 )) == NULL ) {
struct berval **ref = referral_rewrite( default_referral,
- NULL, pdn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
NULL, NULL, ref ? ref : default_referral, NULL );
*/
if ( (be = select_backend( ndn, manageDSAit, 0 )) == NULL ) {
struct berval **ref = referral_rewrite( default_referral,
- NULL, pdn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
NULL, NULL, ref ? ref : default_referral, NULL );
struct berval **defref = be->be_update_refs
? be->be_update_refs : default_referral;
struct berval **ref = referral_rewrite( default_referral,
- NULL, pdn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL, NULL, NULL,
ref ? ref : defref, NULL );
*/
if ( (be = select_backend( ndn, manageDSAit, 0 )) == NULL ) {
struct berval **ref = referral_rewrite( default_referral,
- NULL, pdn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
NULL, NULL, ref ? ref : default_referral, NULL );
struct berval **defref = be->be_update_refs
? be->be_update_refs : default_referral;
struct berval **ref = referral_rewrite( defref,
- NULL, pdn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL, NULL, NULL,
ref ? ref : defref, NULL );
*/
if ( (be = select_backend( ndn, manageDSAit, 0 )) == NULL ) {
struct berval **ref = referral_rewrite( default_referral,
- NULL, dn.bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
NULL, NULL, ref ? ref : default_referral, NULL );
struct berval **defref = be->be_update_refs
? be->be_update_refs : default_referral;
struct berval **ref = referral_rewrite( defref,
- NULL, pdn->bv_val, LDAP_SCOPE_DEFAULT );
+ NULL, pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL, NULL, NULL,
ref ? ref : defref, NULL );
const char *url ));
LDAP_SLAPD_F (struct berval **) get_entry_referrals LDAP_P((
- Backend *be, Connection *conn, Operation *op,
- Entry *e, const char *target, int scope ));
+ Backend *be, Connection *conn, Operation *op, Entry *e ));
LDAP_SLAPD_F (struct berval **) referral_rewrite LDAP_P((
struct berval **refs,
- const char *base,
- const char *target,
+ struct berval *base,
+ struct berval *target,
int scope ));
/*
struct berval ** referral_rewrite(
struct berval **in,
- const char *base,
- const char *target,
+ struct berval *base,
+ struct berval *target,
int scope )
{
int i, j;
{
char *dn = url->lud_dn;
url->lud_dn = referral_dn_muck(
- ( dn && *dn ) ? dn : NULL, base, target );
+ ( dn && *dn ) ? dn : NULL,
+ base ? base->bv_val : NULL,
+ target ? target->bv_val : NULL );
ldap_memfree( dn );
}
Backend *be,
Connection *conn,
Operation *op,
- Entry *e,
- const char *dn,
- int scope )
+ Entry *e )
{
Attribute *attr;
struct berval **refs;
*/
if ( (be = select_backend( nbase, manageDSAit, 1 )) == NULL ) {
struct berval **ref = referral_rewrite( default_referral,
- NULL, pbase->bv_val, scope );
+ NULL, pbase, scope );
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
NULL, NULL, ref ? ref : default_referral, NULL );