- /* not yet implemented */
- Debug( LDAP_DEBUG_ANY, "extensible match not yet implemented.\n",
- f->f_choice, 0, 0 );
- err = LDAP_PROTOCOL_ERROR;
- *text = "extensible match not yet implemented";
+#ifdef NEW_LOGGING
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "get_filter: conn %d EXTENSIBLE\n", conn->c_connid ));
+#else
+ Debug( LDAP_DEBUG_FILTER, "EXTENSIBLE\n", 0, 0, 0 );
+#endif
+
+ err = get_mra( ber, &f->f_mra, text );
+ if ( err != LDAP_SUCCESS ) {
+ break;
+ }
+
+ assert( f->f_mra != NULL );
+
+ filter_escape_value( &f->f_mr_value, &escaped );
+
+ fstr->bv_len = sizeof("(:dn::=)") - 1
+ + (f->f_mr_desc ? f->f_mr_desc->ad_cname.bv_len : 0)
+ + f->f_mr_rule_text.bv_len
+ + escaped.bv_len;
+
+ fstr->bv_val = ch_malloc( fstr->bv_len + 1 );
+ sprintf( fstr->bv_val, "(%s%s%s%s:=%s)",
+ (f->f_mr_desc ? f->f_mr_desc->ad_cname.bv_val : ""),
+ (f->f_mr_dnattrs ? ":dn" : ""),
+ (f->f_mr_rule_text.bv_len ? ":" : ""),
+ (f->f_mr_rule_text.bv_len ? f->f_mr_rule_text.bv_val : ""),
+ escaped.bv_val );
+
+ ber_memfree( escaped.bv_val );