summaryrefslogtreecommitdiff
path: root/cli-chansession.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2007-02-12 10:37:35 +0000
committerMatt Johnston <matt@ucc.asn.au>2007-02-12 10:37:35 +0000
commit4f772496e5b161d20f7044a3bc02408e6e28e987 (patch)
tree4ec9505c6a9c0cd0aa4812b2da6c0adffb280dcf /cli-chansession.c
parent035f3aab3458f19e4b98aeae5fb62a8ef15351f8 (diff)
downloaddropbear-4f772496e5b161d20f7044a3bc02408e6e28e987.tar.gz
Ignore "exit-signal" request rather than returning failure
Diffstat (limited to 'cli-chansession.c')
-rw-r--r--cli-chansession.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/cli-chansession.c b/cli-chansession.c
index fee8a22..0f0d07a 100644
--- a/cli-chansession.c
+++ b/cli-chansession.c
@@ -64,16 +64,17 @@ static void cli_chansessreq(struct Channel *channel) {
type = buf_getstring(ses.payload, NULL);
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))
send_msg_channel_failure(channel);
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:
m_free(type);
}