mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 13:21:15 +00:00
Ignore "exit-signal" request rather than returning failure
--HG-- branch : channel-fix extra : convert_revision : 493d563a48aecc55015ba6d2820da223b3b013b7
This commit is contained in:
parent
674b4d013d
commit
164ea75fa6
@ -64,16 +64,17 @@ static void cli_chansessreq(struct Channel *channel) {
|
|||||||
type = buf_getstring(ses.payload, NULL);
|
type = buf_getstring(ses.payload, NULL);
|
||||||
wantreply = buf_getbool(ses.payload);
|
wantreply = buf_getbool(ses.payload);
|
||||||
|
|
||||||
if (strcmp(type, "exit-status") != 0) {
|
if (strcmp(type, "exit-status") == 0) {
|
||||||
|
cli_ses.retval = buf_getint(ses.payload);
|
||||||
|
TRACE(("got exit-status of '%d'", cli_ses.retval))
|
||||||
|
} else if (strcmp(type, "exit-signal") == 0) {
|
||||||
|
TRACE(("got exit-signal, ignoring it"))
|
||||||
|
} else {
|
||||||
TRACE(("unknown request '%s'", type))
|
TRACE(("unknown request '%s'", type))
|
||||||
send_msg_channel_failure(channel);
|
send_msg_channel_failure(channel);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We'll just trust what they tell us */
|
|
||||||
cli_ses.retval = buf_getint(ses.payload);
|
|
||||||
TRACE(("got exit-status of '%d'", cli_ses.retval))
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
m_free(type);
|
m_free(type);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user