X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=ssh.c;h=033a0d27dd8f7c351aa4f46c48ded5093c9e6dac;hb=39cf689fd6931173197234fedef5ffc389b4e4e0;hp=a842c4d0411611cec6a21a247501e557326a9dec;hpb=094dd30d957b0ad07181d4270b1c8243bf38e289;p=PuTTY.git diff --git a/ssh.c b/ssh.c index a842c4d0..033a0d27 100644 --- a/ssh.c +++ b/ssh.c @@ -20,7 +20,7 @@ fprintf(stderr, "%s\n", s); } #define bombout(msg) ( ssh_state = SSH_STATE_CLOSED, \ - (s ? sk_close(s), s = NULL : (void)0), \ + (s ? sk_close(s), s = NULL : 0), \ connection_fatal msg ) #define SSH1_MSG_DISCONNECT 1 /* 0x1 */ @@ -2858,7 +2858,11 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt) */ ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST); ssh2_pkt_adduint32(mainchan->remoteid); /* recipient channel */ - if (*cfg.remote_cmd) { + if (cfg.ssh_subsys) { + ssh2_pkt_addstring("subsystem"); + ssh2_pkt_addbool(1); /* want reply */ + ssh2_pkt_addstring(cfg.remote_cmd); + } else if (*cfg.remote_cmd) { ssh2_pkt_addstring("exec"); ssh2_pkt_addbool(1); /* want reply */ ssh2_pkt_addstring(cfg.remote_cmd);