mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Sync OpenBSD patchset 752:
MSG_EXIT can now have a return code in the message, so check for that size as well. Stops the client fatal()ing on exit.
This commit is contained in:
parent
56040be346
commit
89acd757d0
5
client.c
5
client.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: client.c,v 1.95 2010-07-02 02:52:13 tcunha Exp $ */
|
/* $Id: client.c,v 1.96 2010-08-29 14:43:45 tcunha Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -301,7 +301,8 @@ client_dispatch(void)
|
|||||||
client_exitmsg = "detached";
|
client_exitmsg = "detached";
|
||||||
break;
|
break;
|
||||||
case MSG_EXIT:
|
case MSG_EXIT:
|
||||||
if (datalen != 0)
|
if (datalen != 0 &&
|
||||||
|
datalen != sizeof (struct msg_exit_data))
|
||||||
fatalx("bad MSG_EXIT size");
|
fatalx("bad MSG_EXIT size");
|
||||||
|
|
||||||
client_write_server(MSG_EXITING, NULL, 0);
|
client_write_server(MSG_EXITING, NULL, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user