mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
When unlocking the server, don't try to clear the prompt on clients without a
prompt (such as the one issuing the unlock request). This caused the server to die if the wrong password was entered when unlocking from the command line with -U (nasty).
This commit is contained in:
parent
35092835b0
commit
55f8219d3c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: server-fn.c,v 1.64 2009-06-25 17:02:59 nicm Exp $ */
|
/* $Id: server-fn.c,v 1.65 2009-07-01 19:15:12 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -215,7 +215,7 @@ server_unlock(const char *s)
|
|||||||
wrong:
|
wrong:
|
||||||
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
||||||
c = ARRAY_ITEM(&clients, i);
|
c = ARRAY_ITEM(&clients, i);
|
||||||
if (c == NULL)
|
if (c == NULL || c->prompt_buffer == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
*c->prompt_buffer = '\0';
|
*c->prompt_buffer = '\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user