mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 01:58:33 -05:00
ITS#9880 slapo-accesslog: fix reqStart ordering filter
Same as ITS#9358 but for ordering matching rule, not just equality
This commit is contained in:
parent
10d4461634
commit
1f251fa4e6
2 changed files with 19 additions and 3 deletions
|
|
@ -274,6 +274,17 @@ at_clean( AttributeType *a )
|
|||
}
|
||||
}
|
||||
|
||||
if ( a->sat_ordering ) {
|
||||
MatchingRule *mr;
|
||||
|
||||
mr = mr_find( a->sat_ordering->smr_oid );
|
||||
assert( mr != NULL );
|
||||
if ( mr != a->sat_ordering ) {
|
||||
ch_free( a->sat_ordering );
|
||||
a->sat_ordering = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
assert( a->sat_syntax != NULL );
|
||||
if ( a->sat_syntax != NULL ) {
|
||||
Syntax *syn;
|
||||
|
|
|
|||
|
|
@ -2840,7 +2840,7 @@ int accesslog_initialize()
|
|||
{
|
||||
int i, rc;
|
||||
Syntax *rdnTimestampSyntax;
|
||||
MatchingRule *rdnTimestampMatch;
|
||||
MatchingRule *rdnTimestampMatch, *rdnTimestampOrdering;
|
||||
|
||||
accesslog.on_bi.bi_type = "accesslog";
|
||||
accesslog.on_bi.bi_db_init = accesslog_db_init;
|
||||
|
|
@ -2904,21 +2904,26 @@ int accesslog_initialize()
|
|||
|
||||
/* Inject custom normalizer for reqStart/reqEnd */
|
||||
rdnTimestampMatch = ch_malloc( sizeof( MatchingRule ));
|
||||
rdnTimestampOrdering = ch_malloc( sizeof( MatchingRule ));
|
||||
rdnTimestampSyntax = ch_malloc( sizeof( Syntax ));
|
||||
*rdnTimestampMatch = *ad_reqStart->ad_type->sat_equality;
|
||||
rdnTimestampMatch->smr_normalize = rdnTimestampNormalize;
|
||||
*rdnTimestampOrdering = *ad_reqStart->ad_type->sat_ordering;
|
||||
rdnTimestampOrdering->smr_normalize = rdnTimestampNormalize;
|
||||
*rdnTimestampSyntax = *ad_reqStart->ad_type->sat_syntax;
|
||||
rdnTimestampSyntax->ssyn_validate = rdnTimestampValidate;
|
||||
ad_reqStart->ad_type->sat_equality = rdnTimestampMatch;
|
||||
ad_reqStart->ad_type->sat_ordering = rdnTimestampOrdering;
|
||||
ad_reqStart->ad_type->sat_syntax = rdnTimestampSyntax;
|
||||
|
||||
rdnTimestampMatch = ch_malloc( sizeof( MatchingRule ));
|
||||
rdnTimestampOrdering = ch_malloc( sizeof( MatchingRule ));
|
||||
rdnTimestampSyntax = ch_malloc( sizeof( Syntax ));
|
||||
*rdnTimestampMatch = *ad_reqStart->ad_type->sat_equality;
|
||||
rdnTimestampMatch->smr_normalize = rdnTimestampNormalize;
|
||||
*rdnTimestampOrdering = *ad_reqStart->ad_type->sat_ordering;
|
||||
*rdnTimestampSyntax = *ad_reqStart->ad_type->sat_syntax;
|
||||
rdnTimestampSyntax->ssyn_validate = rdnTimestampValidate;
|
||||
ad_reqEnd->ad_type->sat_equality = rdnTimestampMatch;
|
||||
ad_reqEnd->ad_type->sat_ordering = rdnTimestampOrdering;
|
||||
ad_reqEnd->ad_type->sat_syntax = rdnTimestampSyntax;
|
||||
|
||||
for ( i=0; locs[i].ot; i++ ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue