dd266da Issue 50869 - Setting nsslapd-allowed-sasl-mechanisms truncates the value

Authored and Committed by spichugi 3 years ago
    Issue 50869 - Setting nsslapd-allowed-sasl-mechanisms truncates the value
    
    Bug Description: Adding multiple mechanisms to nsslapd-allowed-sasl-mechanisms ignores all but one of the mechanisms specified.
    
    Fix Description: The issue happens because we use the same memory address
    for 'char *' for slapdFrontendConfig->allowed_sasl_mechs and
    for slapdFrontendConfig->allowed_sasl_mechs_array.
    So when we split the 'char *' into the 'char **' with ' ' delimetr,
    allowed_sasl_mechs has only the first element becuase ' ' is set to 0 now.
    
    Define a separate 'char *' for the array.
    Add a test for the issue.
    
    https://pagure.io/389-ds-base/issue/50869
    
    Reviewed by: mreynolds, firstyear, tbordaz (Thanks!!)
    
        
file modified
+2 -0