]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/compare.c
reject registrations when back-monitor is not configured
[openldap] / servers / slapd / compare.c
index 8787ee45c1711bced62a08573b9897411f79ccb6..9dc1af8d939523cad8ea5f62ad404599517f382d 100644 (file)
@@ -99,8 +99,13 @@ do_compare(
 
        rs->sr_err = slap_bv2ad( &desc, &ava.aa_desc, &rs->sr_text );
        if( rs->sr_err != LDAP_SUCCESS ) {
-               send_ldap_result( op, rs );
-               goto cleanup;
+               rs->sr_err = slap_bv2undef_ad( &desc, &ava.aa_desc,
+                               &rs->sr_text,
+                               SLAP_AD_PROXIED|SLAP_AD_NOINSERT );
+               if( rs->sr_err != LDAP_SUCCESS ) {
+                       send_ldap_result( op, rs );
+                       goto cleanup;
+               }
        }
 
        rs->sr_err = asserted_value_validate_normalize( ava.aa_desc,
@@ -120,7 +125,7 @@ do_compare(
 cleanup:;
        op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx );
        op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx );
-       if ( ava.aa_value.bv_val ) {
+       if ( !BER_BVISNULL( &ava.aa_value ) ) {
                op->o_tmpfree( ava.aa_value.bv_val, op->o_tmpmemctx );
        }