mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-30 11:39:34 -05:00
Extend MRA. It now has a pointer to a MatchingRule, but a char
pointer is kept for messages and to tell a filter without rule from one with an unknown rule. It matters.
This commit is contained in:
parent
18b6b866e2
commit
5b52ae5109
2 changed files with 7 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ mra_free(
|
|||
)
|
||||
{
|
||||
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 );
|
||||
|
|
@ -43,6 +43,7 @@ get_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;
|
||||
|
|
@ -57,13 +58,14 @@ get_mra(
|
|||
}
|
||||
|
||||
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 );
|
||||
|
||||
|
|
|
|||
|
|
@ -478,7 +478,8 @@ typedef struct slap_ss_assertion {
|
|||
} 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 */
|
||||
|
|
@ -526,6 +527,7 @@ typedef struct slap_filter {
|
|||
#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
|
||||
|
|
|
|||
Loading…
Reference in a new issue