Ticket #48188 - segfault in ns-slapd due to accessing Slapi_DN freed in pre bind plug-in
This patch is based upon the patch provided by Simo Sorce <email@example.com> for
Ticket #48272 - Allow PRE_BIND plugins to mangle DNs
Allow a pre_bind plugin to map a DN to another
This is useful for plugins that deal with virtual trees or non-standard
clients binding with values that are not proper DNs and similar situations.
Signed-off-by: Simo Sorce <firstname.lastname@example.org>
2 changes are made to the original patch:
1. removed "slapi_sdn_free(&sdn)" with this comment:
* It is a plug-in's responsibility to free the original Slapi_DN.
Note: slapi-nis already freed the original sdn.
2. reset dn from the new sdn.
dn = slapi_sdn_get_dn(sdn);
Reviewed by email@example.com and firstname.lastname@example.org.