#49772 Ticket 49742 - Fine grained password policy can impact search performance
Closed by spichugi. Opened by tbordaz.
tbordaz/389-ds-base Ticket-49742  into  master

Download 49772.patch

Bug Description:
new_passwdPolicy is called with an entry DN.
In case of fine grain password policy we need to retrieve
the possible password policy (pwdpolicysubentry) that applies to
that entry.
It triggers an internal search to retrieve the entry.

In case of a search operation (add_shadow_ext_password_attrs), the
entry is already in the pblock. So it is useless to do an additional
internal search for it.

Fix Description:
in case of fine grain password policy and a SRCH operation,
if the entry DN matches the entry stored in the pblock (SLAPI_SEARCH_RESULT_ENTRY)
then use that entry instead of doing an internal search

https://pagure.io/389-ds-base/issue/49742

Reviewed by: ?

Platforms tested: F26

Flag Day: no

Doc impact: no

slapi_entry_free() already checks if e is NULL, so this can be changed to just test for "free_e". Otherwise this look good to me!

Right, I will change it

rebased onto 05587edaeca03b1c26cb087cc3f0c68856c4bc82

Pull-Request has been merged by tbordaz

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/2831

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata