]> git.sur5r.net Git - openldap/commitdiff
do not assume the matching rule synta has a validate handler (ITS#4380)
authorPierangelo Masarati <ando@openldap.org>
Wed, 1 Feb 2006 21:53:58 +0000 (21:53 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 1 Feb 2006 21:53:58 +0000 (21:53 +0000)
servers/slapd/value.c

index 9ccdf5c0533558386f4f8eb8fe944a673bd15717..dbd30cff8f055ed371843ffacbb8dff3d9193990 100644 (file)
@@ -153,8 +153,12 @@ int asserted_value_validate_normalize(
                rc = (mr->smr_syntax->ssyn_pretty)( mr->smr_syntax, in, &pval, ctx );
                in = &pval;
 
-       } else {
+       } else if ( mr->smr_syntax->ssyn_validate ) {
                rc = (mr->smr_syntax->ssyn_validate)( mr->smr_syntax, in );
+
+       } else {
+               *text = "inappropriate matching request";
+               return LDAP_INAPPROPRIATE_MATCHING;
        }
 
        if( rc != LDAP_SUCCESS ) {