Commit 209a2d22 authored by Antenore Gatta's avatar Antenore Gatta

Better error handling

parent 4ca341ba
...@@ -239,13 +239,25 @@ static gint ...@@ -239,13 +239,25 @@ static gint
remmina_ssh_auth_auto_pubkey (RemminaSSH* ssh) remmina_ssh_auth_auto_pubkey (RemminaSSH* ssh)
{ {
TRACE_CALL("remmina_ssh_auth_auto_pubkey"); TRACE_CALL("remmina_ssh_auth_auto_pubkey");
gint ret; gint ret = ssh_userauth_autopubkey (ssh->session, NULL);
ret = ssh_userauth_autopubkey (ssh->session, "");
if(ret == SSH_AUTH_ERROR)
{
remmina_ssh_set_error (ssh, _("[SSH] automatic public key authentication failed: %s"));
return ret;
}
if (ret != SSH_AUTH_SUCCESS) if (ret != SSH_AUTH_SUCCESS)
{ {
remmina_ssh_set_error (ssh, _("SSH automatic public key authentication failed: %s")); remmina_ssh_set_error (ssh, _("[SSH] automatic public key authentication failed: %s"));
return 0; return ret;
}
if (ret != SSH_AUTH_PARTIAL)
{
remmina_ssh_set_error (ssh, _("[SSH] automatic public key authentication partially failed: %s"));
/* We should call remmina_ssh_auth_gui */
return ret;
} }
ssh->authenticated = TRUE; ssh->authenticated = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment