version 1.108, 2003/04/10 04:21:53
|
version 1.109, 2003/04/10 23:29:29
|
Line 1
|
Line 1
|
/* filter.c - routines for parsing and dealing with filters */ |
/* filter.c - routines for parsing and dealing with filters */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.107 2003/04/09 21:37:00 hyc Exp $ */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.108 2003/04/10 04:21:53 hyc Exp $ */ |
/* |
/* |
* Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved. |
* Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved. |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
Line 426 get_ssa(
|
Line 426 get_ssa(
|
/* validate/normalize using equality matching rule validator! */ |
/* validate/normalize using equality matching rule validator! */ |
rc = asserted_value_validate_normalize( |
rc = asserted_value_validate_normalize( |
ssa.sa_desc, ssa.sa_desc->ad_type->sat_equality, |
ssa.sa_desc, ssa.sa_desc->ad_type->sat_equality, |
usage, &value, &nvalue, text ); |
usage, &value, &nvalue, text, op->o_tmpmemctx ); |
|
|
if( rc != LDAP_SUCCESS ) { |
if( rc != LDAP_SUCCESS ) { |
goto return_error; |
goto return_error; |
Line 448 get_ssa(
|
Line 448 get_ssa(
|
|| ssa.sa_any != NULL |
|| ssa.sa_any != NULL |
|| ssa.sa_final.bv_val != NULL ) |
|| ssa.sa_final.bv_val != NULL ) |
{ |
{ |
free( nvalue.bv_val ); |
sl_free( nvalue.bv_val, op->o_tmpmemctx ); |
goto return_error; |
goto return_error; |
} |
} |
|
|
Line 465 get_ssa(
|
Line 465 get_ssa(
|
#endif |
#endif |
|
|
if ( ssa.sa_final.bv_val != NULL ) { |
if ( ssa.sa_final.bv_val != NULL ) { |
free( nvalue.bv_val ); |
sl_free( nvalue.bv_val, op->o_tmpmemctx ); |
goto return_error; |
goto return_error; |
} |
} |
|
|
#ifdef notyet |
|
ber_bvarray_add_x( &ssa.sa_any, &nvalue, op->o_tmpmemctx ); |
ber_bvarray_add_x( &ssa.sa_any, &nvalue, op->o_tmpmemctx ); |
#else |
|
ber_bvarray_add( &ssa.sa_any, &nvalue ); |
|
#endif |
|
break; |
break; |
|
|
case LDAP_SUBSTRING_FINAL: |
case LDAP_SUBSTRING_FINAL: |
Line 486 get_ssa(
|
Line 482 get_ssa(
|
#endif |
#endif |
|
|
if ( ssa.sa_final.bv_val != NULL ) { |
if ( ssa.sa_final.bv_val != NULL ) { |
free( nvalue.bv_val ); |
sl_free( nvalue.bv_val, op->o_tmpmemctx ); |
goto return_error; |
goto return_error; |
} |
} |
|
|
Line 505 get_ssa(
|
Line 501 get_ssa(
|
#endif |
#endif |
|
|
assert( 0 ); |
assert( 0 ); |
free( nvalue.bv_val ); |
sl_free( nvalue.bv_val, op->o_tmpmemctx ); |
|
|
return_error: |
return_error: |
#ifdef NEW_LOGGING |
#ifdef NEW_LOGGING |
Line 516 return_error:
|
Line 512 return_error:
|
Debug( LDAP_DEBUG_FILTER, " error=%ld\n", |
Debug( LDAP_DEBUG_FILTER, " error=%ld\n", |
(long) rc, 0, 0 ); |
(long) rc, 0, 0 ); |
#endif |
#endif |
free( ssa.sa_initial.bv_val ); |
sl_free( ssa.sa_initial.bv_val, op->o_tmpmemctx ); |
ber_bvarray_free( ssa.sa_any ); |
ber_bvarray_free_x( ssa.sa_any, op->o_tmpmemctx ); |
free( ssa.sa_final.bv_val ); |
sl_free( ssa.sa_final.bv_val, op->o_tmpmemctx ); |
return rc; |
return rc; |
} |
} |
|
|
Line 562 filter_free_x( Operation *op, Filter *f
|
Line 558 filter_free_x( Operation *op, Filter *f
|
|
|
case LDAP_FILTER_SUBSTRINGS: |
case LDAP_FILTER_SUBSTRINGS: |
if ( f->f_sub_initial.bv_val != NULL ) { |
if ( f->f_sub_initial.bv_val != NULL ) { |
#ifdef notyet |
|
op->o_tmpfree( f->f_sub_initial.bv_val, op->o_tmpmemctx ); |
op->o_tmpfree( f->f_sub_initial.bv_val, op->o_tmpmemctx ); |
#else |
|
ch_free( f->f_sub_initial.bv_val ); |
|
#endif |
|
} |
} |
ber_bvarray_free( f->f_sub_any ); |
ber_bvarray_free_x( f->f_sub_any, op->o_tmpmemctx ); |
if ( f->f_sub_final.bv_val != NULL ) { |
if ( f->f_sub_final.bv_val != NULL ) { |
#ifdef notyet |
|
op->o_tmpfree( f->f_sub_final.bv_val, op->o_tmpmemctx ); |
op->o_tmpfree( f->f_sub_final.bv_val, op->o_tmpmemctx ); |
#else |
|
ch_free( f->f_sub_final.bv_val ); |
|
#endif |
|
} |
} |
op->o_tmpfree( f->f_sub, op->o_tmpmemctx ); |
op->o_tmpfree( f->f_sub, op->o_tmpmemctx ); |
break; |
break; |
Line 1150 vrFilter_free( Operation *op, ValuesRetu
|
Line 1138 vrFilter_free( Operation *op, ValuesRetu
|
|
|
case LDAP_FILTER_SUBSTRINGS: |
case LDAP_FILTER_SUBSTRINGS: |
if ( vrf->vrf_sub_initial.bv_val != NULL ) { |
if ( vrf->vrf_sub_initial.bv_val != NULL ) { |
#ifdef notyet |
|
op->o_tmpfree( vrf->vrf_sub_initial.bv_val, op->o_tmpmemctx ); |
op->o_tmpfree( vrf->vrf_sub_initial.bv_val, op->o_tmpmemctx ); |
#else |
|
ch_free( vrf->vrf_sub_initial.bv_val ); |
|
#endif |
|
} |
} |
ber_bvarray_free_x( vrf->vrf_sub_any, op->o_tmpmemctx ); |
ber_bvarray_free_x( vrf->vrf_sub_any, op->o_tmpmemctx ); |
if ( vrf->vrf_sub_final.bv_val != NULL ) { |
if ( vrf->vrf_sub_final.bv_val != NULL ) { |
#ifdef notyet |
|
op->o_tmpfree( vrf->vrf_sub_final.bv_val, op->o_tmpmemctx ); |
op->o_tmpfree( vrf->vrf_sub_final.bv_val, op->o_tmpmemctx ); |
#else |
|
ch_free( vrf->vrf_sub_final.bv_val ); |
|
#endif |
|
} |
} |
op->o_tmpfree( vrf->vrf_sub, op->o_tmpmemctx ); |
op->o_tmpfree( vrf->vrf_sub, op->o_tmpmemctx ); |
break; |
break; |