mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-10 06:13:19 -05:00
Add associated matching rule checks
This commit is contained in:
parent
786d4e23b7
commit
d2db0733ab
1 changed files with 39 additions and 3 deletions
|
|
@ -240,6 +240,41 @@ register_matching_rule(
|
|||
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (( def->mrd_usage & SLAP_MR_EQUALITY ) &&
|
||||
(( def->mrd_usage & SLAP_MR_SUBTYPE_MASK ) == SLAP_MR_NONE ))
|
||||
{
|
||||
if (( def->mrd_usage & SLAP_MR_EQUALITY ) &&
|
||||
(( def->mrd_usage & SLAP_MR_SUBTYPE_MASK ) != SLAP_MR_NONE ))
|
||||
{
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( OPERATION, ERR,
|
||||
"register_matching_rule: inappropriate (approx) association "
|
||||
"%s for %s\n",
|
||||
def->mrd_associated, def->mrd_desc, 0 );
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"register_matching_rule: inappropriate (approx) association "
|
||||
"%s for %s\n",
|
||||
def->mrd_associated, def->mrd_desc, 0 );
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
} else if (!( amr->smr_usage & SLAP_MR_EQUALITY )) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( OPERATION, ERR,
|
||||
"register_matching_rule: inappropriate (equalilty) association "
|
||||
"%s for %s\n",
|
||||
def->mrd_associated, def->mrd_desc, 0 );
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"register_matching_rule: inappropriate (equalilty) association "
|
||||
"%s for %s\n",
|
||||
def->mrd_associated, def->mrd_desc, 0 );
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
mr = ldap_str2matchingrule( def->mrd_desc, &code, &err,
|
||||
|
|
@ -255,9 +290,10 @@ register_matching_rule(
|
|||
ldap_scherr2str(code), err, def->mrd_desc );
|
||||
#endif
|
||||
|
||||
return( -1 );
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
code = mr_add( mr, def, amr, &err );
|
||||
|
||||
ldap_memfree( mr );
|
||||
|
|
@ -273,10 +309,10 @@ register_matching_rule(
|
|||
scherr2str(code), err, def->mrd_desc );
|
||||
#endif
|
||||
|
||||
return( -1 );
|
||||
return -1;
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in a new issue