Hi,
this patch aims to fix
https://fedorahosted.org/sssd/ticket/2811. It
occurs if the client of sssd_pam does not provide a user name during
pre-auth and certificate/Smartcard authentication is not enabled.
I relaxed the user name check when adding the Smartcard support and
added tests as well but unfortunately only for the case when Smartcard
authentication is enabled. This patch adds a check for the other case as
well.
Besides the check itself I tried to send a more suitable error code then
PAM_SYSTEM_ERR. For this I had to make a small change in pam_forwarder()
to not unconditionally overwrite the return code with EINVAL. I think
the change is safe because pam_forwarder_parse_data() does not return
ENOENT which would be the only case when a misleading error would be
send back to the caller.
bye,
Sumit