version 1.379, 2022/04/20 04:19:11 |
version 1.380, 2022/06/03 04:30:46 |
|
|
const char *term, struct termios *tiop, int in_fd, struct sshbuf *cmd, |
const char *term, struct termios *tiop, int in_fd, struct sshbuf *cmd, |
char **env) |
char **env) |
{ |
{ |
int i, j, matched, len, r; |
size_t i, j, len; |
|
int matched, r; |
char *name, *val; |
char *name, *val; |
Channel *c = NULL; |
Channel *c = NULL; |
|
|
|
|
len = 900; |
len = 900; |
if (want_subsystem) { |
if (want_subsystem) { |
debug("Sending subsystem: %.*s", |
debug("Sending subsystem: %.*s", |
len, (const u_char*)sshbuf_ptr(cmd)); |
(int)len, (const u_char*)sshbuf_ptr(cmd)); |
channel_request_start(ssh, id, "subsystem", 1); |
channel_request_start(ssh, id, "subsystem", 1); |
client_expect_confirm(ssh, id, "subsystem", |
client_expect_confirm(ssh, id, "subsystem", |
CONFIRM_CLOSE); |
CONFIRM_CLOSE); |
} else { |
} else { |
debug("Sending command: %.*s", |
debug("Sending command: %.*s", |
len, (const u_char*)sshbuf_ptr(cmd)); |
(int)len, (const u_char*)sshbuf_ptr(cmd)); |
channel_request_start(ssh, id, "exec", 1); |
channel_request_start(ssh, id, "exec", 1); |
client_expect_confirm(ssh, id, "exec", CONFIRM_CLOSE); |
client_expect_confirm(ssh, id, "exec", CONFIRM_CLOSE); |
} |
} |