aboutsummaryrefslogtreecommitdiff
path: root/src/channels1.c
diff options
context:
space:
mode:
authorYanis Kurganov <YKurganov@ptsecurity.com>2015-01-20 12:25:28 +0300
committerAndreas Schneider <asn@cryptomilk.org>2015-01-20 18:58:13 +0100
commitc6590bd1893a600a04a0d87ff66e0dba838a7e7b (patch)
tree26adb2eb18457865cd9436f759d61bd30a3f39d9 /src/channels1.c
parent929868c691f43c58e5e7421390286c5a7aa0bec8 (diff)
downloadlibssh-c6590bd1893a600a04a0d87ff66e0dba838a7e7b.tar.gz
libssh-c6590bd1893a600a04a0d87ff66e0dba838a7e7b.tar.xz
libssh-c6590bd1893a600a04a0d87ff66e0dba838a7e7b.zip
channels1: Fix pty request state
Signed-off-by: Yanis Kurganov <YKurganov@ptsecurity.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/channels1.c')
-rw-r--r--src/channels1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/channels1.c b/src/channels1.c
index 4d82c636..4b7d2687 100644
--- a/src/channels1.c
+++ b/src/channels1.c
@@ -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;
}