mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Fix: don't modify original filter in filter_map_rewrite
This commit is contained in:
parent
8c90df8314
commit
7d9361e498
@ -451,6 +451,7 @@ rwm_int_filter_map_rewrite(
|
||||
{
|
||||
int i;
|
||||
Filter *p;
|
||||
AttributeDescription *ad;
|
||||
struct berval atmp,
|
||||
vtmp,
|
||||
*tmp;
|
||||
@ -480,7 +481,8 @@ rwm_int_filter_map_rewrite(
|
||||
|
||||
switch ( f->f_choice ) {
|
||||
case LDAP_FILTER_EQUALITY:
|
||||
if ( map_attr_value( dc, &f->f_av_desc, &atmp,
|
||||
ad = f->f_av_desc;
|
||||
if ( map_attr_value( dc, &ad, &atmp,
|
||||
&f->f_av_value, &vtmp, RWM_MAP ) )
|
||||
{
|
||||
goto computed;
|
||||
@ -496,7 +498,8 @@ rwm_int_filter_map_rewrite(
|
||||
break;
|
||||
|
||||
case LDAP_FILTER_GE:
|
||||
if ( map_attr_value( dc, &f->f_av_desc, &atmp,
|
||||
ad = f->f_av_desc;
|
||||
if ( map_attr_value( dc, &ad, &atmp,
|
||||
&f->f_av_value, &vtmp, RWM_MAP ) )
|
||||
{
|
||||
goto computed;
|
||||
@ -512,7 +515,8 @@ rwm_int_filter_map_rewrite(
|
||||
break;
|
||||
|
||||
case LDAP_FILTER_LE:
|
||||
if ( map_attr_value( dc, &f->f_av_desc, &atmp,
|
||||
ad = f->f_av_desc;
|
||||
if ( map_attr_value( dc, &ad, &atmp,
|
||||
&f->f_av_value, &vtmp, RWM_MAP ) )
|
||||
{
|
||||
goto computed;
|
||||
@ -528,7 +532,8 @@ rwm_int_filter_map_rewrite(
|
||||
break;
|
||||
|
||||
case LDAP_FILTER_APPROX:
|
||||
if ( map_attr_value( dc, &f->f_av_desc, &atmp,
|
||||
ad = f->f_av_desc;
|
||||
if ( map_attr_value( dc, &ad, &atmp,
|
||||
&f->f_av_value, &vtmp, RWM_MAP ) )
|
||||
{
|
||||
goto computed;
|
||||
@ -544,7 +549,8 @@ rwm_int_filter_map_rewrite(
|
||||
break;
|
||||
|
||||
case LDAP_FILTER_SUBSTRINGS:
|
||||
if ( map_attr_value( dc, &f->f_sub_desc, &atmp,
|
||||
ad = f->f_sub_desc;
|
||||
if ( map_attr_value( dc, &ad, &atmp,
|
||||
NULL, NULL, RWM_MAP ) )
|
||||
{
|
||||
goto computed;
|
||||
@ -606,7 +612,8 @@ rwm_int_filter_map_rewrite(
|
||||
break;
|
||||
|
||||
case LDAP_FILTER_PRESENT:
|
||||
if ( map_attr_value( dc, &f->f_desc, &atmp,
|
||||
ad = f->f_desc;
|
||||
if ( map_attr_value( dc, &ad, &atmp,
|
||||
NULL, NULL, RWM_MAP ) )
|
||||
{
|
||||
goto computed;
|
||||
@ -652,7 +659,8 @@ rwm_int_filter_map_rewrite(
|
||||
|
||||
case LDAP_FILTER_EXT: {
|
||||
if ( f->f_mr_desc ) {
|
||||
if ( map_attr_value( dc, &f->f_mr_desc, &atmp,
|
||||
ad = f->f_mr_desc;
|
||||
if ( map_attr_value( dc, &ad, &atmp,
|
||||
&f->f_mr_value, &vtmp, RWM_MAP ) )
|
||||
{
|
||||
goto computed;
|
||||
|
Loading…
Reference in New Issue
Block a user