static int ssh_sendbuffer(void *handle);
static void ssh_do_close(Ssh ssh);
static unsigned long ssh_pkt_getuint32(Ssh ssh);
static int ssh_sendbuffer(void *handle);
static void ssh_do_close(Ssh ssh);
static unsigned long ssh_pkt_getuint32(Ssh ssh);
static void ssh_pkt_getstring(Ssh ssh, char **p, int *length);
struct rdpkt1_state_tag {
static void ssh_pkt_getstring(Ssh ssh, char **p, int *length);
struct rdpkt1_state_tag {
ssh_pkt_getstring(ssh, &msg, &msglen);
buf = dupprintf("Remote debug message: %.*s", msglen, msg);
ssh_pkt_getstring(ssh, &msg, &msglen);
buf = dupprintf("Remote debug message: %.*s", msglen, msg);
if (ssh_get_line && !ssh_getline_pw_only) {
if (!ssh_get_line("login as: ",
s->username, sizeof(s->username), FALSE)) {
if (ssh_get_line && !ssh_getline_pw_only) {
if (!ssh_get_line("login as: ",
s->username, sizeof(s->username), FALSE)) {
(int)(*saddr?strlen(saddr):0), *saddr?saddr:NULL,
(int)(*saddr?1:0), ":",
(int)(sserv ? strlen(sports) : 0), sports,
(int)(*saddr?strlen(saddr):0), *saddr?saddr:NULL,
(int)(*saddr?1:0), ":",
(int)(sserv ? strlen(sports) : 0), sports,
if (ssh_get_line && !ssh_getline_pw_only) {
if (!ssh_get_line("login as: ",
s->username, sizeof(s->username), FALSE)) {
if (ssh_get_line && !ssh_getline_pw_only) {
if (!ssh_get_line("login as: ",
s->username, sizeof(s->username), FALSE)) {
* Additionally, if we'd just tried password
* authentication, we should break out of this
* whole loop so as to go back to the username
* Additionally, if we'd just tried password
* authentication, we should break out of this
* whole loop so as to go back to the username
} else {
c_write_str(ssh, "Access denied\r\n");
logevent("Access denied");
} else {
c_write_str(ssh, "Access denied\r\n");
logevent("Access denied");
- if (s->type == AUTH_TYPE_PASSWORD) {
+ if (s->type == AUTH_TYPE_PASSWORD &&
+ ssh->cfg.change_username) {
+ /* XXX perhaps we should allow
+ * keyboard-interactive to do this too? */
(int)(*saddr?strlen(saddr):0), *saddr?saddr:NULL,
(int)(*saddr?1:0), ":",
(int)(sserv ? strlen(sports) : 0), sports,
(int)(*saddr?strlen(saddr):0), *saddr?saddr:NULL,
(int)(*saddr?1:0), ":",
(int)(sserv ? strlen(sports) : 0), sports,
ssh2_pkt_init(ssh, SSH2_MSG_GLOBAL_REQUEST);
ssh2_pkt_addstring(ssh, "tcpip-forward");
ssh2_pkt_addbool(ssh, 1);/* want reply */
ssh2_pkt_init(ssh, SSH2_MSG_GLOBAL_REQUEST);
ssh2_pkt_addstring(ssh, "tcpip-forward");
ssh2_pkt_addbool(ssh, 1);/* want reply */