For any update operation the MEP plugin was calling slapi_search_internal_get_entry() which duplicates the entry it returns. In this case the entry is just read from and discarded, but this entry is already in the pblock (the PRE OP ENTRY).
In modify.c we were also duplicating an entry to check for password policy attributes/objectclasses.
Fix Description:
Just grab the PRE OP ENTRY from the pblock and use that to read the attribute values from. This saves two entry duplications for every update operation from MEP, and two duplications in op_shared_modify().
So this patch reduces the total number of entry duplications from 8 down to 4 per modify.
Bug Description:
For any update operation the MEP plugin was calling slapi_search_internal_get_entry() which duplicates the entry it returns. In this case the entry is just read from and discarded, but this entry is already in the pblock (the PRE OP ENTRY).
In modify.c we were also duplicating an entry to check for password policy attributes/objectclasses.
Fix Description:
Just grab the PRE OP ENTRY from the pblock and use that to read the attribute values from. This saves two entry duplications for every update operation from MEP, and two duplications in op_shared_modify().
So this patch reduces the total number of entry duplications from 8 down to 4 per modify.
fixes: https://pagure.io/389-ds-base/issue/51076