error_msg = "Server unexpectedly closed network connection";
}
+ if (need_notify)
+ notify_remote_exit(ssh->frontend);
+
if (error_msg) {
/* A socket error has occurred. */
logevent(error_msg);
} else {
logevent("Server closed network connection");
}
- if (need_notify)
- notify_remote_exit(ssh->frontend);
return 0;
}
if (s->dlgret == 0) {
ssh->close_expected = TRUE;
ssh_closing((Plug)ssh, NULL, 0, 0);
+ crStop(0);
}
}
if (s->dlgret == 0) {
ssh->close_expected = TRUE;
ssh_closing((Plug)ssh, NULL, 0, 0);
+ crStop(0);
}
}
}
bombout(("TIS challenge packet was badly formed"));
crStop(0);
}
+ c_write_str(ssh, "Using TIS authentication.\r\n");
logevent("Received TIS challenge");
if (challengelen > sizeof(s->prompt) - 1)
challengelen = sizeof(s->prompt) - 1;/* prevent overrun */
bombout(("CryptoCard challenge packet was badly formed"));
crStop(0);
}
+ c_write_str(ssh, "Using CryptoCard authentication.\r\n");
logevent("Received CryptoCard challenge");
if (challengelen > sizeof(s->prompt) - 1)
challengelen = sizeof(s->prompt) - 1;/* prevent overrun */
{
Ssh ssh = c->ssh;
- if (ssh->state != SSH_STATE_SESSION) {
- assert(ssh->state == SSH_STATE_CLOSED);
+ if (ssh->state == SSH_STATE_CLOSED)
return;
- }
if (c && !c->closes) {
/*
{
Ssh ssh = c->ssh;
- if (ssh->state != SSH_STATE_SESSION) {
- assert(ssh->state == SSH_STATE_CLOSED);
+ if (ssh->state == SSH_STATE_CLOSED)
return 0;
- }
if (ssh->version == 1) {
send_packet(ssh, SSH1_MSG_CHANNEL_DATA,
{
Ssh ssh = c->ssh;
- if (ssh->state != SSH_STATE_SESSION) {
- assert(ssh->state == SSH_STATE_CLOSED);
+ if (ssh->state == SSH_STATE_CLOSED)
return;
- }
if (ssh->version == 1) {
if (c->v.v1.throttling && bufsize < SSH1_BUFFER_LIMIT) {
strcpy(saddr, sports);
n = 0;
}
- if (n < 255) sports[n++] = *portfwd_strptr++;
+ if (n < lenof(sports)-1) sports[n++] = *portfwd_strptr++;
}
sports[n] = 0;
if (type != 'D') {
portfwd_strptr++;
n = 0;
while (*portfwd_strptr && *portfwd_strptr != ':') {
- if (n < 255) host[n++] = *portfwd_strptr++;
+ if (n < lenof(host)-1) host[n++] = *portfwd_strptr++;
}
host[n] = 0;
if (*portfwd_strptr == ':')
portfwd_strptr++;
n = 0;
while (*portfwd_strptr) {
- if (n < 255) dports[n++] = *portfwd_strptr++;
+ if (n < lenof(dports)-1) dports[n++] = *portfwd_strptr++;
}
dports[n] = 0;
portfwd_strptr++;
continue;
}
+ c_write_str(ssh, "Using keyboard-interactive authentication.\r\n");
s->kbd_inter_running = TRUE;
s->curr_prompt = 0;
}