version 1.125.2.10, 2007/01/02 21:43:55
|
version 1.125.2.11, 2007/10/05 06:25:15
|
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.125.2.9 2006/12/28 09:34:44 ando Exp $ */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.125.2.10 2007/01/02 21:43:55 kurt Exp $ */ |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
* |
* |
* Copyright 1998-2007 The OpenLDAP Foundation. |
* Copyright 1998-2007 The OpenLDAP Foundation. |
Line 32
|
Line 32
|
#include <ac/string.h> |
#include <ac/string.h> |
|
|
#include "slap.h" |
#include "slap.h" |
|
#include "lutil.h" |
|
|
static int get_filter_list( |
static int get_filter_list( |
Operation *op, |
Operation *op, |
Line 545 filter2bv_x( Operation *op, Filter *f, s
|
Line 546 filter2bv_x( Operation *op, Filter *f, s
|
int i; |
int i; |
Filter *p; |
Filter *p; |
struct berval tmp; |
struct berval tmp; |
|
char uuid[ LDAP_LUTIL_UUIDSTR_BUFSIZE ]; |
static struct berval |
static struct berval |
ber_bvfalse = BER_BVC( "(?=false)" ), |
ber_bvfalse = BER_BVC( "(?=false)" ), |
ber_bvtrue = BER_BVC( "(?=true)" ), |
ber_bvtrue = BER_BVC( "(?=true)" ), |
Line 561 filter2bv_x( Operation *op, Filter *f, s
|
Line 563 filter2bv_x( Operation *op, Filter *f, s
|
|
|
switch ( f->f_choice ) { |
switch ( f->f_choice ) { |
case LDAP_FILTER_EQUALITY: |
case LDAP_FILTER_EQUALITY: |
filter_escape_value_x( &f->f_av_value, &tmp, op->o_tmpmemctx ); |
if ( f->f_av_desc->ad_type->sat_syntax == slap_schema.si_ad_entryUUID->ad_type->sat_syntax ) { |
|
tmp.bv_len = lutil_uuidstr_from_normalized( f->f_av_value.bv_val, |
|
f->f_av_value.bv_len, uuid, LDAP_LUTIL_UUIDSTR_BUFSIZE ); |
|
assert( tmp.bv_len > 0 ); |
|
tmp.bv_val = uuid; |
|
} else { |
|
filter_escape_value_x( &f->f_av_value, &tmp, op->o_tmpmemctx ); |
|
} |
|
|
fstr->bv_len = f->f_av_desc->ad_cname.bv_len + |
fstr->bv_len = f->f_av_desc->ad_cname.bv_len + |
tmp.bv_len + ( sizeof("(=)") - 1 ); |
tmp.bv_len + ( sizeof("(=)") - 1 ); |