Fix: don't modify original filter in filter_map_rewrite

This commit is contained in:
Howard Chu 2006-12-19 19:47:01 +00:00
parent 8c90df8314
commit 7d9361e498

View File

@ -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;