Skip to content

Commit

Permalink
Merge pull request #1237 from FreeRDP/ssh_kerberos
Browse files Browse the repository at this point in the history
SSH Kerberos GSSAPI Auth
  • Loading branch information
giox069 authored Aug 3, 2017
2 parents 95e1a78 + 9e0f7d2 commit 570d5e5
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion remmina/src/remmina_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};


Expand Down
28 changes: 28 additions & 0 deletions remmina/src/remmina_ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions remmina/src/remmina_ssh_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down

0 comments on commit 570d5e5

Please sign in to comment.