/* $OpenLDAP$ */
/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
struct berval *res );
static int dnlist_subordinate(
- BVarray dnlist,
+ BerVarray dnlist,
struct berval *dn );
Entry *deref_internal_r(
Entry *entry;
Entry *sup;
unsigned depth;
- BVarray dnlist;
+ BerVarray dnlist;
assert( ( alias != NULL && dn_in == NULL )
|| ( alias == NULL && dn_in != NULL ) );
}
dnlist = NULL;
- bvarray_add( &dnlist, &dn );
+ ber_bvarray_add( &dnlist, &dn );
for( depth=0 ; ; depth++ ) {
if( entry != NULL ) {
ch_free( aliasDN.bv_val );
if( newe != NULL ) {
- free( dn.bv_val );
cache_return_entry_r(&li->li_cache, entry );
entry = newe;
ber_dupbv( &dn, &entry->e_nname );
- bvarray_add( &dnlist, &dn );
+ ber_bvarray_add( &dnlist, &dn );
continue;
}
if( newe != NULL ) {
free(aliasDN.bv_val);
- free( dn.bv_val );
cache_return_entry_r(&li->li_cache, sup );
entry = newe;
ber_dupbv( &dn, &entry->e_nname );
- bvarray_add( &dnlist, &dn );
+ ber_bvarray_add( &dnlist, &dn );
continue;
}
if ( newSup != NULL ) {
- free( dn.bv_val );
cache_return_entry_r(&li->li_cache, sup );
sup = newSup;
ber_dupbv( &dn, &aliasDN );
}
}
- free( dn.bv_val );
- bvarray_free( dnlist );
+ ber_bvarray_free( dnlist );
return entry;
}
/*
* aliasedObjectName should be SINGLE-VALUED with a single value.
*/
- if ( a->a_vals[0] == NULL || a->a_vals[0]->bv_val == NULL ) {
+ if ( a->a_vals[0].bv_val == NULL ) {
/*
* there was an aliasedobjectname defined but no data.
*/
return -1;
}
- if( a->a_vals[1] != NULL ) {
+ if( a->a_vals[1].bv_val != NULL ) {
*err = LDAP_ALIAS_PROBLEM;
*errmsg = "alias has multivalued aliasedObjectName";
return -1;
}
- rc = dnNormalize2( NULL, a->a_vals[0], ndn );
+ rc = dnNormalize2( NULL, &a->a_vals[0], ndn );
if( rc != LDAP_SUCCESS ) {
*err = LDAP_ALIAS_PROBLEM;
*errmsg = "alias aliasedObjectName value is invalid";
}
static int dnlist_subordinate(
- BVarray dnlist,
+ BerVarray dnlist,
struct berval *dn )
{
assert( dnlist );