40e0d0f Ticket #48188 - segfault in ns-slapd due to accessing Slapi_DN freed in pre bind plug-in

1 file Authored by simo 5 years ago, Committed by nhosoi 5 years ago,
    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 <simo@redhat.com> for
    Ticket #48272 - Allow PRE_BIND plugins to mangle DNs
    
    Description:
    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 <simo@redhat.com>
    
    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);
    
    https://fedorahosted.org/389/ticket/48188
    
    Reviewed by rmeggins@redhat.com and lkrispen@redhat.com.
    
        
file modified
+18 -3