a9a9f39 KRB5/IPA/AD: Add a utility function to create a krb5_service instance

4 files Authored by jhrozek 5 years ago, Committed by fidencio 5 years ago,
    KRB5/IPA/AD: Add a utility function to create a krb5_service instance
    
    Each Kerberized provider used hand-crafted copy-paste code to set up its
    copy of the krb5_service structure. Instead of adding yet another copy in
    this patchset in the IPA subdomains code, create a utility function instead.
    
    Due to IPA provider first creating the krb5_service in the common setup
    function, but only later reading the auth options in the auth provider
    constructor, the code first uses the default true value for the use_kdcinfo
    flag and then overrides it with the configured value in the auth constructor
    -- it would be preferable to create the structure with the right value at
    creation time, but this would require bigger refactoring. Also, the code
    before this change was even less correct as the flag was initially set the
    "false" due to the structure being allocated with talloc_zero(). At least
    now it uses the default value.
    
    Related:
    https://pagure.io/SSSD/sssd/issue/3291
    
    Reviewed-by: Sumit Bose <sbose@redhat.com>
    
        
file modified
+3 -23
file modified
+14 -21