mayorga / 389-ds-base

Forked from 389-ds-base 7 years ago
Clone

44e78a8 Resolves: bug 458666

Authored and Committed by rmeggins 15 years ago
    Resolves: bug 458666
    Bug Description: Memory leaks in check_trivial_words, check_pw_storagescheme_value
    Reviewed by: nkinder, nhosoi (Thanks!)
    Fix Description: The first leak happens when password policy is active and trivial words
    checking is being used, and the password is being modified.  When getting the
    list of attribute from the existing entry in the modify case, the function
    slapi_attr_get_valueset is used - this function makes a duplicate of the
    valueset and overwrites the valueset argument.  The fix is to move the allocation of vs until after the call to slapi_attr_get_valueset, and only allocate it if it is non NULL.
    The second leak happens when the password storage scheme is changed.  The
    function check_pw_storagescheme_value uses pw_name2scheme to check the given
    scheme - this function allocates a struct pw_scheme * which must be freed with
    free_pw_scheme.
    Platforms tested: RHEL5, Fedora 8
    Flag Day: no
    Doc impact: no
    QA impact: already covered by acceptance tests
    New Tests integrated into TET: none
    
        
file modified
+8 -3