Commit 570d5e50 authored by Giovanni Panozzo's avatar Giovanni Panozzo Committed by GitHub

Merge pull request #1237 from FreeRDP/ssh_kerberos

SSH Kerberos GSSAPI Auth
parents 95e1a78e 9e0f7d2d
......@@ -49,7 +49,7 @@ struct _RemminaFile
enum
{
SSH_AUTH_PASSWORD, SSH_AUTH_PUBLICKEY, SSH_AUTH_AGENT, SSH_AUTH_AUTO_PUBLICKEY
SSH_AUTH_PASSWORD, SSH_AUTH_PUBLICKEY, SSH_AUTH_AGENT, SSH_AUTH_AUTO_PUBLICKEY, SSH_AUTH_GSSAPI
};
......
......@@ -273,6 +273,26 @@ remmina_ssh_auth_agent (RemminaSSH* ssh)
return 1;
}
static gint
remmina_ssh_auth_gssapi (RemminaSSH *ssh)
{
TRACE_CALL("remmina_ssh_auth_gssapi");
gint ret;
if (ssh->authenticated) return 1;
ret = ssh_userauth_gssapi (ssh->session);
if (ret != SSH_AUTH_SUCCESS)
{
remmina_ssh_set_error (ssh, _("SSH Kerberos/GSSAPI authentication failed: %s"));
return 0;
}
ssh->authenticated = TRUE;
return 1;
}
gint
remmina_ssh_auth (RemminaSSH *ssh, const gchar *password)
{
......@@ -308,6 +328,9 @@ remmina_ssh_auth (RemminaSSH *ssh, const gchar *password)
case SSH_AUTH_AUTO_PUBLICKEY:
return remmina_ssh_auth_auto_pubkey (ssh);
case SSH_AUTH_GSSAPI:
return remmina_ssh_auth_gssapi (ssh);
default:
return 0;
}
......@@ -385,6 +408,11 @@ remmina_ssh_auth_gui (RemminaSSH *ssh, RemminaInitDialog *dialog, RemminaFile *r
keyname = _("SSH private key passphrase");
pwdtype = "ssh_passphrase";
break;
case SSH_AUTH_GSSAPI:
tips = _("Authenticating %s's Kerberos to SSH server %s...");
keyname = _("SSH Kerberos/GSSAPI");
pwdtype = "kerberos_token";
break;
default:
return FALSE;
}
......
......@@ -697,6 +697,7 @@ static gpointer ssh_auth[] =
"1", N_("SSH identfy file"),
"2", N_("SSH agent"),
"3", N_("Public key (automatic)"),
"4", N_("Kerberos (GSSAPI)"),
NULL
};
......
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