1a6390d Ticket #48344 - acl - regression - trailing ', (comma)' in macro matched value is not removed.

Authored and Committed by nhosoi 8 years ago
    Ticket #48344 - acl - regression - trailing ', (comma)' in macro matched value is not removed.
    
    Description: acl_match_macro_in_target in acl plug-in returns matched value
    with a trailing comma, e.g., "o=kaki.com,". It's used to create a group DN,
    e.g., "cn=Domain Administrators,ou=Groups,o=kaki.como=ace industry,c=us".
    
    Due to the duplicated commas, the bind unexpectedly fails with 50 (insufficient
    access).
    
    In getting the matched value from target DN, it checks if a character at the
    end position is a comma or not.  If it is, '\0' is set there.  The position
    was one byte ahead.  It was introduced by #48141 - aci with wildcard and macro
    not correctly evaluated.
    
    https://fedorahosted.org/389/ticket/48344
    
    Reviewed by mreynolds@redhat.com (Thank you, Mark!!)
    
    (cherry picked from commit 8e421fb9af2752144cc93e62090fd873524c5633)