3f59118 ipa_sam: do not modify static buffer holding fqdn

Authored and Committed by ftweedal 3 years ago
    ipa_sam: do not modify static buffer holding fqdn
    
    ipa_sam was modifying the buffer returned by ipa_gethostfqdn().
    Subsequent calls to ipa_gethostfqdn() returned the corrupt data,
    causing other operations to fail.
    
    Update ipa_sam to copy the string and modify the copy.  Also
    document this characteristic of ipa_gethostfqdn() and explain that
    callers must not modify the returned data.
    
    Part of: https://pagure.io/freeipa/issue/8501
    
    Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
    
        
file modified
+7 -3
file modified
+7 -0