)
{
ad_free( mra->ma_desc, 1 );
- ch_free( (char *) mra->ma_rule );
+ ch_free( mra->ma_rule_text );
ber_bvfree( mra->ma_value );
if ( freeit ) {
ch_free( (char *) mra );
ma = ch_malloc( sizeof( MatchingRuleAssertion ) );
ma->ma_rule = NULL;
+ ma->ma_rule_text = NULL;
ma->ma_desc = NULL;
ma->ma_dnattrs = 0;
ma->ma_value = NULL;
}
if ( tag == LDAP_FILTER_EXT_OID ) {
- rc = ber_scanf( ber, "a", &ma->ma_rule );
+ rc = ber_scanf( ber, "a", &ma->ma_rule_text );
if ( rc == LBER_ERROR ) {
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf for mr\n", 0, 0, 0 );
*text = "Error parsing matching rule in matching rule assertion";
mra_free( ma, 1 );
return SLAPD_DISCONNECT;
}
+ ma->ma_rule = mr_find( ma->ma_rule_text );
rc = ber_scanf( ber, "t", &tag );
} SubstringsAssertion;
typedef struct slap_mr_assertion {
- char *ma_rule; /* optional */
+ MatchingRule *ma_rule; /* optional */
+ char *ma_rule_text; /* optional */
AttributeDescription *ma_desc; /* optional */
int ma_dnattrs; /* boolean */
struct berval *ma_value; /* required */
#define f_sub_final f_un.f_un_ssa->sa_final
#define f_mra f_un.f_un_mra
#define f_mr_rule f_un.f_un_mra->ma_rule
+#define f_mr_rule_text f_un.f_un_mra->ma_rule_text
#define f_mr_desc f_un.f_un_mra->ma_desc
#define f_mr_value f_un.f_un_mra->ma_value
#define f_mr_dnattrs f_un.f_un_mra->ma_dnattrs