version 1.41, 2000/05/21 21:15:55
|
version 1.42, 2000/05/22 01:46:57
|
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.40 2000/05/18 15:21:42 kurt Exp $ */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.41 2000/05/21 21:15:55 kurt Exp $ */ |
/* |
/* |
* Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. |
* Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
Line 19 static int get_filter_list(
|
Line 19 static int get_filter_list(
|
BerElement *ber, |
BerElement *ber, |
Filter **f, |
Filter **f, |
char **fstr, |
char **fstr, |
char **text ); |
const char **text ); |
|
|
static int get_substring_filter( |
static int get_substring_filter( |
Connection *conn, |
Connection *conn, |
BerElement *ber, |
BerElement *ber, |
Filter *f, |
Filter *f, |
char **fstr, |
char **fstr, |
char **text ); |
const char **text ); |
|
|
int |
int |
get_filter( |
get_filter( |
Line 33 get_filter(
|
Line 34 get_filter(
|
BerElement *ber, |
BerElement *ber, |
Filter **filt, |
Filter **filt, |
char **fstr, |
char **fstr, |
char **text ) |
const char **text ) |
{ |
{ |
ber_tag_t tag; |
ber_tag_t tag; |
ber_len_t len; |
ber_len_t len; |
Line 327 get_filter(
|
Line 328 get_filter(
|
} |
} |
|
|
static int |
static int |
get_filter_list( Connection *conn, BerElement *ber, Filter **f, char **fstr, char **text ) |
get_filter_list( Connection *conn, BerElement *ber, |
|
Filter **f, char **fstr, |
|
const char **text ) |
{ |
{ |
Filter **new; |
Filter **new; |
int err; |
int err; |
Line 368 get_substring_filter(
|
Line 371 get_substring_filter(
|
BerElement *ber, |
BerElement *ber, |
Filter *f, |
Filter *f, |
char **fstr, |
char **fstr, |
char **text |
const char **text |
) |
) |
{ |
{ |
ber_tag_t tag; |
ber_tag_t tag; |
Line 377 get_substring_filter(
|
Line 380 get_substring_filter(
|
struct berval *value; |
struct berval *value; |
char *last; |
char *last; |
struct berval type; |
struct berval type; |
#ifndef SLAPD_SCHEMA_NOT_COMPAT |
#ifdef SLAPD_SCHEMA_NOT_COMPAT |
int syntax; |
|
struct berval *nvalue; |
struct berval *nvalue; |
|
#else |
|
int syntax; |
#endif |
#endif |
*text = "error decoding filter"; |
*text = "error decoding filter"; |
|
|
Line 430 get_substring_filter(
|
Line 434 get_substring_filter(
|
for ( tag = ber_first_element( ber, &len, &last ); tag != LBER_DEFAULT; |
for ( tag = ber_first_element( ber, &len, &last ); tag != LBER_DEFAULT; |
tag = ber_next_element( ber, &len, last ) ) |
tag = ber_next_element( ber, &len, last ) ) |
{ |
{ |
|
#ifdef SLAPD_SCHEMA_NOT_COMPAT |
unsigned usage; |
unsigned usage; |
|
#endif |
|
|
rc = ber_scanf( ber, "O", &value ); |
rc = ber_scanf( ber, "O", &value ); |
if ( rc == LBER_ERROR ) { |
if ( rc == LBER_ERROR ) { |