Issue 7827 - Preserve dsEntryDN case from DN cache - #7828
Conversation
Bug Description: After a backend export, when `nsslapd-return-original-entrydn` is enabled, entries loaded from the DN cache can return a normalized DN instead of the original-form DN. `dsEntryDN` attribute still contains the correct original-form DN, but the response `dn:` value comes from the DN cache and differs from `dsEntryDN`. This affects entries not previously loaded into the entry cache before export. Fix Description: Prefer dsEntryDN when rebuilding entries from a DN cache hit, normalize newly cached DNs correctly. Fixes: 389ds#7827
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="dirsrvtests/tests/suites/basic/ds_entrydn_test.py" line_range="273" />
<code_context>
inst = topo.standalone
inst.config.replace('nsslapd-return-original-entrydn', 'on')
- users = UserAccounts(inst, SUFFIX)
</code_context>
<issue_to_address>
**issue (bug_risk):** The test enables `nsslapd-return-original-entrydn` but never restores its previous value, so the shared standalone topology remains configured to return original-form DNs after the test finishes. Subsequent tests that expect the default normalized-DN behavior become order-dependent and can fail or silently exercise a different configuration.
**Triggers:** When this test runs before other tests using the same topology.
**Suggested fix:** Save the original setting and restore it in the fixture finalizer, or add the setting restoration to `export_cache_setup` cleanup.
</issue_to_address>| dsEntryDN: uid=exportCacheUser,dc=Example,DC=COM | ||
| """ | ||
| inst = topo.standalone | ||
| inst.config.replace('nsslapd-return-original-entrydn', 'on') |
There was a problem hiding this comment.
issue (bug_risk): The test enables nsslapd-return-original-entrydn but never restores its previous value, so the shared standalone topology remains configured to return original-form DNs after the test finishes. Subsequent tests that expect the default normalized-DN behavior become order-dependent and can fail or silently exercise a different configuration.
Triggers: When this test runs before other tests using the same topology.
Suggested fix: Save the original setting and restore it in the fixture finalizer, or add the setting restoration to export_cache_setup cleanup.
|
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
Bug Description:
After a backend export, when
nsslapd-return-original-entrydnis enabled, entries loaded from the DN cache can return a normalized DN instead of the original-form DN.dsEntryDNattribute still contains the correct original-form DN, but the responsedn:value comes from the DN cache and differs fromdsEntryDN.This affects entries not previously loaded into the entry cache before export.
Fix Description:
Prefer dsEntryDN when rebuilding entries from a DN cache hit, normalize newly cached DNs correctly.
Fixes: #7827
Summary by Sourcery
Preserve original-form entry DNs when entries are reconstructed from the DN cache.
Bug Fixes:
Enhancements:
Tests: