1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-21 19:31:17 +03:00

channels1: Fix pty request state

Signed-off-by: Yanis Kurganov <YKurganov@ptsecurity.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Yanis Kurganov
2015-01-20 12:25:28 +03:00
committed by Andreas Schneider
parent 929868c691
commit c6590bd189

View File

@@ -101,7 +101,8 @@ int channel_request_pty_size1(ssh_channel channel, const char *terminal, int col
}
session = channel->session;
if(channel->request_state != SSH_CHANNEL_REQ_STATE_NONE){
if(channel->request_state != SSH_CHANNEL_REQ_STATE_NONE &&
channel->request_state != SSH_CHANNEL_REQ_STATE_ACCEPTED){
ssh_set_error(session,SSH_REQUEST_DENIED,"Wrong request state");
return SSH_ERROR;
}