https://bugs.openldap.org/show_bug.cgi?id=9358
Issue ID: 9358 Summary: back-mdb may return accesslog entries out of order Product: OpenLDAP Version: 2.4.53 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: overlays Assignee: bugs@openldap.org Reporter: hyc@openldap.org Target Milestone: ---
back-mdb will usually return search entries in entryID order, but may do a dn traversal instead if the count of children is smaller than the count of search filter candidates. The RDNs are sorted in length order, not lexical order. For accesslog, all RDNs are of equal length but if they have trailing zeroes, the generalizedTime normalizer truncates them. Changing their lengths causes accesslog's timestamp-based RDNs to sort in the wrong order.
The least intrusive fix is to override the syntax/normalizer for reqStart and reqEnd attributes to not truncate trailing zeroes.
https://bugs.openldap.org/show_bug.cgi?id=9358
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.4.54
--- Comment #1 from Quanah Gibson-Mount quanah@openldap.org --- trunk:
Commits: • 2bbb51e2 by Howard Chu at 2020-09-29T09:43:37+01:00 ITS#9358 Fix reqStart normalizer
Don't truncate trailing zeroes in reqStart/reqEnd timestamps
https://bugs.openldap.org/show_bug.cgi?id=9358
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #2 from Quanah Gibson-Mount quanah@openldap.org --- RE24:
Commits: • 2f5deb78 by Howard Chu at 2020-09-30T15:51:14+00:00 ITS#9358 Fix reqStart normalizer
Don't truncate trailing zeroes in reqStart/reqEnd timestamps
https://bugs.openldap.org/show_bug.cgi?id=9358
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED
https://bugs.openldap.org/show_bug.cgi?id=9358
--- Comment #3 from subbarao@computer.org subbarao@computer.org --- Comment to help others searching ITS. Before this fix, certain range searches with reqStart on the changelog were broken. For example:
(!(reqStart<=20220707123456.000000Z))
The idea here is to grab all entries strictly greater than the timestamp. But when slapd truncates zeros, it rewrites this filter to:
(!(reqStart<=20220707123456Z))
As a result, the reqStart=20220707123456.000000Z entry is the first match since it is greater than 20220707123456Z, which is not the desired behavior.
https://bugs.openldap.org/show_bug.cgi?id=9358
--- Comment #4 from subbarao@computer.org subbarao@computer.org --- (In reply to subbarao@computer.org from comment #3)
Comment to help others searching ITS. Before this fix, certain range searches with reqStart on the changelog were broken. For example:
(!(reqStart<=20220707123456.000000Z))
The idea here is to grab all entries strictly greater than the timestamp. But when slapd truncates zeros, it rewrites this filter to:
(!(reqStart<=20220707123456Z))
As a result, the reqStart=20220707123456.000000Z entry is the first match since it is greater than 20220707123456Z, which is not the desired behavior.
Actually, it turns out that this trailing zero truncation is still happening in 2.5.12. I'll open a separate ITS report for that. I first saw this problem with 2.4.57, searched around, found this issue and figured that surely this must be the fix. But it turns out that 2.4.57 already has this patch, and the problem is still there on 2.5.12.
https://bugs.openldap.org/show_bug.cgi?id=9358
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.openldap.org/s | |how_bug.cgi?id=9880