5dccf76 pam: set PAM_USER properly with allow_missing_name

Authored and Committed by sbose 4 years ago
    pam: set PAM_USER properly with allow_missing_name
    
    Currently if the allow_missing_name pam_sss option is used PAM_USER is
    set to the fully-qualified name only for the files provider it is set to
    the short name. This might cause issue with other components expecting
    that the value of PAM_USER corresponds to the name returned by the nss
    calls getpwnam() and getpwuid().
    
    With this patch PAM_USER is set to the same user name as returned by the
    NSS responder. For the communication between pam_sss and SSSD's PAM
    responder the fully-qualified name is kept.
    
    Related to https://pagure.io/SSSD/sssd/issue/4069
    
    Reviewed-by: Pavel Březina <pbrezina@redhat.com>
    
        
file modified
+27 -15
file modified
+8 -1