version 1.125.2.7, 2006/01/03 22:16:14
|
version 1.131, 2005/11/25 11:16:27
|
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.6 2005/12/23 01:22:00 kurt Exp $ */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.130 2005/08/25 19:14:26 ando 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-2006 The OpenLDAP Foundation. |
* Copyright 1998-2005 The OpenLDAP Foundation. |
* All rights reserved. |
* All rights reserved. |
* |
* |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
Line 569 filter2bv_x( Operation *op, Filter *f, s
|
Line 569 filter2bv_x( Operation *op, Filter *f, s
|
|
|
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s=%s)", |
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s=%s)", |
f->f_av_desc->ad_cname.bv_val, |
f->f_av_desc->ad_cname.bv_val, |
tmp.bv_len ? tmp.bv_val : "(null)"); |
tmp.bv_val ); |
|
|
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
break; |
break; |
Line 583 filter2bv_x( Operation *op, Filter *f, s
|
Line 583 filter2bv_x( Operation *op, Filter *f, s
|
|
|
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s>=%s)", |
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s>=%s)", |
f->f_av_desc->ad_cname.bv_val, |
f->f_av_desc->ad_cname.bv_val, |
tmp.bv_len ? tmp.bv_val : "(null)"); |
tmp.bv_val ); |
|
|
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
break; |
break; |
Line 597 filter2bv_x( Operation *op, Filter *f, s
|
Line 597 filter2bv_x( Operation *op, Filter *f, s
|
|
|
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s<=%s)", |
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s<=%s)", |
f->f_av_desc->ad_cname.bv_val, |
f->f_av_desc->ad_cname.bv_val, |
tmp.bv_len ? tmp.bv_val : "(null)"); |
tmp.bv_val ); |
|
|
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
break; |
break; |
Line 611 filter2bv_x( Operation *op, Filter *f, s
|
Line 611 filter2bv_x( Operation *op, Filter *f, s
|
|
|
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s~=%s)", |
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s~=%s)", |
f->f_av_desc->ad_cname.bv_val, |
f->f_av_desc->ad_cname.bv_val, |
tmp.bv_len ? tmp.bv_val : "(null)"); |
tmp.bv_val ); |
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
break; |
break; |
|
|
Line 634 filter2bv_x( Operation *op, Filter *f, s
|
Line 634 filter2bv_x( Operation *op, Filter *f, s
|
|
|
snprintf( &fstr->bv_val[len-2], tmp.bv_len+3, |
snprintf( &fstr->bv_val[len-2], tmp.bv_len+3, |
/* "(attr=" */ "%s*)", |
/* "(attr=" */ "%s*)", |
tmp.bv_len ? tmp.bv_val : "(null)"); |
tmp.bv_val ); |
|
|
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
} |
} |
Line 651 filter2bv_x( Operation *op, Filter *f, s
|
Line 651 filter2bv_x( Operation *op, Filter *f, s
|
|
|
snprintf( &fstr->bv_val[len-1], tmp.bv_len+3, |
snprintf( &fstr->bv_val[len-1], tmp.bv_len+3, |
/* "(attr=[init]*[any*]" */ "%s*)", |
/* "(attr=[init]*[any*]" */ "%s*)", |
tmp.bv_len ? tmp.bv_val : "(null)"); |
tmp.bv_val ); |
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
} |
} |
} |
} |
Line 667 filter2bv_x( Operation *op, Filter *f, s
|
Line 667 filter2bv_x( Operation *op, Filter *f, s
|
|
|
snprintf( &fstr->bv_val[len-1], tmp.bv_len+3, |
snprintf( &fstr->bv_val[len-1], tmp.bv_len+3, |
/* "(attr=[init*][any*]" */ "%s)", |
/* "(attr=[init*][any*]" */ "%s)", |
tmp.bv_len ? tmp.bv_val : "(null)"); |
tmp.bv_val ); |
|
|
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
} |
} |
Line 732 filter2bv_x( Operation *op, Filter *f, s
|
Line 732 filter2bv_x( Operation *op, Filter *f, s
|
f->f_mr_dnattrs ? ":dn" : "", |
f->f_mr_dnattrs ? ":dn" : "", |
f->f_mr_rule_text.bv_len ? ":" : "", |
f->f_mr_rule_text.bv_len ? ":" : "", |
f->f_mr_rule_text.bv_len ? f->f_mr_rule_text.bv_val : "", |
f->f_mr_rule_text.bv_len ? f->f_mr_rule_text.bv_val : "", |
tmp.bv_len ? tmp.bv_val : "(null)"); |
tmp.bv_val ); |
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
ber_memfree_x( tmp.bv_val, op->o_tmpmemctx ); |
} break; |
} break; |
|
|