mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Pass port through to userauth.
I'm going to want to use it in an upcoming commit, because together with 'savedhost', it forms the identification of an SSH server (at least as far as the host key cache is concerned, and therefore it's appropriate for other uses too). We were already passing the hostname through for use in user-facing prompts (not to mention the FQDN version for use in GSSAPI).
This commit is contained in:
parent
761df2fca6
commit
a92aeca111
@ -109,7 +109,7 @@ PacketProtocolLayer *ssh2_transport_new(
|
||||
const SshServerConfig *ssc);
|
||||
PacketProtocolLayer *ssh2_userauth_new(
|
||||
PacketProtocolLayer *successor_layer,
|
||||
const char *hostname, const char *fullhostname,
|
||||
const char *hostname, int port, const char *fullhostname,
|
||||
Filename *keyfile, Filename *detached_cert,
|
||||
bool show_banner, bool tryagent, bool notrivialauth,
|
||||
const char *default_username, bool change_username,
|
||||
|
@ -253,7 +253,8 @@ static void ssh_got_ssh_version(struct ssh_version_receiver *rcv,
|
||||
char *username = get_remote_username(ssh->conf);
|
||||
|
||||
userauth_layer = ssh2_userauth_new(
|
||||
connection_layer, ssh->savedhost, ssh->fullhostname,
|
||||
connection_layer, ssh->savedhost, ssh->savedport,
|
||||
ssh->fullhostname,
|
||||
conf_get_filename(ssh->conf, CONF_keyfile),
|
||||
conf_get_filename(ssh->conf, CONF_detached_cert),
|
||||
conf_get_bool(ssh->conf, CONF_ssh_show_banner),
|
||||
|
@ -30,6 +30,7 @@ struct ssh2_userauth_state {
|
||||
Filename *keyfile, *detached_cert_file;
|
||||
bool show_banner, tryagent, notrivialauth, change_username;
|
||||
char *hostname, *fullhostname;
|
||||
int port;
|
||||
char *default_username;
|
||||
bool try_ki_auth, try_gssapi_auth, try_gssapi_kex_auth, gssapi_fwd;
|
||||
|
||||
@ -129,7 +130,7 @@ static const PacketProtocolLayerVtable ssh2_userauth_vtable = {
|
||||
|
||||
PacketProtocolLayer *ssh2_userauth_new(
|
||||
PacketProtocolLayer *successor_layer,
|
||||
const char *hostname, const char *fullhostname,
|
||||
const char *hostname, int port, const char *fullhostname,
|
||||
Filename *keyfile, Filename *detached_cert_file,
|
||||
bool show_banner, bool tryagent, bool notrivialauth,
|
||||
const char *default_username, bool change_username,
|
||||
@ -142,6 +143,7 @@ PacketProtocolLayer *ssh2_userauth_new(
|
||||
|
||||
s->successor_layer = successor_layer;
|
||||
s->hostname = dupstr(hostname);
|
||||
s->port = port;
|
||||
s->fullhostname = dupstr(fullhostname);
|
||||
s->keyfile = filename_copy(keyfile);
|
||||
s->detached_cert_file = filename_copy(detached_cert_file);
|
||||
|
Loading…
Reference in New Issue
Block a user