mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 18:19:52 -05:00
Renamed BVarray to BerVarray. Moved slapd:bvarray_{add,free} to
liblber:ber_bvarray_{add,free}.
This commit is contained in:
parent
e43fe62485
commit
ac1332cdb8
71 changed files with 416 additions and 404 deletions
|
|
@ -201,7 +201,7 @@ typedef struct berval {
|
|||
char *bv_val;
|
||||
} BerValue;
|
||||
|
||||
typedef BerValue *BVarray; /* To distinguish from a single bv */
|
||||
typedef BerValue *BerVarray; /* To distinguish from a single bv */
|
||||
|
||||
/* this should be moved to lber-int.h */
|
||||
|
||||
|
|
@ -574,6 +574,12 @@ LBER_F( char * )
|
|||
ber_strdup LDAP_P((
|
||||
LDAP_CONST char * ));
|
||||
|
||||
LBER_F( void )
|
||||
ber_bvarray_free LDAP_P(( BerVarray p ));
|
||||
|
||||
LBER_F( int )
|
||||
ber_bvarray_add LDAP_P(( BerVarray *p, BerValue *bv ));
|
||||
|
||||
/*
|
||||
* error.c
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ typedef struct bgbvr {
|
|||
ber_len_t off;
|
||||
union {
|
||||
char ***c;
|
||||
BVarray *ba;
|
||||
BerVarray *ba;
|
||||
struct berval ***bv;
|
||||
} res;
|
||||
} bgbvr;
|
||||
|
|
@ -395,7 +395,7 @@ ber_get_stringbvr( bgbvr *b, int n )
|
|||
*bvp = bv;
|
||||
break;
|
||||
case BvOff:
|
||||
*(BVarray)((long)(*b->res.ba)+n*b->siz+b->off) = bv;
|
||||
*(BerVarray)((long)(*b->res.ba)+n*b->siz+b->off) = bv;
|
||||
}
|
||||
} else {
|
||||
/* Failure will propagate up and free in reverse
|
||||
|
|
@ -884,7 +884,7 @@ ber_scanf ( BerElement *ber,
|
|||
|
||||
case 'v': /* sequence of strings */
|
||||
case 'V': /* sequence of strings + lengths */
|
||||
case 'W': /* BVarray */
|
||||
case 'W': /* BerVarray */
|
||||
case 'm': /* berval in-place */
|
||||
case 'M': /* BVoff array in-place */
|
||||
case 'n': /* null */
|
||||
|
|
|
|||
|
|
@ -781,8 +781,8 @@ ber_printf( BerElement *ber, LDAP_CONST char *fmt, ... )
|
|||
}
|
||||
break;
|
||||
|
||||
case 'W': /* BVarray */
|
||||
if ( (bv = va_arg( ap, BVarray )) == NULL )
|
||||
case 'W': /* BerVarray */
|
||||
if ( (bv = va_arg( ap, BerVarray )) == NULL )
|
||||
break;
|
||||
for ( i = 0; bv[i].bv_val != NULL; i++ ) {
|
||||
if ( (rc = ber_put_berval( ber, &bv[i],
|
||||
|
|
|
|||
|
|
@ -603,3 +603,57 @@ ber_strndup__( LDAP_CONST char *s, size_t l )
|
|||
p[ len ] = '\0';
|
||||
return p;
|
||||
}
|
||||
|
||||
void
|
||||
ber_bvarray_free( BerVarray a )
|
||||
{
|
||||
int i;
|
||||
|
||||
ber_int_options.lbo_valid = LBER_INITIALIZED;
|
||||
|
||||
if (a) {
|
||||
BER_MEM_VALID( a );
|
||||
|
||||
for (i=0; a[i].bv_val; i++) {
|
||||
LBER_FREE(a[i].bv_val);
|
||||
}
|
||||
|
||||
LBER_FREE(a);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ber_bvarray_add( BerVarray *a, BerValue *bv )
|
||||
{
|
||||
int n;
|
||||
|
||||
ber_int_options.lbo_valid = LBER_INITIALIZED;
|
||||
|
||||
if ( *a == NULL ) {
|
||||
if (bv == NULL) {
|
||||
return 0;
|
||||
}
|
||||
n = 0;
|
||||
*a = (BerValue *) LBER_MALLOC( 2 * sizeof(BerValue) );
|
||||
} else {
|
||||
BER_MEM_VALID( a );
|
||||
|
||||
for ( n = 0; *a != NULL && (*a)[n].bv_val != NULL; n++ ) {
|
||||
; /* NULL */
|
||||
}
|
||||
|
||||
if (bv == NULL) {
|
||||
return n;
|
||||
}
|
||||
*a = (BerValue *) LBER_REALLOC( (char *) *a,
|
||||
(n + 2) * sizeof(BerValue) );
|
||||
}
|
||||
if ( *a == NULL ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
(*a)[n++] = *bv;
|
||||
(*a)[n].bv_val = NULL;
|
||||
|
||||
return n;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ typedef struct AciSetCookie {
|
|||
Operation *op;
|
||||
} AciSetCookie;
|
||||
|
||||
BVarray aci_set_gather (void *cookie, char *name, struct berval *attr);
|
||||
BerVarray aci_set_gather (void *cookie, char *name, struct berval *attr);
|
||||
static int aci_match_set ( struct berval *subj, Backend *be,
|
||||
Entry *e, Connection *conn, Operation *op, int setref );
|
||||
|
||||
|
|
@ -1199,11 +1199,11 @@ aci_get_part(
|
|||
return(bv->bv_len);
|
||||
}
|
||||
|
||||
BVarray
|
||||
BerVarray
|
||||
aci_set_gather (void *cookie, char *name, struct berval *attr)
|
||||
{
|
||||
AciSetCookie *cp = cookie;
|
||||
BVarray bvals = NULL;
|
||||
BerVarray bvals = NULL;
|
||||
struct berval bv, ndn;
|
||||
|
||||
/* this routine needs to return the bervals instead of
|
||||
|
|
@ -1244,7 +1244,7 @@ aci_match_set (
|
|||
} else {
|
||||
struct berval subjdn, ndn = { 0, NULL };
|
||||
struct berval setat;
|
||||
BVarray bvals;
|
||||
BerVarray bvals;
|
||||
const char *text;
|
||||
AttributeDescription *desc = NULL;
|
||||
|
||||
|
|
@ -1281,7 +1281,7 @@ aci_match_set (
|
|||
bvals[0].bv_val = bvals[i-1].bv_val;
|
||||
bvals[i-1].bv_val = NULL;
|
||||
}
|
||||
bvarray_free(bvals);
|
||||
ber_bvarray_free(bvals);
|
||||
}
|
||||
}
|
||||
if (ndn.bv_val)
|
||||
|
|
|
|||
|
|
@ -212,13 +212,13 @@ do_add( Connection *conn, Operation *op )
|
|||
*/
|
||||
be = select_backend( &e->e_nname, manageDSAit, 0 );
|
||||
if ( be == NULL ) {
|
||||
BVarray ref = referral_rewrite( default_referral,
|
||||
BerVarray ref = referral_rewrite( default_referral,
|
||||
NULL, &e->e_name, LDAP_SCOPE_DEFAULT );
|
||||
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
NULL, NULL, ref ? ref : default_referral, NULL );
|
||||
|
||||
if ( ref ) bvarray_free( ref );
|
||||
if ( ref ) ber_bvarray_free( ref );
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
@ -299,15 +299,15 @@ do_add( Connection *conn, Operation *op )
|
|||
|
||||
#ifndef SLAPD_MULTIMASTER
|
||||
} else {
|
||||
BVarray defref = be->be_update_refs
|
||||
BerVarray defref = be->be_update_refs
|
||||
? be->be_update_refs : default_referral;
|
||||
BVarray ref = referral_rewrite( defref,
|
||||
BerVarray ref = referral_rewrite( defref,
|
||||
NULL, &e->e_name, LDAP_SCOPE_DEFAULT );
|
||||
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL, NULL, NULL,
|
||||
ref ? ref : defref, NULL );
|
||||
|
||||
if ( ref ) bvarray_free( ref );
|
||||
if ( ref ) ber_bvarray_free( ref );
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ static void at_index_print( void ) {};
|
|||
void
|
||||
attr_free( Attribute *a )
|
||||
{
|
||||
bvarray_free( a->a_vals );
|
||||
ber_bvarray_free( a->a_vals );
|
||||
free( a );
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ int
|
|||
attr_merge(
|
||||
Entry *e,
|
||||
AttributeDescription *desc,
|
||||
BVarray vals )
|
||||
BerVarray vals )
|
||||
{
|
||||
Attribute **a;
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ retry: rc = txn_abort( ltid );
|
|||
|
||||
if ( p == NULL ) {
|
||||
char *matched_dn = NULL;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
|
||||
if ( matched != NULL ) {
|
||||
matched_dn = ch_strdup( matched->e_dn );
|
||||
|
|
@ -145,7 +145,7 @@ retry: rc = txn_abort( ltid );
|
|||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
ch_free( matched_dn );
|
||||
|
||||
goto done;
|
||||
|
|
@ -182,7 +182,7 @@ retry: rc = txn_abort( ltid );
|
|||
if ( is_entry_referral( p ) ) {
|
||||
/* parent is a referral, don't allow add */
|
||||
char *matched_dn = ch_strdup( p->e_dn );
|
||||
BVarray refs = is_entry_referral( p )
|
||||
BerVarray refs = is_entry_referral( p )
|
||||
? get_entry_referrals( be, conn, op, p )
|
||||
: NULL;
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ retry: rc = txn_abort( ltid );
|
|||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
free( matched_dn );
|
||||
goto done;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@ bdb_attribute(
|
|||
Entry *target,
|
||||
struct berval *entry_ndn,
|
||||
AttributeDescription *entry_at,
|
||||
BVarray *vals )
|
||||
BerVarray *vals )
|
||||
{
|
||||
struct bdbinfo *li = (struct bdbinfo *) be->be_private;
|
||||
Entry *e;
|
||||
int i, j, rc;
|
||||
Attribute *attr;
|
||||
BVarray v;
|
||||
BerVarray v;
|
||||
const char *entry_at_name = entry_at->ad_cname.bv_val;
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
|
|
@ -163,7 +163,7 @@ bdb_attribute(
|
|||
/* count them */
|
||||
}
|
||||
|
||||
v = (BVarray) ch_malloc( sizeof(struct berval) * (i+1) );
|
||||
v = (BerVarray) ch_malloc( sizeof(struct berval) * (i+1) );
|
||||
|
||||
for ( i=0, j=0; attr->a_vals[i].bv_val != NULL; i++ ) {
|
||||
if( conn != NULL
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ bdb_bind(
|
|||
/* get entry with reader lock */
|
||||
if ( e == NULL ) {
|
||||
char *matched_dn = NULL;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
|
||||
if( matched != NULL ) {
|
||||
matched_dn = ch_strdup( matched->e_dn );
|
||||
|
|
@ -100,7 +100,7 @@ bdb_bind(
|
|||
NULL, NULL, NULL, NULL );
|
||||
}
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
free( matched_dn );
|
||||
|
||||
return rc;
|
||||
|
|
@ -123,7 +123,7 @@ bdb_bind(
|
|||
|
||||
if ( is_entry_referral( e ) ) {
|
||||
/* entry is a referral, don't allow bind */
|
||||
BVarray refs = get_entry_referrals( be,
|
||||
BerVarray refs = get_entry_referrals( be,
|
||||
conn, op, e );
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
|
||||
|
|
@ -138,7 +138,7 @@ bdb_bind(
|
|||
NULL, NULL, NULL, NULL );
|
||||
}
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
|
||||
goto done;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ bdb_compare(
|
|||
|
||||
if ( e == NULL ) {
|
||||
char *matched_dn = NULL;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
|
||||
if ( matched != NULL ) {
|
||||
matched_dn = ch_strdup( matched->e_dn );
|
||||
|
|
@ -64,7 +64,7 @@ bdb_compare(
|
|||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
free( matched_dn );
|
||||
|
||||
goto done;
|
||||
|
|
@ -72,7 +72,7 @@ bdb_compare(
|
|||
|
||||
if (!manageDSAit && is_entry_referral( e ) ) {
|
||||
/* entry is a referral, don't allow add */
|
||||
BVarray refs = get_entry_referrals( be,
|
||||
BerVarray refs = get_entry_referrals( be,
|
||||
conn, op, e );
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
|
||||
|
|
@ -81,7 +81,7 @@ bdb_compare(
|
|||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
e->e_dn, NULL, refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ retry: /* transaction retry */
|
|||
|
||||
if ( e == NULL ) {
|
||||
char *matched_dn = NULL;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
|
||||
Debug( LDAP_DEBUG_ARGS,
|
||||
"<=- bdb_delete: no such object %s\n",
|
||||
|
|
@ -110,7 +110,7 @@ retry: /* transaction retry */
|
|||
send_ldap_result( conn, op, LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
free( matched_dn );
|
||||
|
||||
rc = -1;
|
||||
|
|
@ -196,7 +196,7 @@ retry: /* transaction retry */
|
|||
if ( !manageDSAit && is_entry_referral( e ) ) {
|
||||
/* parent is a referral, don't allow add */
|
||||
/* parent is an alias, don't allow add */
|
||||
BVarray refs = get_entry_referrals( be,
|
||||
BerVarray refs = get_entry_referrals( be,
|
||||
conn, op, e );
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
|
|
@ -206,7 +206,7 @@ retry: /* transaction retry */
|
|||
send_ldap_result( conn, op, LDAP_REFERRAL,
|
||||
e->e_dn, NULL, refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
|
||||
rc = 1;
|
||||
goto done;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ bdb_extended(
|
|||
struct berval **rspdata,
|
||||
LDAPControl *** rspctrls,
|
||||
const char** text,
|
||||
BVarray *refs
|
||||
BerVarray *refs
|
||||
)
|
||||
{
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ equality_candidates(
|
|||
break;
|
||||
}
|
||||
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"<= bdb_equality_candidates id=%ld, first=%ld, last=%ld\n",
|
||||
|
|
@ -450,7 +450,7 @@ approx_candidates(
|
|||
break;
|
||||
}
|
||||
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "<= bdb_approx_candidates %ld, first=%ld, last=%ld\n",
|
||||
(long) ids[0],
|
||||
|
|
@ -553,7 +553,7 @@ substring_candidates(
|
|||
break;
|
||||
}
|
||||
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "<= bdb_substring_candidates %ld, first=%ld, last=%ld\n",
|
||||
(long) ids[0],
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ static int indexer(
|
|||
DB_TXN *txn,
|
||||
char *dbname,
|
||||
struct berval *atname,
|
||||
BVarray vals,
|
||||
BerVarray vals,
|
||||
ID id,
|
||||
int op,
|
||||
slap_mask_t mask )
|
||||
|
|
@ -209,11 +209,11 @@ static int indexer(
|
|||
for( i=0; keys[i].bv_val != NULL; i++ ) {
|
||||
rc = bdb_key_change( be, db, txn, &keys[i], id, op );
|
||||
if( rc ) {
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
}
|
||||
rc = LDAP_SUCCESS;
|
||||
}
|
||||
|
|
@ -230,11 +230,11 @@ static int indexer(
|
|||
for( i=0; keys[i].bv_val != NULL; i++ ) {
|
||||
rc = bdb_key_change( be, db, txn, &keys[i], id, op );
|
||||
if( rc ) {
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
}
|
||||
|
||||
rc = LDAP_SUCCESS;
|
||||
|
|
@ -252,11 +252,11 @@ static int indexer(
|
|||
for( i=0; keys[i].bv_val != NULL; i++ ) {
|
||||
bdb_key_change( be, db, txn, &keys[i], id, op );
|
||||
if( rc ) {
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
}
|
||||
|
||||
rc = LDAP_SUCCESS;
|
||||
|
|
@ -271,7 +271,7 @@ static int index_at_values(
|
|||
DB_TXN *txn,
|
||||
AttributeType *type,
|
||||
struct berval *lang,
|
||||
BVarray vals,
|
||||
BerVarray vals,
|
||||
ID id,
|
||||
int op,
|
||||
char ** dbnamep,
|
||||
|
|
@ -352,7 +352,7 @@ int bdb_index_values(
|
|||
Backend *be,
|
||||
DB_TXN *txn,
|
||||
AttributeDescription *desc,
|
||||
BVarray vals,
|
||||
BerVarray vals,
|
||||
ID id,
|
||||
int op )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ retry: /* transaction retry */
|
|||
/* acquire and lock entry */
|
||||
if ( e == NULL ) {
|
||||
char* matched_dn = NULL;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
|
||||
if ( matched != NULL ) {
|
||||
matched_dn = ch_strdup( matched->e_dn );
|
||||
|
|
@ -275,7 +275,7 @@ retry: /* transaction retry */
|
|||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
free( matched_dn );
|
||||
|
||||
return rc;
|
||||
|
|
@ -284,7 +284,7 @@ retry: /* transaction retry */
|
|||
if ( !manageDSAit && is_entry_referral( e ) ) {
|
||||
/* parent is a referral, don't allow add */
|
||||
/* parent is an alias, don't allow add */
|
||||
BVarray refs = get_entry_referrals( be,
|
||||
BerVarray refs = get_entry_referrals( be,
|
||||
conn, op, e );
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
|
|
@ -294,7 +294,7 @@ retry: /* transaction retry */
|
|||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
e->e_dn, NULL, refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ retry: /* transaction retry */
|
|||
|
||||
if ( e == NULL ) {
|
||||
char* matched_dn = NULL;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
|
||||
if( matched != NULL ) {
|
||||
matched_dn = strdup( matched->e_dn );
|
||||
|
|
@ -137,7 +137,7 @@ retry: /* transaction retry */
|
|||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
free( matched_dn );
|
||||
|
||||
goto done;
|
||||
|
|
@ -146,7 +146,7 @@ retry: /* transaction retry */
|
|||
if (!manageDSAit && is_entry_referral( e ) ) {
|
||||
/* parent is a referral, don't allow add */
|
||||
/* parent is an alias, don't allow add */
|
||||
BVarray refs = get_entry_referrals( be,
|
||||
BerVarray refs = get_entry_referrals( be,
|
||||
conn, op, e );
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry %s is referral\n",
|
||||
|
|
@ -155,7 +155,7 @@ retry: /* transaction retry */
|
|||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
e->e_dn, NULL, refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
@ -486,7 +486,7 @@ retry: /* transaction retry */
|
|||
mod_tmp = ( Modifications * )ch_malloc( sizeof( Modifications )
|
||||
+ 2 * sizeof( struct berval ) );
|
||||
mod_tmp->sml_desc = desc;
|
||||
mod_tmp->sml_bvalues = ( BVarray )( mod_tmp + 1 );
|
||||
mod_tmp->sml_bvalues = ( BerVarray )( mod_tmp + 1 );
|
||||
mod_tmp->sml_bvalues[ 0 ] = new_rdn[0][ a_cnt ]->la_value;
|
||||
mod_tmp->sml_bvalues[ 1 ].bv_val = NULL;
|
||||
mod_tmp->sml_op = SLAP_MOD_SOFTADD;
|
||||
|
|
@ -536,7 +536,7 @@ retry: /* transaction retry */
|
|||
mod_tmp = ( Modifications * )ch_malloc( sizeof( Modifications )
|
||||
+ 2 * sizeof ( struct berval ) );
|
||||
mod_tmp->sml_desc = desc;
|
||||
mod_tmp->sml_bvalues = ( BVarray )(mod_tmp+1);
|
||||
mod_tmp->sml_bvalues = ( BerVarray )(mod_tmp+1);
|
||||
mod_tmp->sml_bvalues[ 0 ] = old_rdn[0][ d_cnt ]->la_value;
|
||||
mod_tmp->sml_bvalues[ 1 ].bv_val = NULL;
|
||||
mod_tmp->sml_op = LDAP_MOD_DELETE;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ bdb_exop_passwd(
|
|||
struct berval **rspdata,
|
||||
LDAPControl *** rspctrls,
|
||||
const char **text,
|
||||
BVarray *refs )
|
||||
BerVarray *refs )
|
||||
{
|
||||
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
||||
int rc;
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ bdb_index_values LDAP_P((
|
|||
Backend *be,
|
||||
DB_TXN *txn,
|
||||
AttributeDescription *desc,
|
||||
BVarray vals,
|
||||
BerVarray vals,
|
||||
ID id,
|
||||
int op ));
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ bdb_referrals(
|
|||
|
||||
if ( e == NULL ) {
|
||||
char *matched_dn = NULL;
|
||||
BVarray refs = NULL;
|
||||
BerVarray refs = NULL;
|
||||
|
||||
if ( matched != NULL ) {
|
||||
matched_dn = ch_strdup( matched->e_dn );
|
||||
|
|
@ -80,7 +80,7 @@ bdb_referrals(
|
|||
/* send referrals */
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
} else if ( rc != LDAP_SUCCESS ) {
|
||||
send_ldap_result( conn, op, rc, matched_dn,
|
||||
matched_dn ? "bad referral object" : NULL,
|
||||
|
|
@ -93,8 +93,8 @@ bdb_referrals(
|
|||
|
||||
if ( is_entry_referral( e ) ) {
|
||||
/* entry is a referral */
|
||||
BVarray refs = get_entry_referrals( be, conn, op, e );
|
||||
BVarray rrefs = referral_rewrite(
|
||||
BerVarray refs = get_entry_referrals( be, conn, op, e );
|
||||
BerVarray rrefs = referral_rewrite(
|
||||
refs, &e->e_name, dn, LDAP_SCOPE_DEFAULT );
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
|
|
@ -104,13 +104,13 @@ bdb_referrals(
|
|||
if( rrefs != NULL ) {
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
e->e_dn, NULL, rrefs, NULL );
|
||||
bvarray_free( rrefs );
|
||||
ber_bvarray_free( rrefs );
|
||||
} else {
|
||||
send_ldap_result( conn, op, rc = LDAP_OTHER, e->e_dn,
|
||||
"bad referral object", NULL, NULL );
|
||||
}
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
}
|
||||
|
||||
bdb_entry_return( be, e );
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ bdb_search(
|
|||
ID id, cursor;
|
||||
ID candidates[BDB_IDL_UM_SIZE];
|
||||
Entry *e = NULL;
|
||||
BVarray v2refs = NULL;
|
||||
BerVarray v2refs = NULL;
|
||||
Entry *matched = NULL;
|
||||
struct berval realbase = { 0, NULL };
|
||||
int nentries = 0;
|
||||
|
|
@ -93,10 +93,10 @@ bdb_search(
|
|||
|
||||
if ( e == NULL ) {
|
||||
struct berval matched_dn = { 0, NULL };
|
||||
BVarray refs = NULL;
|
||||
BerVarray refs = NULL;
|
||||
|
||||
if ( matched != NULL ) {
|
||||
BVarray erefs;
|
||||
BerVarray erefs;
|
||||
|
||||
ber_dupbv( &matched_dn, &matched->e_name );
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ bdb_search(
|
|||
if( erefs ) {
|
||||
refs = referral_rewrite( erefs, &matched_dn,
|
||||
base, scope );
|
||||
bvarray_free( erefs );
|
||||
ber_bvarray_free( erefs );
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -121,7 +121,7 @@ bdb_search(
|
|||
send_ldap_result( conn, op, rc=LDAP_REFERRAL ,
|
||||
matched_dn.bv_val, text, refs, NULL );
|
||||
|
||||
if ( refs ) bvarray_free( refs );
|
||||
if ( refs ) ber_bvarray_free( refs );
|
||||
if ( matched_dn.bv_val ) ber_memfree( matched_dn.bv_val );
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -129,7 +129,7 @@ bdb_search(
|
|||
if (!manageDSAit && e != &slap_entry_root && is_entry_referral( e ) ) {
|
||||
/* entry is a referral, don't allow add */
|
||||
struct berval matched_dn;
|
||||
BVarray erefs, refs;
|
||||
BerVarray erefs, refs;
|
||||
|
||||
ber_dupbv( &matched_dn, &e->e_name );
|
||||
erefs = get_entry_referrals( be, conn, op, e );
|
||||
|
|
@ -141,7 +141,7 @@ bdb_search(
|
|||
if( erefs ) {
|
||||
refs = referral_rewrite( erefs, &matched_dn,
|
||||
base, scope );
|
||||
bvarray_free( erefs );
|
||||
ber_bvarray_free( erefs );
|
||||
}
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "bdb_search: entry is referral\n",
|
||||
|
|
@ -152,7 +152,7 @@ bdb_search(
|
|||
refs ? NULL : "bad referral object",
|
||||
refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
ber_memfree( matched_dn.bv_val );
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -373,9 +373,9 @@ bdb_search(
|
|||
if ( !manageDSAit && scope != LDAP_SCOPE_BASE &&
|
||||
is_entry_referral( e ) )
|
||||
{
|
||||
BVarray erefs = get_entry_referrals(
|
||||
BerVarray erefs = get_entry_referrals(
|
||||
be, conn, op, e );
|
||||
BVarray refs = referral_rewrite( erefs,
|
||||
BerVarray refs = referral_rewrite( erefs,
|
||||
&e->e_name, NULL,
|
||||
scope == LDAP_SCOPE_SUBTREE
|
||||
? LDAP_SCOPE_SUBTREE
|
||||
|
|
@ -384,7 +384,7 @@ bdb_search(
|
|||
send_search_reference( be, conn, op,
|
||||
e, refs, NULL, &v2refs );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
|
||||
goto loop_continue;
|
||||
}
|
||||
|
|
@ -465,7 +465,7 @@ loop_continue:
|
|||
rc = 0;
|
||||
|
||||
done:
|
||||
if( v2refs ) bvarray_free( v2refs );
|
||||
if( v2refs ) ber_bvarray_free( v2refs );
|
||||
if( realbase.bv_val ) ch_free( realbase.bv_val );
|
||||
|
||||
return rc;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ dnssrv_back_referrals(
|
|||
char *domain = NULL;
|
||||
char *hostlist = NULL;
|
||||
char **hosts = NULL;
|
||||
BVarray urls = NULL;
|
||||
BerVarray urls = NULL;
|
||||
|
||||
if( ndn->bv_len == 0 ) {
|
||||
*text = "DNS SRV operation upon null (empty) DN disallowed";
|
||||
|
|
@ -82,7 +82,7 @@ dnssrv_back_referrals(
|
|||
strcpy( url.bv_val, "ldap://" );
|
||||
strcpy( &url.bv_val[sizeof("ldap://")-1], hosts[i] );
|
||||
|
||||
if ( bvarray_add( &urls, &url ) < 0 ) {
|
||||
if ( ber_bvarray_add( &urls, &url ) < 0 ) {
|
||||
free( url.bv_val );
|
||||
*text = "problem processing DNS SRV records for DN";
|
||||
goto done;
|
||||
|
|
@ -104,6 +104,6 @@ done:
|
|||
if( domain != NULL ) ch_free( domain );
|
||||
if( hostlist != NULL ) ch_free( hostlist );
|
||||
if( hosts != NULL ) charray_free( hosts );
|
||||
bvarray_free( urls );
|
||||
ber_bvarray_free( urls );
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ dnssrv_back_search(
|
|||
char **hosts = NULL;
|
||||
char *refdn;
|
||||
struct berval nrefdn = { 0, NULL };
|
||||
BVarray urls = NULL;
|
||||
BerVarray urls = NULL;
|
||||
|
||||
assert( get_manageDSAit( op ) );
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ dnssrv_back_search(
|
|||
strcpy( url.bv_val, "ldap://" );
|
||||
strcpy( &url.bv_val[sizeof("ldap://")-1], hosts[i] );
|
||||
|
||||
if( bvarray_add( &urls, &url ) < 0 ) {
|
||||
if( ber_bvarray_add( &urls, &url ) < 0 ) {
|
||||
free( url.bv_val );
|
||||
send_ldap_result( conn, op, LDAP_OTHER,
|
||||
NULL, "problem processing DNS SRV records for DN",
|
||||
|
|
@ -226,6 +226,6 @@ done:
|
|||
if( domain != NULL ) ch_free( domain );
|
||||
if( hostlist != NULL ) ch_free( hostlist );
|
||||
if( hosts != NULL ) charray_free( hosts );
|
||||
if( urls != NULL ) bvarray_free( urls );
|
||||
if( urls != NULL ) ber_bvarray_free( urls );
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ ldap_back_add(
|
|||
int
|
||||
ldap_dnattr_rewrite(
|
||||
struct rewrite_info *rwinfo,
|
||||
BVarray a_vals,
|
||||
BerVarray a_vals,
|
||||
void *cookie
|
||||
)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ ldap_back_attribute(
|
|||
Entry *target,
|
||||
struct berval *ndn,
|
||||
AttributeDescription *entry_at,
|
||||
BVarray *vals
|
||||
BerVarray *vals
|
||||
)
|
||||
{
|
||||
struct ldapinfo *li = (struct ldapinfo *) be->be_private;
|
||||
int rc = 1, i, j, count, is_oc;
|
||||
Attribute *attr = NULL;
|
||||
BVarray abv, v;
|
||||
BerVarray abv, v;
|
||||
struct berval mapped = { 0, NULL };
|
||||
char **vs = NULL;
|
||||
LDAPMessage *result = NULL, *e = NULL;
|
||||
|
|
@ -48,7 +48,7 @@ ldap_back_attribute(
|
|||
return(1);
|
||||
|
||||
for ( count = 0; attr->a_vals[count].bv_val != NULL; count++ ) { }
|
||||
v = (BVarray) ch_calloc( (count + 1), sizeof(struct berval) );
|
||||
v = (BerVarray) ch_calloc( (count + 1), sizeof(struct berval) );
|
||||
if (v != NULL) {
|
||||
for ( j = 0, abv = attr->a_vals; --count >= 0; abv++ ) {
|
||||
if ( abv->bv_len > 0 ) {
|
||||
|
|
@ -95,7 +95,7 @@ ldap_back_attribute(
|
|||
}
|
||||
|
||||
for ( count = 0; vs[count] != NULL; count++ ) { }
|
||||
v = (BVarray) ch_calloc( (count + 1), sizeof(struct berval) );
|
||||
v = (BerVarray) ch_calloc( (count + 1), sizeof(struct berval) );
|
||||
if (v == NULL) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ extern void mapping_free ( struct ldapmapping *mapping );
|
|||
|
||||
#ifdef ENABLE_REWRITE
|
||||
extern int suffix_massage_config( struct rewrite_info *info, int argc, char **argv );
|
||||
extern int ldap_dnattr_rewrite( struct rewrite_info *rwinfo, BVarray a_vals, void *cookie );
|
||||
extern int ldap_dnattr_rewrite( struct rewrite_info *rwinfo, BerVarray a_vals, void *cookie );
|
||||
#endif /* ENABLE_REWRITE */
|
||||
|
||||
LDAP_END_DECL
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ ldap_send_entry(
|
|||
attr = ent.e_attrs;
|
||||
ent.e_attrs = attr->a_next;
|
||||
if (attr->a_vals != &dummy)
|
||||
bvarray_free(attr->a_vals);
|
||||
ber_bvarray_free(attr->a_vals);
|
||||
ch_free(attr);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ ldbm_back_add(
|
|||
/* get parent with writer lock */
|
||||
if ( (p = dn2entry_w( be, &pdn, &matched )) == NULL ) {
|
||||
char *matched_dn = NULL;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
|
||||
ldap_pvt_thread_mutex_unlock(&li->li_add_mutex);
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ ldbm_back_add(
|
|||
refs == NULL ? "parent does not exist" : "parent is referral",
|
||||
refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
free( matched_dn );
|
||||
|
||||
return -1;
|
||||
|
|
@ -176,7 +176,7 @@ ldbm_back_add(
|
|||
if ( is_entry_referral( p ) ) {
|
||||
/* parent is a referral, don't allow add */
|
||||
char *matched_dn = ch_strdup( p->e_dn );
|
||||
BVarray refs = is_entry_referral( p )
|
||||
BerVarray refs = is_entry_referral( p )
|
||||
? get_entry_referrals( be, conn, op, p )
|
||||
: NULL;
|
||||
|
||||
|
|
@ -194,7 +194,7 @@ ldbm_back_add(
|
|||
send_ldap_result( conn, op, LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
free( matched_dn );
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ static void new_superior(
|
|||
struct berval *res );
|
||||
|
||||
static int dnlist_subordinate(
|
||||
BVarray dnlist,
|
||||
BerVarray dnlist,
|
||||
struct berval *dn );
|
||||
|
||||
Entry *deref_internal_r(
|
||||
|
|
@ -43,7 +43,7 @@ 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 ) );
|
||||
|
|
@ -63,7 +63,7 @@ Entry *deref_internal_r(
|
|||
}
|
||||
|
||||
dnlist = NULL;
|
||||
bvarray_add( &dnlist, &dn );
|
||||
ber_bvarray_add( &dnlist, &dn );
|
||||
|
||||
for( depth=0 ; ; depth++ ) {
|
||||
if( entry != NULL ) {
|
||||
|
|
@ -113,7 +113,7 @@ Entry *deref_internal_r(
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ Entry *deref_internal_r(
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ Entry *deref_internal_r(
|
|||
}
|
||||
|
||||
free( dn.bv_val );
|
||||
bvarray_free( dnlist );
|
||||
ber_bvarray_free( dnlist );
|
||||
return entry;
|
||||
}
|
||||
|
||||
|
|
@ -276,7 +276,7 @@ static void new_superior(
|
|||
}
|
||||
|
||||
static int dnlist_subordinate(
|
||||
BVarray dnlist,
|
||||
BerVarray dnlist,
|
||||
struct berval *dn )
|
||||
{
|
||||
assert( dnlist );
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@ ldbm_back_attribute(
|
|||
Entry *target,
|
||||
struct berval *entry_ndn,
|
||||
AttributeDescription *entry_at,
|
||||
BVarray *vals )
|
||||
BerVarray *vals )
|
||||
{
|
||||
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
|
||||
Entry *e;
|
||||
int rc;
|
||||
Attribute *attr;
|
||||
BVarray v;
|
||||
BerVarray v;
|
||||
const char *entry_at_name = entry_at->ad_cname.bv_val;
|
||||
struct berval *iv, *jv;
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ ldbm_back_attribute(
|
|||
/* count them */
|
||||
}
|
||||
|
||||
v = (BVarray) ch_malloc( sizeof(struct berval) * ((iv - attr->a_vals)+1) );
|
||||
v = (BerVarray) ch_malloc( sizeof(struct berval) * ((iv - attr->a_vals)+1) );
|
||||
|
||||
for ( iv=attr->a_vals, jv=v; iv->bv_val; iv++ ) {
|
||||
if( conn != NULL
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ ldbm_back_bind(
|
|||
/* get entry with reader lock */
|
||||
if ( (e = dn2entry_r( be, dn, &matched )) == NULL ) {
|
||||
char *matched_dn = NULL;
|
||||
BVarray refs = NULL;
|
||||
BerVarray refs = NULL;
|
||||
|
||||
if( matched != NULL ) {
|
||||
matched_dn = ch_strdup( matched->e_dn );
|
||||
|
|
@ -97,7 +97,7 @@ ldbm_back_bind(
|
|||
NULL, NULL, NULL, NULL );
|
||||
}
|
||||
|
||||
if ( refs ) bvarray_free( refs );
|
||||
if ( refs ) ber_bvarray_free( refs );
|
||||
if ( matched_dn ) free( matched_dn );
|
||||
return( rc );
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ ldbm_back_bind(
|
|||
|
||||
if ( is_entry_referral( e ) ) {
|
||||
/* entry is a referral, don't allow bind */
|
||||
BVarray refs = get_entry_referrals( be,
|
||||
BerVarray refs = get_entry_referrals( be,
|
||||
conn, op, e );
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
|
|
@ -147,7 +147,7 @@ ldbm_back_bind(
|
|||
NULL, NULL, NULL, NULL );
|
||||
}
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
|
||||
rc = 1;
|
||||
goto return_results;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ ldbm_back_compare(
|
|||
/* get entry with reader lock */
|
||||
if ( (e = dn2entry_r( be, ndn, &matched )) == NULL ) {
|
||||
char *matched_dn = NULL;
|
||||
BVarray refs = NULL;
|
||||
BerVarray refs = NULL;
|
||||
|
||||
if ( matched != NULL ) {
|
||||
matched_dn = ch_strdup( matched->e_dn );
|
||||
|
|
@ -52,7 +52,7 @@ ldbm_back_compare(
|
|||
send_ldap_result( conn, op, LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
|
||||
if ( refs ) bvarray_free( refs );
|
||||
if ( refs ) ber_bvarray_free( refs );
|
||||
free( matched_dn );
|
||||
|
||||
return( 1 );
|
||||
|
|
@ -60,7 +60,7 @@ ldbm_back_compare(
|
|||
|
||||
if (!manageDSAit && is_entry_referral( e ) ) {
|
||||
/* entry is a referral, don't allow add */
|
||||
BVarray refs = get_entry_referrals( be,
|
||||
BerVarray refs = get_entry_referrals( be,
|
||||
conn, op, e );
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
|
|
@ -75,7 +75,7 @@ ldbm_back_compare(
|
|||
send_ldap_result( conn, op, LDAP_REFERRAL,
|
||||
e->e_dn, NULL, refs, NULL );
|
||||
|
||||
if (refs ) bvarray_free( refs );
|
||||
if (refs ) ber_bvarray_free( refs );
|
||||
|
||||
rc = 1;
|
||||
goto return_results;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ ldbm_back_delete(
|
|||
/* get entry with writer lock */
|
||||
if ( (e = dn2entry_w( be, ndn, &matched )) == NULL ) {
|
||||
char *matched_dn = NULL;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
|
||||
|
|
@ -69,7 +69,7 @@ ldbm_back_delete(
|
|||
send_ldap_result( conn, op, LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
|
||||
if ( refs ) bvarray_free( refs );
|
||||
if ( refs ) ber_bvarray_free( refs );
|
||||
free( matched_dn );
|
||||
|
||||
return( -1 );
|
||||
|
|
@ -78,7 +78,7 @@ ldbm_back_delete(
|
|||
if ( !manageDSAit && is_entry_referral( e ) ) {
|
||||
/* parent is a referral, don't allow add */
|
||||
/* parent is an alias, don't allow add */
|
||||
BVarray refs = get_entry_referrals( be,
|
||||
BerVarray refs = get_entry_referrals( be,
|
||||
conn, op, e );
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
|
|
@ -93,7 +93,7 @@ ldbm_back_delete(
|
|||
send_ldap_result( conn, op, LDAP_REFERRAL,
|
||||
e->e_dn, NULL, refs, NULL );
|
||||
|
||||
if ( refs ) bvarray_free( refs );
|
||||
if ( refs ) ber_bvarray_free( refs );
|
||||
|
||||
rc = 1;
|
||||
goto return_results;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ ldbm_back_extended(
|
|||
struct berval **rspdata,
|
||||
LDAPControl *** rspctrls,
|
||||
const char** text,
|
||||
BVarray *refs
|
||||
BerVarray *refs
|
||||
)
|
||||
{
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -480,7 +480,7 @@ equality_candidates(
|
|||
if( idl == NULL ) break;
|
||||
}
|
||||
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
|
||||
ldbm_cache_close( be, db );
|
||||
|
||||
|
|
@ -662,7 +662,7 @@ approx_candidates(
|
|||
if( idl == NULL ) break;
|
||||
}
|
||||
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
|
||||
ldbm_cache_close( be, db );
|
||||
|
||||
|
|
@ -900,7 +900,7 @@ substring_candidates(
|
|||
if( idl == NULL ) break;
|
||||
}
|
||||
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
|
||||
ldbm_cache_close( be, db );
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ static int indexer(
|
|||
Backend *be,
|
||||
char *dbname,
|
||||
struct berval *atname,
|
||||
BVarray vals,
|
||||
BerVarray vals,
|
||||
ID id,
|
||||
int op,
|
||||
slap_mask_t mask )
|
||||
|
|
@ -196,7 +196,7 @@ static int indexer(
|
|||
for( i=0; keys[i].bv_val != NULL; i++ ) {
|
||||
key_change( be, db, &keys[i], id, op );
|
||||
}
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ static int indexer(
|
|||
for( i=0; keys[i].bv_val != NULL; i++ ) {
|
||||
key_change( be, db, &keys[i], id, op );
|
||||
}
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ static int indexer(
|
|||
for( i=0; keys[i].bv_val != NULL; i++ ) {
|
||||
key_change( be, db, &keys[i], id, op );
|
||||
}
|
||||
bvarray_free( keys );
|
||||
ber_bvarray_free( keys );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -240,7 +240,7 @@ static int index_at_values(
|
|||
Backend *be,
|
||||
AttributeType *type,
|
||||
struct berval *lang,
|
||||
BVarray vals,
|
||||
BerVarray vals,
|
||||
ID id,
|
||||
int op,
|
||||
char ** dbnamep,
|
||||
|
|
@ -310,7 +310,7 @@ static int index_at_values(
|
|||
int index_values(
|
||||
Backend *be,
|
||||
AttributeDescription *desc,
|
||||
BVarray vals,
|
||||
BerVarray vals,
|
||||
ID id,
|
||||
int op )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ ldbm_back_modify(
|
|||
/* acquire and lock entry */
|
||||
if ( (e = dn2entry_w( be, ndn, &matched )) == NULL ) {
|
||||
char* matched_dn = NULL;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
|
||||
if ( matched != NULL ) {
|
||||
matched_dn = ch_strdup( matched->e_dn );
|
||||
|
|
@ -324,7 +324,7 @@ ldbm_back_modify(
|
|||
send_ldap_result( conn, op, LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
|
||||
if ( refs ) bvarray_free( refs );
|
||||
if ( refs ) ber_bvarray_free( refs );
|
||||
free( matched_dn );
|
||||
|
||||
return( -1 );
|
||||
|
|
@ -333,7 +333,7 @@ ldbm_back_modify(
|
|||
if ( !manageDSAit && is_entry_referral( e ) ) {
|
||||
/* parent is a referral, don't allow add */
|
||||
/* parent is an alias, don't allow add */
|
||||
BVarray refs = get_entry_referrals( be,
|
||||
BerVarray refs = get_entry_referrals( be,
|
||||
conn, op, e );
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
|
|
@ -348,7 +348,7 @@ ldbm_back_modify(
|
|||
send_ldap_result( conn, op, LDAP_REFERRAL,
|
||||
e->e_dn, NULL, refs, NULL );
|
||||
|
||||
if ( refs ) bvarray_free( refs );
|
||||
if ( refs ) ber_bvarray_free( refs );
|
||||
|
||||
goto error_return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ ldbm_back_modrdn(
|
|||
/* get entry with writer lock */
|
||||
if ( (e = dn2entry_w( be, ndn, &matched )) == NULL ) {
|
||||
char* matched_dn = NULL;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
|
||||
if( matched != NULL ) {
|
||||
matched_dn = strdup( matched->e_dn );
|
||||
|
|
@ -107,7 +107,7 @@ ldbm_back_modrdn(
|
|||
send_ldap_result( conn, op, LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
|
||||
if ( refs ) bvarray_free( refs );
|
||||
if ( refs ) ber_bvarray_free( refs );
|
||||
free( matched_dn );
|
||||
|
||||
return( -1 );
|
||||
|
|
@ -116,7 +116,7 @@ ldbm_back_modrdn(
|
|||
if (!manageDSAit && is_entry_referral( e ) ) {
|
||||
/* parent is a referral, don't allow add */
|
||||
/* parent is an alias, don't allow add */
|
||||
BVarray refs = get_entry_referrals( be,
|
||||
BerVarray refs = get_entry_referrals( be,
|
||||
conn, op, e );
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
|
|
@ -130,7 +130,7 @@ ldbm_back_modrdn(
|
|||
send_ldap_result( conn, op, LDAP_REFERRAL,
|
||||
e->e_dn, NULL, refs, NULL );
|
||||
|
||||
if ( refs ) bvarray_free( refs );
|
||||
if ( refs ) ber_bvarray_free( refs );
|
||||
goto return_results;
|
||||
}
|
||||
|
||||
|
|
@ -613,7 +613,7 @@ ldbm_back_modrdn(
|
|||
mod_tmp = (Modifications *)ch_malloc( sizeof( Modifications )
|
||||
+ 2 * sizeof( struct berval ) );
|
||||
mod_tmp->sml_desc = desc;
|
||||
mod_tmp->sml_bvalues = (BVarray)( mod_tmp + 1 );
|
||||
mod_tmp->sml_bvalues = (BerVarray)( mod_tmp + 1 );
|
||||
mod_tmp->sml_bvalues[0] = new_rdn[0][a_cnt]->la_value;
|
||||
mod_tmp->sml_bvalues[1].bv_val = NULL;
|
||||
mod_tmp->sml_op = SLAP_MOD_SOFTADD;
|
||||
|
|
@ -687,7 +687,7 @@ ldbm_back_modrdn(
|
|||
mod_tmp = (Modifications *)ch_malloc( sizeof( Modifications )
|
||||
+ 2 * sizeof( struct berval ) );
|
||||
mod_tmp->sml_desc = desc;
|
||||
mod_tmp->sml_bvalues = (BVarray)(mod_tmp+1);
|
||||
mod_tmp->sml_bvalues = (BerVarray)(mod_tmp+1);
|
||||
mod_tmp->sml_bvalues[0] = old_rdn[0][d_cnt]->la_value;
|
||||
mod_tmp->sml_bvalues[1].bv_val = NULL;
|
||||
mod_tmp->sml_op = LDAP_MOD_DELETE;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ ldbm_back_exop_passwd(
|
|||
struct berval **rspdata,
|
||||
LDAPControl *** rspctrls,
|
||||
const char **text,
|
||||
BVarray *refs
|
||||
BerVarray *refs
|
||||
)
|
||||
{
|
||||
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ extern int
|
|||
index_values LDAP_P((
|
||||
Backend *be,
|
||||
AttributeDescription *desc,
|
||||
BVarray vals,
|
||||
BerVarray vals,
|
||||
ID id,
|
||||
int op ));
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ ldbm_back_referrals(
|
|||
e = dn2entry_r( be, ndn, &matched );
|
||||
if ( e == NULL ) {
|
||||
char *matched_dn = NULL;
|
||||
BVarray refs = NULL;
|
||||
BerVarray refs = NULL;
|
||||
|
||||
if ( matched != NULL ) {
|
||||
matched_dn = ch_strdup( matched->e_dn );
|
||||
|
|
@ -74,7 +74,7 @@ ldbm_back_referrals(
|
|||
/* send referrals */
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
matched_dn, NULL, refs, NULL );
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
|
||||
} else if ( rc != LDAP_SUCCESS ) {
|
||||
send_ldap_result( conn, op, rc, matched_dn,
|
||||
|
|
@ -88,8 +88,8 @@ ldbm_back_referrals(
|
|||
|
||||
if ( is_entry_referral( e ) ) {
|
||||
/* entry is a referral */
|
||||
BVarray refs = get_entry_referrals( be, conn, op, e );
|
||||
BVarray rrefs = referral_rewrite(
|
||||
BerVarray refs = get_entry_referrals( be, conn, op, e );
|
||||
BerVarray rrefs = referral_rewrite(
|
||||
refs, &e->e_name, dn, LDAP_SCOPE_DEFAULT );
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
|
|
@ -106,14 +106,14 @@ ldbm_back_referrals(
|
|||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
e->e_dn, NULL, rrefs, NULL );
|
||||
|
||||
bvarray_free( rrefs );
|
||||
ber_bvarray_free( rrefs );
|
||||
|
||||
} else {
|
||||
send_ldap_result( conn, op, rc = LDAP_OTHER, e->e_dn,
|
||||
"bad referral object", NULL, NULL );
|
||||
}
|
||||
|
||||
if( refs != NULL ) bvarray_free( refs );
|
||||
if( refs != NULL ) ber_bvarray_free( refs );
|
||||
}
|
||||
|
||||
cache_return_entry_r( &li->li_cache, e );
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ ldbm_back_search(
|
|||
ID_BLOCK *candidates;
|
||||
ID id, cursor;
|
||||
Entry *e;
|
||||
BVarray v2refs = NULL;
|
||||
BerVarray v2refs = NULL;
|
||||
Entry *matched = NULL;
|
||||
struct berval realbase = { 0, NULL };
|
||||
int nentries = 0;
|
||||
|
|
@ -92,10 +92,10 @@ ldbm_back_search(
|
|||
|
||||
if ( e == NULL ) {
|
||||
struct berval matched_dn = { 0, NULL };
|
||||
BVarray refs = NULL;
|
||||
BerVarray refs = NULL;
|
||||
|
||||
if ( matched != NULL ) {
|
||||
BVarray erefs;
|
||||
BerVarray erefs;
|
||||
ber_dupbv( &matched_dn, &matched->e_name );
|
||||
|
||||
erefs = is_entry_referral( matched )
|
||||
|
|
@ -108,7 +108,7 @@ ldbm_back_search(
|
|||
refs = referral_rewrite( erefs, &matched_dn,
|
||||
base, scope );
|
||||
|
||||
bvarray_free( erefs );
|
||||
ber_bvarray_free( erefs );
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -119,7 +119,7 @@ ldbm_back_search(
|
|||
send_ldap_result( conn, op, err, matched_dn.bv_val,
|
||||
text, refs, NULL );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
ber_memfree( matched_dn.bv_val );
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -127,8 +127,8 @@ ldbm_back_search(
|
|||
if (!manageDSAit && is_entry_referral( e ) ) {
|
||||
/* entry is a referral, don't allow add */
|
||||
struct berval matched_dn;
|
||||
BVarray erefs;
|
||||
BVarray refs;
|
||||
BerVarray erefs;
|
||||
BerVarray refs;
|
||||
|
||||
ber_dupbv( &matched_dn, &e->e_name );
|
||||
erefs = get_entry_referrals( be, conn, op, e );
|
||||
|
|
@ -150,13 +150,13 @@ ldbm_back_search(
|
|||
refs = referral_rewrite( erefs, &matched_dn,
|
||||
base, scope );
|
||||
|
||||
bvarray_free( erefs );
|
||||
ber_bvarray_free( erefs );
|
||||
}
|
||||
|
||||
if( refs ) {
|
||||
send_ldap_result( conn, op, LDAP_REFERRAL,
|
||||
matched_dn.bv_val, NULL, refs, NULL );
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
|
||||
} else {
|
||||
send_ldap_result( conn, op, LDAP_OTHER,
|
||||
|
|
@ -395,9 +395,9 @@ searchit:
|
|||
}
|
||||
|
||||
if( scopeok ) {
|
||||
BVarray erefs = get_entry_referrals(
|
||||
BerVarray erefs = get_entry_referrals(
|
||||
be, conn, op, e );
|
||||
BVarray refs = referral_rewrite( erefs,
|
||||
BerVarray refs = referral_rewrite( erefs,
|
||||
&e->e_name, NULL,
|
||||
scope == LDAP_SCOPE_SUBTREE
|
||||
? LDAP_SCOPE_SUBTREE
|
||||
|
|
@ -406,7 +406,7 @@ searchit:
|
|||
send_search_reference( be, conn, op,
|
||||
e, refs, NULL, &v2refs );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
|
||||
} else {
|
||||
#ifdef NEW_LOGGING
|
||||
|
|
@ -512,7 +512,7 @@ done:
|
|||
if( candidates != NULL )
|
||||
idl_free( candidates );
|
||||
|
||||
if( v2refs ) bvarray_free( v2refs );
|
||||
if( v2refs ) ber_bvarray_free( v2refs );
|
||||
if( realbase.bv_val ) free( realbase.bv_val );
|
||||
|
||||
return rc;
|
||||
|
|
|
|||
|
|
@ -91,13 +91,13 @@ meta_back_attribute(
|
|||
Entry *target,
|
||||
struct berval *ndn,
|
||||
AttributeDescription *entry_at,
|
||||
BVarray *vals
|
||||
BerVarray *vals
|
||||
)
|
||||
{
|
||||
struct metainfo *li = ( struct metainfo * )be->be_private;
|
||||
int rc = 1, i, j, count, is_oc, candidate;
|
||||
Attribute *attr;
|
||||
BVarray abv, v;
|
||||
BerVarray abv, v;
|
||||
char **vs;
|
||||
struct berval mapped;
|
||||
LDAPMessage *result, *e;
|
||||
|
|
@ -115,7 +115,7 @@ meta_back_attribute(
|
|||
|
||||
for ( count = 0; attr->a_vals[ count ].bv_val != NULL; count++ )
|
||||
;
|
||||
v = ( BVarray )ch_calloc( ( count + 1 ), sizeof( struct berval ) );
|
||||
v = ( BerVarray )ch_calloc( ( count + 1 ), sizeof( struct berval ) );
|
||||
if ( v == NULL ) {
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -166,7 +166,7 @@ meta_back_attribute(
|
|||
if ( vs != NULL ) {
|
||||
for ( count = 0; vs[ count ] != NULL;
|
||||
count++ ) { }
|
||||
v = ( BVarray )ch_calloc( ( count + 1 ),
|
||||
v = ( BerVarray )ch_calloc( ( count + 1 ),
|
||||
sizeof( struct berval ) );
|
||||
if ( v == NULL ) {
|
||||
ldap_value_free( vs );
|
||||
|
|
|
|||
|
|
@ -764,7 +764,7 @@ meta_send_entry(
|
|||
attr = ent.e_attrs;
|
||||
ent.e_attrs = attr->a_next;
|
||||
if ( attr->a_vals != &dummy ) {
|
||||
bvarray_free( attr->a_vals );
|
||||
ber_bvarray_free( attr->a_vals );
|
||||
}
|
||||
free( attr );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1050,7 +1050,7 @@ backend_attribute(
|
|||
Entry *target,
|
||||
struct berval *edn,
|
||||
AttributeDescription *entry_at,
|
||||
BVarray *vals
|
||||
BerVarray *vals
|
||||
)
|
||||
{
|
||||
if ( target == NULL || !dn_match( &target->e_nname, edn ) ) {
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ typedef struct glue_state {
|
|||
int matchlen;
|
||||
char *matched;
|
||||
int nrefs;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
slap_callback *prevcb;
|
||||
} glue_state;
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ glue_back_response (
|
|||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BVarray ref,
|
||||
BerVarray ref,
|
||||
const char *resoid,
|
||||
struct berval *resdata,
|
||||
struct berval *sasldata,
|
||||
|
|
@ -209,7 +209,7 @@ glue_back_response (
|
|||
}
|
||||
if (ref) {
|
||||
int i, j, k;
|
||||
BVarray new;
|
||||
BerVarray new;
|
||||
|
||||
for (i=0; ref[i].bv_val; i++);
|
||||
|
||||
|
|
@ -236,7 +236,7 @@ glue_back_sresult (
|
|||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BVarray refs,
|
||||
BerVarray refs,
|
||||
LDAPControl **ctrls,
|
||||
int nentries
|
||||
)
|
||||
|
|
@ -385,7 +385,7 @@ done:
|
|||
if (gs.matched)
|
||||
free (gs.matched);
|
||||
if (gs.refs)
|
||||
bvarray_free(gs.refs);
|
||||
ber_bvarray_free(gs.refs);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
@ -600,7 +600,7 @@ glue_back_attribute (
|
|||
Entry *target,
|
||||
struct berval *ndn,
|
||||
AttributeDescription *ad,
|
||||
BVarray *vals
|
||||
BerVarray *vals
|
||||
)
|
||||
{
|
||||
BackendDB *be;
|
||||
|
|
|
|||
|
|
@ -449,13 +449,13 @@ do_bind(
|
|||
|
||||
if ( (be = select_backend( &ndn, 0, 0 )) == NULL ) {
|
||||
if ( default_referral ) {
|
||||
BVarray ref = referral_rewrite( default_referral,
|
||||
BerVarray ref = referral_rewrite( default_referral,
|
||||
NULL, &pdn, LDAP_SCOPE_DEFAULT );
|
||||
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
NULL, NULL, ref ? ref : default_referral, NULL );
|
||||
|
||||
bvarray_free( ref );
|
||||
ber_bvarray_free( ref );
|
||||
|
||||
} else {
|
||||
/* noSuchObject is not allowed to be returned by bind */
|
||||
|
|
|
|||
|
|
@ -246,48 +246,3 @@ slap_strncopy(
|
|||
while ((*a++ = *b++) && n-- > 0) ;
|
||||
return a-1;
|
||||
}
|
||||
|
||||
/* Unlike charray_add, bvarray_add does not make a new copy of the
|
||||
* source string. Typically it is used where ber_bvecadd was before,
|
||||
* and ber_bvecadd didn't duplicate its source either.
|
||||
*/
|
||||
int
|
||||
bvarray_add(
|
||||
struct berval **a,
|
||||
struct berval *bv
|
||||
)
|
||||
{
|
||||
int n;
|
||||
|
||||
if ( *a == NULL ) {
|
||||
*a = (struct berval *) ch_malloc( 2 * sizeof(struct berval) );
|
||||
n = 0;
|
||||
} else {
|
||||
for ( n = 0; *a != NULL && (*a)[n].bv_val != NULL; n++ ) {
|
||||
; /* NULL */
|
||||
}
|
||||
|
||||
*a = (struct berval *) ch_realloc( (char *) *a,
|
||||
(n + 2) * sizeof(struct berval) );
|
||||
}
|
||||
if ( *a == NULL ) return -1;
|
||||
|
||||
(*a)[n++] = *bv;
|
||||
(*a)[n].bv_val = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
bvarray_free(
|
||||
struct berval *a
|
||||
)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (a) {
|
||||
for (i=0; a[i].bv_val; i++)
|
||||
free(a[i].bv_val);
|
||||
free(a);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,13 +222,13 @@ do_compare(
|
|||
* if we don't hold it.
|
||||
*/
|
||||
if ( (be = select_backend( &ndn, manageDSAit, 0 )) == NULL ) {
|
||||
BVarray ref = referral_rewrite( default_referral,
|
||||
BerVarray ref = referral_rewrite( default_referral,
|
||||
NULL, &pdn, LDAP_SCOPE_DEFAULT );
|
||||
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
NULL, NULL, ref ? ref : default_referral, NULL );
|
||||
|
||||
bvarray_free( ref );
|
||||
ber_bvarray_free( ref );
|
||||
rc = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,13 +129,13 @@ do_delete(
|
|||
* if we don't hold it.
|
||||
*/
|
||||
if ( (be = select_backend( &ndn, manageDSAit, 0 )) == NULL ) {
|
||||
BVarray ref = referral_rewrite( default_referral,
|
||||
BerVarray ref = referral_rewrite( default_referral,
|
||||
NULL, &pdn, LDAP_SCOPE_DEFAULT );
|
||||
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
NULL, NULL, ref ? ref : default_referral, NULL );
|
||||
|
||||
bvarray_free( ref );
|
||||
ber_bvarray_free( ref );
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -179,15 +179,15 @@ do_delete(
|
|||
}
|
||||
#ifndef SLAPD_MULTIMASTER
|
||||
} else {
|
||||
BVarray defref = be->be_update_refs
|
||||
BerVarray defref = be->be_update_refs
|
||||
? be->be_update_refs : default_referral;
|
||||
BVarray ref = referral_rewrite( default_referral,
|
||||
BerVarray ref = referral_rewrite( default_referral,
|
||||
NULL, &pdn, LDAP_SCOPE_DEFAULT );
|
||||
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL, NULL, NULL,
|
||||
ref ? ref : defref, NULL );
|
||||
|
||||
bvarray_free( ref );
|
||||
ber_bvarray_free( ref );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -561,7 +561,7 @@ int entry_decode(struct berval *bv, Entry **e)
|
|||
const char *text;
|
||||
AttributeDescription *ad;
|
||||
unsigned char *ptr = (unsigned char *)bv->bv_val;
|
||||
BVarray bptr;
|
||||
BerVarray bptr;
|
||||
|
||||
i = entry_getlen(&ptr);
|
||||
x = ch_malloc(i);
|
||||
|
|
@ -587,7 +587,7 @@ int entry_decode(struct berval *bv, Entry **e)
|
|||
* pointer can never be NULL
|
||||
*/
|
||||
x->e_attrs = (Attribute *)(x+1);
|
||||
bptr = (BVarray)x->e_attrs;
|
||||
bptr = (BerVarray)x->e_attrs;
|
||||
a = NULL;
|
||||
|
||||
while (i = entry_getlen(&ptr)) {
|
||||
|
|
@ -623,7 +623,7 @@ int entry_decode(struct berval *bv, Entry **e)
|
|||
}
|
||||
ptr += i + 1;
|
||||
a->a_desc = ad;
|
||||
bptr = (BVarray)(a+1);
|
||||
bptr = (BerVarray)(a+1);
|
||||
a->a_vals = bptr;
|
||||
a->a_flags = 0;
|
||||
j = entry_getlen(&ptr);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ do_extended(
|
|||
ber_len_t len;
|
||||
struct extop_list *ext;
|
||||
const char *text;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
char *rspoid;
|
||||
struct berval *rspdata;
|
||||
LDAPControl **rspctrls;
|
||||
|
|
@ -207,7 +207,7 @@ do_extended(
|
|||
send_ldap_extended( conn, op, rc, NULL, text, refs,
|
||||
rspoid, rspdata, rspctrls );
|
||||
|
||||
bvarray_free( refs );
|
||||
ber_bvarray_free( refs );
|
||||
}
|
||||
|
||||
if ( rspoid != NULL ) {
|
||||
|
|
|
|||
|
|
@ -589,7 +589,7 @@ get_substring_filter(
|
|||
goto return_error;
|
||||
}
|
||||
|
||||
bvarray_add( &f->f_sub_any, &value );
|
||||
ber_bvarray_add( &f->f_sub_any, &value );
|
||||
|
||||
if( fstr->bv_val ) {
|
||||
int i = fstr->bv_len;
|
||||
|
|
@ -660,7 +660,7 @@ return_error:
|
|||
}
|
||||
|
||||
free( f->f_sub_initial.bv_val );
|
||||
bvarray_free( f->f_sub_any );
|
||||
ber_bvarray_free( f->f_sub_any );
|
||||
free( f->f_sub_final.bv_val );
|
||||
ch_free( f->f_sub );
|
||||
return rc;
|
||||
|
|
@ -711,7 +711,7 @@ filter_free( Filter *f )
|
|||
if ( f->f_sub_initial.bv_val != NULL ) {
|
||||
free( f->f_sub_initial.bv_val );
|
||||
}
|
||||
bvarray_free( f->f_sub_any );
|
||||
ber_bvarray_free( f->f_sub_any );
|
||||
if ( f->f_sub_final.bv_val != NULL ) {
|
||||
free( f->f_sub_final.bv_val );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ int ldap_syslog;
|
|||
int ldap_syslog_level = LOG_DEBUG;
|
||||
#endif
|
||||
|
||||
BVarray default_referral = NULL;
|
||||
BerVarray default_referral = NULL;
|
||||
|
||||
/*
|
||||
* global variables that need mutex protection
|
||||
|
|
|
|||
|
|
@ -288,13 +288,13 @@ do_modify(
|
|||
* if we don't hold it.
|
||||
*/
|
||||
if ( (be = select_backend( &ndn, manageDSAit, 0 )) == NULL ) {
|
||||
BVarray ref = referral_rewrite( default_referral,
|
||||
BerVarray ref = referral_rewrite( default_referral,
|
||||
NULL, &pdn, LDAP_SCOPE_DEFAULT );
|
||||
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
NULL, NULL, ref ? ref : default_referral, NULL );
|
||||
|
||||
bvarray_free( ref );
|
||||
ber_bvarray_free( ref );
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -375,15 +375,15 @@ do_modify(
|
|||
#ifndef SLAPD_MULTIMASTER
|
||||
/* send a referral */
|
||||
} else {
|
||||
BVarray defref = be->be_update_refs
|
||||
BerVarray defref = be->be_update_refs
|
||||
? be->be_update_refs : default_referral;
|
||||
BVarray ref = referral_rewrite( defref,
|
||||
BerVarray ref = referral_rewrite( defref,
|
||||
NULL, &pdn, LDAP_SCOPE_DEFAULT );
|
||||
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL, NULL, NULL,
|
||||
ref ? ref : defref, NULL );
|
||||
|
||||
bvarray_free( ref );
|
||||
ber_bvarray_free( ref );
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
|
|
@ -591,7 +591,7 @@ int slap_mods_opattrs(
|
|||
mod->sml_op = mop;
|
||||
mod->sml_type.bv_val = NULL;
|
||||
mod->sml_desc = slap_schema.si_ad_structuralObjectClass;
|
||||
mod->sml_bvalues = (BVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
mod->sml_bvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
ber_dupbv( &mod->sml_bvalues[0], &tmpval );
|
||||
mod->sml_bvalues[1].bv_val = NULL;
|
||||
assert( mod->sml_bvalues[0].bv_val );
|
||||
|
|
@ -606,7 +606,7 @@ int slap_mods_opattrs(
|
|||
mod->sml_op = mop;
|
||||
mod->sml_type.bv_val = NULL;
|
||||
mod->sml_desc = slap_schema.si_ad_entryUUID;
|
||||
mod->sml_bvalues = (BVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
mod->sml_bvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
ber_dupbv( &mod->sml_bvalues[0], &tmpval );
|
||||
mod->sml_bvalues[1].bv_val = NULL;
|
||||
assert( mod->sml_bvalues[0].bv_val );
|
||||
|
|
@ -617,7 +617,7 @@ int slap_mods_opattrs(
|
|||
mod->sml_op = mop;
|
||||
mod->sml_type.bv_val = NULL;
|
||||
mod->sml_desc = slap_schema.si_ad_creatorsName;
|
||||
mod->sml_bvalues = (BVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
mod->sml_bvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
ber_dupbv( &mod->sml_bvalues[0], &name );
|
||||
mod->sml_bvalues[1].bv_val = NULL;
|
||||
assert( mod->sml_bvalues[0].bv_val );
|
||||
|
|
@ -628,7 +628,7 @@ int slap_mods_opattrs(
|
|||
mod->sml_op = mop;
|
||||
mod->sml_type.bv_val = NULL;
|
||||
mod->sml_desc = slap_schema.si_ad_createTimestamp;
|
||||
mod->sml_bvalues = (BVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
mod->sml_bvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
ber_dupbv( &mod->sml_bvalues[0], ×tamp );
|
||||
mod->sml_bvalues[1].bv_val = NULL;
|
||||
assert( mod->sml_bvalues[0].bv_val );
|
||||
|
|
@ -640,7 +640,7 @@ int slap_mods_opattrs(
|
|||
mod->sml_op = mop;
|
||||
mod->sml_type.bv_val = NULL;
|
||||
mod->sml_desc = slap_schema.si_ad_entryCSN;
|
||||
mod->sml_bvalues = (BVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
mod->sml_bvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
ber_dupbv( &mod->sml_bvalues[0], &csn );
|
||||
mod->sml_bvalues[1].bv_val = NULL;
|
||||
assert( mod->sml_bvalues[0].bv_val );
|
||||
|
|
@ -651,7 +651,7 @@ int slap_mods_opattrs(
|
|||
mod->sml_op = mop;
|
||||
mod->sml_type.bv_val = NULL;
|
||||
mod->sml_desc = slap_schema.si_ad_modifiersName;
|
||||
mod->sml_bvalues = (BVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
mod->sml_bvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
ber_dupbv( &mod->sml_bvalues[0], &name );
|
||||
mod->sml_bvalues[1].bv_val = NULL;
|
||||
assert( mod->sml_bvalues[0].bv_val );
|
||||
|
|
@ -662,7 +662,7 @@ int slap_mods_opattrs(
|
|||
mod->sml_op = mop;
|
||||
mod->sml_type.bv_val = NULL;
|
||||
mod->sml_desc = slap_schema.si_ad_modifyTimestamp;
|
||||
mod->sml_bvalues = (BVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
mod->sml_bvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
ber_dupbv( &mod->sml_bvalues[0], ×tamp );
|
||||
mod->sml_bvalues[1].bv_val = NULL;
|
||||
assert( mod->sml_bvalues[0].bv_val );
|
||||
|
|
|
|||
|
|
@ -281,13 +281,13 @@ do_modrdn(
|
|||
* if we don't hold it.
|
||||
*/
|
||||
if ( (be = select_backend( &ndn, manageDSAit, 0 )) == NULL ) {
|
||||
BVarray ref = referral_rewrite( default_referral,
|
||||
BerVarray ref = referral_rewrite( default_referral,
|
||||
NULL, &pdn, LDAP_SCOPE_DEFAULT );
|
||||
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
NULL, NULL, ref ? ref : default_referral, NULL );
|
||||
|
||||
bvarray_free( ref );
|
||||
ber_bvarray_free( ref );
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -357,15 +357,15 @@ do_modrdn(
|
|||
}
|
||||
#ifndef SLAPD_MULTIMASTER
|
||||
} else {
|
||||
BVarray defref = be->be_update_refs
|
||||
BerVarray defref = be->be_update_refs
|
||||
? be->be_update_refs : default_referral;
|
||||
BVarray ref = referral_rewrite( defref,
|
||||
BerVarray ref = referral_rewrite( defref,
|
||||
NULL, &pdn, LDAP_SCOPE_DEFAULT );
|
||||
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL, NULL, NULL,
|
||||
ref ? ref : defref, NULL );
|
||||
|
||||
bvarray_free( ref );
|
||||
ber_bvarray_free( ref );
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ slap_mod_free(
|
|||
free( mod->sm_type.bv_val );
|
||||
#endif
|
||||
if ( mod->sm_bvalues != NULL )
|
||||
bvarray_free( mod->sm_bvalues );
|
||||
ber_bvarray_free( mod->sm_bvalues );
|
||||
|
||||
if( freeit )
|
||||
free( mod );
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ int passwd_extop(
|
|||
struct berval **rspdata,
|
||||
LDAPControl ***rspctrls,
|
||||
const char **text,
|
||||
BVarray *refs )
|
||||
BerVarray *refs )
|
||||
{
|
||||
int rc;
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ LDAP_SLAPD_F (Attribute *) attr_dup LDAP_P(( Attribute *a ));
|
|||
|
||||
LDAP_SLAPD_F (int) attr_merge LDAP_P(( Entry *e,
|
||||
AttributeDescription *desc,
|
||||
BVarray vals ));
|
||||
BerVarray vals ));
|
||||
LDAP_SLAPD_F (Attribute *) attrs_find LDAP_P((
|
||||
Attribute *a, AttributeDescription *desc ));
|
||||
LDAP_SLAPD_F (Attribute *) attr_find LDAP_P((
|
||||
|
|
@ -221,7 +221,7 @@ LDAP_SLAPD_F (int) backend_attribute LDAP_P((BackendDB *be,
|
|||
Entry *target,
|
||||
struct berval *entry_ndn,
|
||||
AttributeDescription *entry_at,
|
||||
BVarray *vals
|
||||
BerVarray *vals
|
||||
));
|
||||
|
||||
LDAP_SLAPD_F (Attribute *) backend_operational(
|
||||
|
|
@ -278,9 +278,6 @@ LDAP_SLAPD_F (char **) str2charray LDAP_P(( const char *str, const char *brkstr
|
|||
LDAP_SLAPD_F (int) charray_strcmp LDAP_P(( const char **a1, const char **a2 ));
|
||||
LDAP_SLAPD_F (int) charray_strcasecmp LDAP_P(( const char **a1, const char **a2 ));
|
||||
|
||||
LDAP_SLAPD_F (int) bvarray_add LDAP_P(( BVarray *a, struct berval *bv ));
|
||||
LDAP_SLAPD_F (void) bvarray_free LDAP_P(( struct berval *a ));
|
||||
|
||||
LDAP_SLAPD_F (char *) slap_strcopy LDAP_P((
|
||||
char *dst, const char *src ));
|
||||
LDAP_SLAPD_F (char *) slap_strncopy LDAP_P((
|
||||
|
|
@ -448,7 +445,7 @@ typedef int (SLAP_EXTOP_MAIN_FN) LDAP_P((
|
|||
struct berval ** rspdata,
|
||||
LDAPControl *** rspctrls,
|
||||
const char ** text,
|
||||
BVarray *refs ));
|
||||
BerVarray *refs ));
|
||||
|
||||
typedef int (SLAP_EXTOP_GETOID_FN) LDAP_P((
|
||||
int index, char *oid, int blen ));
|
||||
|
|
@ -616,11 +613,11 @@ LDAP_SLAPD_F (void) replog LDAP_P(( Backend *be, Operation *op,
|
|||
LDAP_SLAPD_F (int) validate_global_referral LDAP_P((
|
||||
const char *url ));
|
||||
|
||||
LDAP_SLAPD_F (BVarray) get_entry_referrals LDAP_P((
|
||||
LDAP_SLAPD_F (BerVarray) get_entry_referrals LDAP_P((
|
||||
Backend *be, Connection *conn, Operation *op, Entry *e ));
|
||||
|
||||
LDAP_SLAPD_F (BVarray) referral_rewrite LDAP_P((
|
||||
BVarray refs,
|
||||
LDAP_SLAPD_F (BerVarray) referral_rewrite LDAP_P((
|
||||
BerVarray refs,
|
||||
struct berval *base,
|
||||
struct berval *target,
|
||||
int scope ));
|
||||
|
|
@ -632,14 +629,14 @@ LDAP_SLAPD_F (BVarray) referral_rewrite LDAP_P((
|
|||
LDAP_SLAPD_F (void) send_ldap_result LDAP_P((
|
||||
Connection *conn, Operation *op,
|
||||
ber_int_t err, const char *matched, const char *text,
|
||||
BVarray refs,
|
||||
BerVarray refs,
|
||||
LDAPControl **ctrls ));
|
||||
|
||||
LDAP_SLAPD_F (void) send_ldap_sasl LDAP_P((
|
||||
Connection *conn, Operation *op,
|
||||
ber_int_t err, const char *matched,
|
||||
const char *text,
|
||||
BVarray refs,
|
||||
BerVarray refs,
|
||||
LDAPControl **ctrls,
|
||||
struct berval *cred ));
|
||||
|
||||
|
|
@ -650,7 +647,7 @@ LDAP_SLAPD_F (void) send_ldap_disconnect LDAP_P((
|
|||
LDAP_SLAPD_F (void) send_ldap_extended LDAP_P((
|
||||
Connection *conn, Operation *op,
|
||||
ber_int_t err, const char *matched,
|
||||
const char *text, BVarray refs,
|
||||
const char *text, BerVarray refs,
|
||||
const char *rspoid, struct berval *rspdata,
|
||||
LDAPControl **ctrls ));
|
||||
|
||||
|
|
@ -662,15 +659,15 @@ LDAP_SLAPD_F (void) send_ldap_partial LDAP_P((
|
|||
LDAP_SLAPD_F (void) send_search_result LDAP_P((
|
||||
Connection *conn, Operation *op,
|
||||
ber_int_t err, const char *matched, const char *text,
|
||||
BVarray refs,
|
||||
BerVarray refs,
|
||||
LDAPControl **ctrls,
|
||||
int nentries ));
|
||||
|
||||
LDAP_SLAPD_F (int) send_search_reference LDAP_P((
|
||||
Backend *be, Connection *conn, Operation *op,
|
||||
Entry *e, BVarray refs,
|
||||
Entry *e, BerVarray refs,
|
||||
LDAPControl **ctrls,
|
||||
BVarray *v2refs ));
|
||||
BerVarray *v2refs ));
|
||||
|
||||
LDAP_SLAPD_F (int) send_search_entry LDAP_P((
|
||||
Backend *be, Connection *conn, Operation *op,
|
||||
|
|
@ -822,11 +819,11 @@ LDAP_SLAPD_F (int) is_entry_objectclass LDAP_P((
|
|||
*/
|
||||
LDAP_SLAPD_F( int ) oc_check_allowed(
|
||||
AttributeType *type,
|
||||
BVarray oclist,
|
||||
BerVarray oclist,
|
||||
ObjectClass *sc );
|
||||
|
||||
LDAP_SLAPD_F( int ) structural_class(
|
||||
BVarray ocs,
|
||||
BerVarray ocs,
|
||||
struct berval *scbv,
|
||||
ObjectClass **sc,
|
||||
const char **text,
|
||||
|
|
@ -907,11 +904,11 @@ LDAP_SLAPD_F (int) value_match LDAP_P((
|
|||
LDAP_SLAPD_F (int) value_find_ex LDAP_P((
|
||||
AttributeDescription *ad,
|
||||
unsigned flags,
|
||||
BVarray values,
|
||||
BerVarray values,
|
||||
struct berval *value ));
|
||||
LDAP_SLAPD_F (int) value_add LDAP_P((
|
||||
BVarray *vals,
|
||||
BVarray addvals ));
|
||||
BerVarray *vals,
|
||||
BerVarray addvals ));
|
||||
|
||||
/*
|
||||
* user.c
|
||||
|
|
@ -977,7 +974,7 @@ LDAP_SLAPD_V (slap_mask_t) global_disallows;
|
|||
LDAP_SLAPD_V (slap_mask_t) global_requires;
|
||||
LDAP_SLAPD_V (slap_ssf_set_t) global_ssf_set;
|
||||
|
||||
LDAP_SLAPD_V (BVarray) default_referral;
|
||||
LDAP_SLAPD_V (BerVarray) default_referral;
|
||||
LDAP_SLAPD_V (char *) replogfile;
|
||||
LDAP_SLAPD_V (const char) Versionstr[];
|
||||
LDAP_SLAPD_V (struct slap_limits_set) deflimit;
|
||||
|
|
|
|||
|
|
@ -213,14 +213,14 @@ int validate_global_referral( const char *url )
|
|||
return rc;
|
||||
}
|
||||
|
||||
BVarray referral_rewrite(
|
||||
BVarray in,
|
||||
BerVarray referral_rewrite(
|
||||
BerVarray in,
|
||||
struct berval *base,
|
||||
struct berval *target,
|
||||
int scope )
|
||||
{
|
||||
int i;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
struct berval *iv, *jv;
|
||||
|
||||
if( in == NULL ) return NULL;
|
||||
|
|
@ -278,14 +278,14 @@ BVarray referral_rewrite(
|
|||
}
|
||||
|
||||
|
||||
BVarray get_entry_referrals(
|
||||
BerVarray get_entry_referrals(
|
||||
Backend *be,
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
Entry *e )
|
||||
{
|
||||
Attribute *attr;
|
||||
BVarray refs;
|
||||
BerVarray refs;
|
||||
unsigned i;
|
||||
struct berval *iv, *jv;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "slap.h"
|
||||
|
||||
static char *v2ref( BVarray ref, const char *text )
|
||||
static char *v2ref( BerVarray ref, const char *text )
|
||||
{
|
||||
size_t len = 0, i = 0;
|
||||
char *v2;
|
||||
|
|
@ -175,7 +175,7 @@ send_ldap_response(
|
|||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BVarray ref,
|
||||
BerVarray ref,
|
||||
const char *resoid,
|
||||
struct berval *resdata,
|
||||
struct berval *sasldata,
|
||||
|
|
@ -381,7 +381,7 @@ send_ldap_result(
|
|||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BVarray ref,
|
||||
BerVarray ref,
|
||||
LDAPControl **ctrls
|
||||
)
|
||||
{
|
||||
|
|
@ -465,7 +465,7 @@ send_ldap_sasl(
|
|||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BVarray ref,
|
||||
BerVarray ref,
|
||||
LDAPControl **ctrls,
|
||||
struct berval *cred
|
||||
)
|
||||
|
|
@ -498,7 +498,7 @@ send_ldap_extended(
|
|||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BVarray refs,
|
||||
BerVarray refs,
|
||||
const char *rspoid,
|
||||
struct berval *rspdata,
|
||||
LDAPControl **ctrls
|
||||
|
|
@ -537,7 +537,7 @@ send_search_result(
|
|||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BVarray refs,
|
||||
BerVarray refs,
|
||||
LDAPControl **ctrls,
|
||||
int nentries
|
||||
)
|
||||
|
|
@ -1002,9 +1002,9 @@ send_search_reference(
|
|||
Connection *conn,
|
||||
Operation *op,
|
||||
Entry *e,
|
||||
BVarray refs,
|
||||
BerVarray refs,
|
||||
LDAPControl **ctrls,
|
||||
BVarray *v2refs
|
||||
BerVarray *v2refs
|
||||
)
|
||||
{
|
||||
char berbuf[256];
|
||||
|
|
|
|||
|
|
@ -286,13 +286,13 @@ char *slap_sasl_regexp( char *saslname )
|
|||
/* Two empty callback functions to avoid sending results */
|
||||
static void sasl_sc_r( Connection *conn, Operation *o, ber_tag_t tag,
|
||||
ber_int_t msgid, ber_int_t err, const char *matched,
|
||||
const char *text, BVarray ref, const char *resoid,
|
||||
const char *text, BerVarray ref, const char *resoid,
|
||||
struct berval *resdata, struct berval *sasldata, LDAPControl **c)
|
||||
{
|
||||
}
|
||||
|
||||
static void sasl_sc_s( Connection *conn, Operation *o, ber_int_t err,
|
||||
const char *matched, const char *text, BVarray refs, LDAPControl **c,
|
||||
const char *matched, const char *text, BerVarray refs, LDAPControl **c,
|
||||
int nentries)
|
||||
{
|
||||
}
|
||||
|
|
@ -550,7 +550,7 @@ slap_sasl_check_authz(char *searchDN, char *assertDN, struct berval *attr, char
|
|||
{
|
||||
const char *errmsg;
|
||||
int i, rc;
|
||||
BVarray vals=NULL;
|
||||
BerVarray vals=NULL;
|
||||
AttributeDescription *ad=NULL;
|
||||
struct berval bv;
|
||||
|
||||
|
|
@ -585,7 +585,7 @@ slap_sasl_check_authz(char *searchDN, char *assertDN, struct berval *attr, char
|
|||
rc = LDAP_INAPPROPRIATE_AUTH;
|
||||
|
||||
COMPLETE:
|
||||
if( vals ) bvarray_free( vals );
|
||||
if( vals ) ber_bvarray_free( vals );
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ oc_check_required(
|
|||
|
||||
int oc_check_allowed(
|
||||
AttributeType *at,
|
||||
BVarray ocl,
|
||||
BerVarray ocl,
|
||||
ObjectClass *sc )
|
||||
{
|
||||
int i, j;
|
||||
|
|
@ -475,7 +475,7 @@ int oc_check_allowed(
|
|||
* Determine the structural object class from a set of OIDs
|
||||
*/
|
||||
int structural_class(
|
||||
BVarray ocs,
|
||||
BerVarray ocs,
|
||||
struct berval *scbv,
|
||||
ObjectClass **scp,
|
||||
const char **text,
|
||||
|
|
|
|||
|
|
@ -123,12 +123,12 @@ static int octetStringIndexer(
|
|||
Syntax *syntax,
|
||||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
BVarray values,
|
||||
BVarray *keysp )
|
||||
BerVarray values,
|
||||
BerVarray *keysp )
|
||||
{
|
||||
int i;
|
||||
size_t slen, mlen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval digest;
|
||||
|
|
@ -179,10 +179,10 @@ static int octetStringFilter(
|
|||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
void * assertValue,
|
||||
BVarray *keysp )
|
||||
BerVarray *keysp )
|
||||
{
|
||||
size_t slen, mlen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval *value = (struct berval *) assertValue;
|
||||
|
|
@ -612,7 +612,7 @@ UTF8SubstringsassertionNormalize(
|
|||
|
||||
err:
|
||||
if ( nsa->sa_final.bv_val ) free( nsa->sa_final.bv_val );
|
||||
if ( nsa->sa_any )bvarray_free( nsa->sa_any );
|
||||
if ( nsa->sa_any )ber_bvarray_free( nsa->sa_any );
|
||||
if ( nsa->sa_initial.bv_val ) free( nsa->sa_initial.bv_val );
|
||||
ch_free( nsa );
|
||||
return NULL;
|
||||
|
|
@ -771,13 +771,13 @@ approxIndexer(
|
|||
Syntax *syntax,
|
||||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
BVarray values,
|
||||
BVarray *keysp )
|
||||
BerVarray values,
|
||||
BerVarray *keysp )
|
||||
{
|
||||
char *val, *c;
|
||||
int i,j, len, wordcount, keycount=0;
|
||||
struct berval *newkeys;
|
||||
BVarray keys=NULL;
|
||||
BerVarray keys=NULL;
|
||||
|
||||
for( j=0; values[j].bv_val != NULL; j++ ) {
|
||||
/* Yes, this is necessary */
|
||||
|
|
@ -825,11 +825,11 @@ approxFilter(
|
|||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
void * assertValue,
|
||||
BVarray *keysp )
|
||||
BerVarray *keysp )
|
||||
{
|
||||
char *val, *c;
|
||||
int i, count, len;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
|
||||
/* Yes, this is necessary */
|
||||
val = UTF8normalize( ((struct berval *)assertValue),
|
||||
|
|
@ -923,11 +923,11 @@ approxIndexer(
|
|||
Syntax *syntax,
|
||||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
BVarray values,
|
||||
BVarray *keysp )
|
||||
BerVarray values,
|
||||
BerVarray *keysp )
|
||||
{
|
||||
int i;
|
||||
BVarray *keys;
|
||||
BerVarray *keys;
|
||||
char *s;
|
||||
|
||||
for( i=0; values[i].bv_val != NULL; i++ ) {
|
||||
|
|
@ -963,9 +963,9 @@ approxFilter(
|
|||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
void * assertValue,
|
||||
BVarray *keysp )
|
||||
BerVarray *keysp )
|
||||
{
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
char *s;
|
||||
|
||||
keys = (struct berval *)ch_malloc( sizeof( struct berval * ) * 2 );
|
||||
|
|
@ -1118,7 +1118,7 @@ retry:
|
|||
if ( sub->sa_final.bv_val )
|
||||
ch_free( sub->sa_final.bv_val );
|
||||
if ( sub->sa_any )
|
||||
bvarray_free( sub->sa_any );
|
||||
ber_bvarray_free( sub->sa_any );
|
||||
if ( sub->sa_initial.bv_val )
|
||||
ch_free( sub->sa_initial.bv_val );
|
||||
ch_free( sub );
|
||||
|
|
@ -1154,7 +1154,7 @@ done:
|
|||
free( nav );
|
||||
if( sub != NULL ) {
|
||||
if ( sub->sa_final.bv_val ) free( sub->sa_final.bv_val );
|
||||
if ( sub->sa_any ) bvarray_free( sub->sa_any );
|
||||
if ( sub->sa_any ) ber_bvarray_free( sub->sa_any );
|
||||
if ( sub->sa_initial.bv_val ) free( sub->sa_initial.bv_val );
|
||||
ch_free( sub );
|
||||
}
|
||||
|
|
@ -1169,13 +1169,13 @@ static int caseExactIgnoreIndexer(
|
|||
Syntax *syntax,
|
||||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
BVarray values,
|
||||
BVarray *keysp )
|
||||
BerVarray values,
|
||||
BerVarray *keysp )
|
||||
{
|
||||
int i;
|
||||
unsigned casefold;
|
||||
size_t slen, mlen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval digest;
|
||||
|
|
@ -1233,11 +1233,11 @@ static int caseExactIgnoreFilter(
|
|||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
void * assertValue,
|
||||
BVarray *keysp )
|
||||
BerVarray *keysp )
|
||||
{
|
||||
unsigned casefold;
|
||||
size_t slen, mlen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval value;
|
||||
|
|
@ -1291,14 +1291,14 @@ static int caseExactIgnoreSubstringsIndexer(
|
|||
Syntax *syntax,
|
||||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
BVarray values,
|
||||
BVarray *keysp )
|
||||
BerVarray values,
|
||||
BerVarray *keysp )
|
||||
{
|
||||
unsigned casefold;
|
||||
ber_len_t i, nkeys;
|
||||
size_t slen, mlen;
|
||||
BVarray keys;
|
||||
BVarray nvalues;
|
||||
BerVarray keys;
|
||||
BerVarray nvalues;
|
||||
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
|
|
@ -1360,7 +1360,7 @@ static int caseExactIgnoreSubstringsIndexer(
|
|||
if( nkeys == 0 ) {
|
||||
/* no keys to generate */
|
||||
*keysp = NULL;
|
||||
bvarray_free( nvalues );
|
||||
ber_bvarray_free( nvalues );
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
@ -1461,7 +1461,7 @@ static int caseExactIgnoreSubstringsIndexer(
|
|||
*keysp = NULL;
|
||||
}
|
||||
|
||||
bvarray_free( nvalues );
|
||||
ber_bvarray_free( nvalues );
|
||||
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
|
@ -1473,14 +1473,14 @@ static int caseExactIgnoreSubstringsFilter(
|
|||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
void * assertValue,
|
||||
BVarray *keysp )
|
||||
BerVarray *keysp )
|
||||
{
|
||||
SubstringsAssertion *sa;
|
||||
char pre;
|
||||
unsigned casefold;
|
||||
ber_len_t nkeys = 0;
|
||||
size_t slen, mlen, klen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval *value;
|
||||
|
|
@ -1520,7 +1520,7 @@ static int caseExactIgnoreSubstringsFilter(
|
|||
|
||||
if( nkeys == 0 ) {
|
||||
if ( sa->sa_final.bv_val ) free( sa->sa_final.bv_val );
|
||||
if ( sa->sa_any ) bvarray_free( sa->sa_any );
|
||||
if ( sa->sa_any ) ber_bvarray_free( sa->sa_any );
|
||||
if ( sa->sa_initial.bv_val ) free( sa->sa_initial.bv_val );
|
||||
ch_free( sa );
|
||||
*keysp = NULL;
|
||||
|
|
@ -1635,7 +1635,7 @@ static int caseExactIgnoreSubstringsFilter(
|
|||
*keysp = NULL;
|
||||
}
|
||||
if ( sa->sa_final.bv_val ) free( sa->sa_final.bv_val );
|
||||
if ( sa->sa_any ) bvarray_free( sa->sa_any );
|
||||
if ( sa->sa_any ) ber_bvarray_free( sa->sa_any );
|
||||
if ( sa->sa_initial.bv_val ) free( sa->sa_initial.bv_val );
|
||||
ch_free( sa );
|
||||
|
||||
|
|
@ -1870,11 +1870,11 @@ static int integerIndexer(
|
|||
Syntax *syntax,
|
||||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
BVarray values,
|
||||
BVarray *keysp )
|
||||
BerVarray values,
|
||||
BerVarray *keysp )
|
||||
{
|
||||
int i;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
|
||||
/* we should have at least one value at this point */
|
||||
assert( values != NULL && values[0].bv_val != NULL );
|
||||
|
|
@ -1902,9 +1902,9 @@ static int integerFilter(
|
|||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
void * assertValue,
|
||||
BVarray *keysp )
|
||||
BerVarray *keysp )
|
||||
{
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
|
||||
keys = ch_malloc( sizeof( struct berval ) * 2 );
|
||||
integerNormalize( syntax, assertValue, &keys[0] );
|
||||
|
|
@ -2185,12 +2185,12 @@ static int caseExactIA5Indexer(
|
|||
Syntax *syntax,
|
||||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
BVarray values,
|
||||
BVarray *keysp )
|
||||
BerVarray values,
|
||||
BerVarray *keysp )
|
||||
{
|
||||
int i;
|
||||
size_t slen, mlen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval digest;
|
||||
|
|
@ -2241,10 +2241,10 @@ static int caseExactIA5Filter(
|
|||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
void * assertValue,
|
||||
BVarray *keysp )
|
||||
BerVarray *keysp )
|
||||
{
|
||||
size_t slen, mlen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval *value;
|
||||
|
|
@ -2286,12 +2286,12 @@ static int caseExactIA5SubstringsIndexer(
|
|||
Syntax *syntax,
|
||||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
BVarray values,
|
||||
BVarray *keysp )
|
||||
BerVarray values,
|
||||
BerVarray *keysp )
|
||||
{
|
||||
ber_len_t i, nkeys;
|
||||
size_t slen, mlen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval digest;
|
||||
|
|
@ -2447,13 +2447,13 @@ static int caseExactIA5SubstringsFilter(
|
|||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
void * assertValue,
|
||||
BVarray *keysp )
|
||||
BerVarray *keysp )
|
||||
{
|
||||
SubstringsAssertion *sa = assertValue;
|
||||
char pre;
|
||||
ber_len_t nkeys = 0;
|
||||
size_t slen, mlen, klen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval *value;
|
||||
|
|
@ -2751,12 +2751,12 @@ static int caseIgnoreIA5Indexer(
|
|||
Syntax *syntax,
|
||||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
BVarray values,
|
||||
BVarray *keysp )
|
||||
BerVarray values,
|
||||
BerVarray *keysp )
|
||||
{
|
||||
int i;
|
||||
size_t slen, mlen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval digest;
|
||||
|
|
@ -2811,10 +2811,10 @@ static int caseIgnoreIA5Filter(
|
|||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
void * assertValue,
|
||||
BVarray *keysp )
|
||||
BerVarray *keysp )
|
||||
{
|
||||
size_t slen, mlen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval value;
|
||||
|
|
@ -2860,12 +2860,12 @@ static int caseIgnoreIA5SubstringsIndexer(
|
|||
Syntax *syntax,
|
||||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
BVarray values,
|
||||
BVarray *keysp )
|
||||
BerVarray values,
|
||||
BerVarray *keysp )
|
||||
{
|
||||
ber_len_t i, nkeys;
|
||||
size_t slen, mlen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval digest;
|
||||
|
|
@ -3025,13 +3025,13 @@ static int caseIgnoreIA5SubstringsFilter(
|
|||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
void * assertValue,
|
||||
BVarray *keysp )
|
||||
BerVarray *keysp )
|
||||
{
|
||||
SubstringsAssertion *sa = assertValue;
|
||||
char pre;
|
||||
ber_len_t nkeys = 0;
|
||||
size_t slen, mlen, klen;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
HASH_CONTEXT HASHcontext;
|
||||
unsigned char HASHdigest[HASH_BYTES];
|
||||
struct berval value;
|
||||
|
|
@ -3684,11 +3684,11 @@ static int certificateExactIndexer(
|
|||
Syntax *syntax,
|
||||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
BVarray values,
|
||||
BVarray *keysp )
|
||||
BerVarray values,
|
||||
BerVarray *keysp )
|
||||
{
|
||||
int i;
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
X509 *xcert;
|
||||
unsigned char *p;
|
||||
struct berval * serial;
|
||||
|
|
@ -3752,9 +3752,9 @@ static int certificateExactFilter(
|
|||
MatchingRule *mr,
|
||||
struct berval *prefix,
|
||||
void * assertValue,
|
||||
BVarray *keysp )
|
||||
BerVarray *keysp )
|
||||
{
|
||||
BVarray keys;
|
||||
BerVarray keys;
|
||||
struct berval *asserted_serial;
|
||||
struct berval *asserted_issuer_dn;
|
||||
|
||||
|
|
|
|||
|
|
@ -283,13 +283,13 @@ do_search(
|
|||
* if we don't hold it.
|
||||
*/
|
||||
if ( (be = select_backend( &nbase, manageDSAit, 1 )) == NULL ) {
|
||||
BVarray ref = referral_rewrite( default_referral,
|
||||
BerVarray ref = referral_rewrite( default_referral,
|
||||
NULL, &pbase, scope );
|
||||
|
||||
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
|
||||
NULL, NULL, ref ? ref : default_referral, NULL );
|
||||
|
||||
bvarray_free( ref );
|
||||
ber_bvarray_free( ref );
|
||||
goto return_results;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@
|
|||
#include "slap.h"
|
||||
#include "sets.h"
|
||||
|
||||
static BVarray set_join (BVarray lset, int op, BVarray rset);
|
||||
static BVarray set_chase (SLAP_SET_GATHER gatherer,
|
||||
void *cookie, BVarray set, struct berval *attr, int closure);
|
||||
static BerVarray set_join (BerVarray lset, int op, BerVarray rset);
|
||||
static BerVarray set_chase (SLAP_SET_GATHER gatherer,
|
||||
void *cookie, BerVarray set, struct berval *attr, int closure);
|
||||
static int set_samedn (char *dn1, char *dn2);
|
||||
|
||||
long
|
||||
slap_set_size (BVarray set)
|
||||
slap_set_size (BerVarray set)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -31,15 +31,15 @@ slap_set_size (BVarray set)
|
|||
}
|
||||
|
||||
void
|
||||
slap_set_dispose (BVarray set)
|
||||
slap_set_dispose (BerVarray set)
|
||||
{
|
||||
bvarray_free(set);
|
||||
ber_bvarray_free(set);
|
||||
}
|
||||
|
||||
static BVarray
|
||||
set_join (BVarray lset, int op, BVarray rset)
|
||||
static BerVarray
|
||||
set_join (BerVarray lset, int op, BerVarray rset)
|
||||
{
|
||||
BVarray set;
|
||||
BerVarray set;
|
||||
long i, j, last;
|
||||
|
||||
set = NULL;
|
||||
|
|
@ -113,11 +113,11 @@ set_join (BVarray lset, int op, BVarray rset)
|
|||
return(set);
|
||||
}
|
||||
|
||||
static BVarray
|
||||
static BerVarray
|
||||
set_chase (SLAP_SET_GATHER gatherer,
|
||||
void *cookie, BVarray set, struct berval *attr, int closure)
|
||||
void *cookie, BerVarray set, struct berval *attr, int closure)
|
||||
{
|
||||
BVarray vals, nset;
|
||||
BerVarray vals, nset;
|
||||
char attrstr[32];
|
||||
struct berval bv = {attr->bv_len, attrstr};
|
||||
int i;
|
||||
|
|
@ -194,20 +194,20 @@ set_samedn (char *dn1, char *dn2)
|
|||
int
|
||||
slap_set_filter (SLAP_SET_GATHER gatherer,
|
||||
void *cookie, struct berval *fbv,
|
||||
char *user, char *this, BVarray *results)
|
||||
char *user, char *this, BerVarray *results)
|
||||
{
|
||||
#define IS_SET(x) ( (long)(x) >= 256 )
|
||||
#define IS_OP(x) ( (long)(x) < 256 )
|
||||
#define SF_ERROR(x) do { rc = -1; goto _error; } while (0)
|
||||
#define SF_TOP() ( (BVarray)( (stp < 0) ? 0 : stack[stp] ) )
|
||||
#define SF_POP() ( (BVarray)( (stp < 0) ? 0 : stack[stp--] ) )
|
||||
#define SF_TOP() ( (BerVarray)( (stp < 0) ? 0 : stack[stp] ) )
|
||||
#define SF_POP() ( (BerVarray)( (stp < 0) ? 0 : stack[stp--] ) )
|
||||
#define SF_PUSH(x) do { \
|
||||
if (stp >= 63) SF_ERROR(overflow); \
|
||||
stack[++stp] = (BVarray)(long)(x); \
|
||||
stack[++stp] = (BerVarray)(long)(x); \
|
||||
} while (0)
|
||||
|
||||
BVarray set, lset;
|
||||
BVarray stack[64];
|
||||
BerVarray set, lset;
|
||||
BerVarray stack[64];
|
||||
int len, op, rc, stp;
|
||||
char c, *filter = fbv->bv_val;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@
|
|||
* also return the syntax or some "comparison cookie"
|
||||
* that is used by set_filter.
|
||||
*/
|
||||
typedef BVarray (SLAP_SET_GATHER)(
|
||||
typedef BerVarray (SLAP_SET_GATHER)(
|
||||
void *cookie, char *name, struct berval *attr);
|
||||
|
||||
LDAP_SLAPD_F (long) slap_set_size (BVarray set);
|
||||
LDAP_SLAPD_F (void) slap_set_dispose (BVarray set);
|
||||
LDAP_SLAPD_F (long) slap_set_size (BerVarray set);
|
||||
LDAP_SLAPD_F (void) slap_set_dispose (BerVarray set);
|
||||
|
||||
LDAP_SLAPD_F (int)
|
||||
slap_set_filter (SLAP_SET_GATHER gatherer,
|
||||
void *cookie, struct berval *filter,
|
||||
char *user, char *this, BVarray *results);
|
||||
char *user, char *this, BerVarray *results);
|
||||
|
||||
|
|
|
|||
|
|
@ -329,8 +329,8 @@ typedef int slap_mr_indexer_func LDAP_P((
|
|||
struct slap_syntax *syntax, /* syntax of stored value */
|
||||
struct slap_matching_rule *mr,
|
||||
struct berval *prefix,
|
||||
BVarray values,
|
||||
BVarray *keys ));
|
||||
BerVarray values,
|
||||
BerVarray *keys ));
|
||||
|
||||
/* Filter index function */
|
||||
typedef int slap_mr_filter_func LDAP_P((
|
||||
|
|
@ -340,7 +340,7 @@ typedef int slap_mr_filter_func LDAP_P((
|
|||
struct slap_matching_rule *mr,
|
||||
struct berval *prefix,
|
||||
void * assertValue,
|
||||
BVarray *keys ));
|
||||
BerVarray *keys ));
|
||||
|
||||
typedef struct slap_matching_rule {
|
||||
LDAPMatchingRule smr_mrule;
|
||||
|
|
@ -714,7 +714,7 @@ typedef struct slap_filter {
|
|||
*/
|
||||
typedef struct slap_attr {
|
||||
AttributeDescription *a_desc;
|
||||
BVarray a_vals;
|
||||
BerVarray a_vals;
|
||||
struct slap_attr *a_next;
|
||||
unsigned a_flags;
|
||||
#define SLAP_ATTR_IXADD 0x1U
|
||||
|
|
@ -759,7 +759,7 @@ typedef struct slap_mod {
|
|||
int sm_op;
|
||||
AttributeDescription *sm_desc;
|
||||
struct berval sm_type;
|
||||
BVarray sm_bvalues;
|
||||
BerVarray sm_bvalues;
|
||||
} Modification;
|
||||
|
||||
typedef struct slap_mod_list {
|
||||
|
|
@ -1122,7 +1122,7 @@ struct slap_backend_db {
|
|||
struct slap_replica_info **be_replica; /* replicas of this backend (in master) */
|
||||
char *be_replogfile; /* replication log file (in master) */
|
||||
struct berval be_update_ndn; /* allowed to make changes (in replicas) */
|
||||
BVarray be_update_refs; /* where to refer modifying clients to */
|
||||
BerVarray be_update_refs; /* where to refer modifying clients to */
|
||||
char *be_realm;
|
||||
|
||||
void *be_private; /* anything the backend database needs */
|
||||
|
|
@ -1195,7 +1195,7 @@ typedef int (BI_op_extended) LDAP_P((
|
|||
struct berval ** rspdata,
|
||||
LDAPControl *** rspctrls,
|
||||
const char ** text,
|
||||
BVarray *refs ));
|
||||
BerVarray *refs ));
|
||||
|
||||
typedef int (BI_entry_release_rw) LDAP_P((BackendDB *bd,
|
||||
struct slap_conn *c, struct slap_op *o,
|
||||
|
|
@ -1218,7 +1218,7 @@ typedef int (BI_acl_attribute) LDAP_P((Backend *bd,
|
|||
struct slap_conn *c, struct slap_op *o,
|
||||
Entry *e, struct berval *edn,
|
||||
AttributeDescription *entry_at,
|
||||
BVarray *vals ));
|
||||
BerVarray *vals ));
|
||||
|
||||
typedef int (BI_operational) LDAP_P((Backend *bd,
|
||||
struct slap_conn *c, struct slap_op *o,
|
||||
|
|
@ -1363,11 +1363,11 @@ struct slap_conn;
|
|||
|
||||
typedef void (slap_response)( struct slap_conn *, struct slap_op *,
|
||||
ber_tag_t, ber_int_t, ber_int_t, const char *, const char *,
|
||||
BVarray, const char *, struct berval *,
|
||||
BerVarray, const char *, struct berval *,
|
||||
struct berval *, LDAPControl ** );
|
||||
|
||||
typedef void (slap_sresult)( struct slap_conn *, struct slap_op *,
|
||||
ber_int_t, const char *, const char *, BVarray,
|
||||
ber_int_t, const char *, const char *, BerVarray,
|
||||
LDAPControl **, int nentries);
|
||||
|
||||
typedef int (slap_sendentry)( BackendDB *, struct slap_conn *,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ starttls_extop (
|
|||
struct berval ** rspdata,
|
||||
LDAPControl ***rspctrls,
|
||||
const char ** text,
|
||||
BVarray * refs )
|
||||
BerVarray * refs )
|
||||
{
|
||||
void *ctx;
|
||||
int rc;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ send_ldap_extended(
|
|||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BVarray refs,
|
||||
BerVarray refs,
|
||||
const char *rspoid,
|
||||
struct berval *rspdata,
|
||||
LDAPControl **ctrls
|
||||
|
|
@ -65,7 +65,7 @@ send_ldap_sasl(
|
|||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BVarray refs,
|
||||
BerVarray refs,
|
||||
LDAPControl **ctrls,
|
||||
struct berval *cred
|
||||
)
|
||||
|
|
@ -80,7 +80,7 @@ send_ldap_result(
|
|||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BVarray refs,
|
||||
BerVarray refs,
|
||||
LDAPControl **ctrls
|
||||
)
|
||||
{
|
||||
|
|
@ -94,7 +94,7 @@ send_search_result(
|
|||
ber_int_t err,
|
||||
const char *matched,
|
||||
const char *text,
|
||||
BVarray refs,
|
||||
BerVarray refs,
|
||||
LDAPControl **ctrls,
|
||||
int nentries
|
||||
)
|
||||
|
|
@ -122,9 +122,9 @@ int send_search_reference(
|
|||
Connection *conn,
|
||||
Operation *op,
|
||||
Entry *e,
|
||||
BVarray refs,
|
||||
BerVarray refs,
|
||||
LDAPControl **ctrls,
|
||||
BVarray *v2refs
|
||||
BerVarray *v2refs
|
||||
)
|
||||
{
|
||||
assert(0);
|
||||
|
|
|
|||
|
|
@ -20,25 +20,25 @@
|
|||
|
||||
int
|
||||
value_add(
|
||||
BVarray *vals,
|
||||
BVarray addvals
|
||||
BerVarray *vals,
|
||||
BerVarray addvals
|
||||
)
|
||||
{
|
||||
int n, nn;
|
||||
BVarray v2;
|
||||
BerVarray v2;
|
||||
|
||||
for ( nn = 0; addvals != NULL && addvals[nn].bv_val != NULL; nn++ )
|
||||
; /* NULL */
|
||||
|
||||
if ( *vals == NULL ) {
|
||||
*vals = (BVarray) ch_malloc( (nn + 1)
|
||||
*vals = (BerVarray) ch_malloc( (nn + 1)
|
||||
* sizeof(struct berval) );
|
||||
n = 0;
|
||||
} else {
|
||||
for ( n = 0; (*vals)[n].bv_val != NULL; n++ ) {
|
||||
; /* Empty */
|
||||
}
|
||||
*vals = (BVarray) ch_realloc( (char *) *vals,
|
||||
*vals = (BerVarray) ch_realloc( (char *) *vals,
|
||||
(n + nn + 1) * sizeof(struct berval) );
|
||||
}
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ value_match(
|
|||
int value_find_ex(
|
||||
AttributeDescription *ad,
|
||||
unsigned flags,
|
||||
BVarray vals,
|
||||
BerVarray vals,
|
||||
struct berval *val )
|
||||
{
|
||||
int i;
|
||||
|
|
|
|||
Loading…
Reference in a new issue