]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/filter.c
don't return entry if requested attr is not present (ITS#5650)
[openldap] / servers / slapd / filter.c
index 46a5c7a6d3572467640c23b6b55a3f7281136817..60f4f0e063b8e944387fe98c1061322b1d02ba80 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2007 The OpenLDAP Foundation.
+ * Copyright 1998-2008 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -608,7 +608,9 @@ filter2bv_x( Operation *op, Filter *f, struct berval *fstr )
 simple:
                value = f->f_av_value;
                if ( f->f_av_desc->ad_type->sat_equality &&
-                       f->f_av_desc->ad_type->sat_equality->smr_usage & SLAP_MR_MUTATION_NORMALIZER ) {
+                       !undef &&
+                       ( f->f_av_desc->ad_type->sat_equality->smr_usage & SLAP_MR_MUTATION_NORMALIZER ))
+               {
                        f->f_av_desc->ad_type->sat_equality->smr_normalize(
                                (SLAP_MR_DENORMALIZE|SLAP_MR_VALUE_OF_ASSERTION_SYNTAX),
                                NULL, NULL, &f->f_av_value, &value, op->o_tmpmemctx );