Andreas Schneider
4eae4d592c
channels: Correctly handle timeouts in channel functions.
2013-09-17 11:23:56 +02:00
Andreas Schneider
566d842405
channel: Use the correct timeout option in channel_open().
...
BUG: https://red.libssh.org/issues/124
2013-09-17 11:19:49 +02:00
Andreas Schneider
3e07359a35
channels: Correctly decrement timeout value in ssh_channel_accept().
...
BUG: https://red.libssh.org/issues/116
2013-09-16 10:38:14 +02:00
Andreas Schneider
e9242a7a31
channel: Document SSH_AGAIN in ssh_channel_read().
...
BUG: https://red.libssh.org/issues/115
2013-09-16 10:38:14 +02:00
Andreas Schneider
fc8081cd06
channel: Refactor channel_write_common() code.
...
This makes it easier to read and easier to debug.
2013-08-13 08:22:28 +02:00
Andreas Schneider
7a64dd1b9a
channel: Make channel_write_common() static.
2013-08-13 08:17:15 +02:00
Andreas Schneider
5045133dc2
channel: Use MIN macro in channel_write_common().
2013-08-13 08:15:37 +02:00
Nicolas Viennot
2f674aeec1
channels: allow channel_open() to return SSH_AGAIN
...
Signed-off-by: Nicolas Viennot <nicolas@viennot.biz>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-25 22:34:51 +02:00
Andreas Schneider
11c82a26a6
channels: Fix a SSH_LOG call.
2013-07-15 08:07:34 +02:00
Andreas Schneider
c64ec43eef
src: Remove enter_function() and leave_function().
2013-07-14 13:31:24 +02:00
Andreas Schneider
ebdd0c6ac1
src: Migrate to SSH_LOG.
2013-07-14 12:44:26 +02:00
Aris Adamantiadis
ad92740dc3
server: Fix compilation without WITH_SERVER
2013-07-14 09:30:59 +02:00
Aris Adamantiadis
f528f71920
agent: the valid request is auth-agent@openssh.com
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-13 14:58:18 +02:00
Aris Adamantiadis
7e306a9ec6
server: implement server-side of agent forwarding
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-13 14:55:58 +02:00
Aris Adamantiadis
81e769ec6a
channels: implement callback for agent forwarding request
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-13 14:55:47 +02:00
Aris Adamantiadis
66b37c856c
session: Introduce SSH_TIMEOUT_DEFAULT
...
The default timeout of 30seconds is very nice when connecting to a new SSH
session, however it completely breaks the synchronous blocking API.
Use SSH_TIMEOUT_DEFAULT when in blocking mode so channel reads&write are blocking
as expected
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-13 14:03:42 +02:00
Aris Adamantiadis
de096910b3
Report according status when errors are detected
2012-12-27 22:01:37 +01:00
Aris Adamantiadis
6d61c3ce4a
Fix channel_write to wait during key reexchanges
2012-12-23 23:10:29 +01:00
Andreas Schneider
ab8c7de6f8
BUG 94: Fix big endian issue.
2012-12-03 12:35:36 +01:00
Andreas Schneider
68d04c8e47
CVE-2012-4559: Ensure that we don't free req twice.
2012-11-14 17:36:24 +01:00
Xi Wang
d404ad7152
channels: Fix integer overflow in generate_cookie().
...
Since the type of rnd[i] is signed char, (rnd[i] >> 4), which is
considered as arithmetic shift by gcc, could be negative, leading
to out-of-bounds read.
2012-10-22 21:00:08 +02:00
Andreas Schneider
dde3deb9ea
channels: Don't leak memory in channel_rcv_request callback.
...
Found by Coverity.
2012-10-12 08:07:02 +02:00
Andreas Schneider
bb2848de5a
channels: Check return values of buffer functions.
...
Found by Coverity.
2012-10-09 11:09:34 +02:00
Andreas Schneider
ceb8072b34
channel: Fix a possible null pointer dereference.
2012-10-05 11:17:06 +02:00
Andreas Schneider
656fd60110
channels: Fix a possible null pointer dereference.
2012-10-05 11:16:03 +02:00
Andreas Schneider
332f1a2a51
channels: Fix a memory leak in ssh_channel_select().
2012-10-05 11:12:13 +02:00
Andreas Schneider
3739bd99c5
channels: Fix return value of ssh_channel_request_pty_size with SSHv1.
...
Thanks to Dmitriy Kuznetsov <dk@yandex.ru>.
2012-09-07 12:21:28 +02:00
Andreas Schneider
782b2e37c6
build: Fix missing struct in_addr warning.
2012-07-17 18:16:07 +02:00
Aris Adamantiadis
046aa02f39
Fix bugs found by clang
2011-09-23 22:27:46 +02:00
Aris Adamantiadis
dad35304b6
channels: fix embarrasing channel_read_nonblocking bug
2011-09-22 13:48:21 +03:00
Andreas Schneider
c19c638d74
error: Use macros for error functions.
2011-09-17 10:38:08 +02:00
Aris Adamantiadis
36ec488663
channels: don't send SSH2 packets on SSH1 !
2011-09-14 22:35:12 +02:00
Aris Adamantiadis
7e5f1edcb4
auth: fix things broken during merge
2011-09-02 14:09:12 +03:00
Aris Adamantiadis
20f8e73e3e
Update libssh to ssh_handle_packets_termination
...
cherry-picked from 0cb5248
Should resolve all timeout problems
Conflicts:
src/auth.c
src/channels.c
2011-09-02 13:58:37 +03:00
Aris Adamantiadis
ef5701a535
Channels: fix the "server specified invalid channel" bug
...
Resolved by introducing a flag entry in channel structure.
2011-09-02 13:50:06 +03:00
Aris Adamantiadis
7d347aa6f4
channel: ssh_channel_read is nonblocking, + docfixes
...
cherry-picked from 6091147
Conflicts:
src/channels.c
2011-09-02 13:49:05 +03:00
Aris Adamantiadis
6d8bb956c5
channels: replaced bugged lists with ssh_list
...
cherry-picked from 0aef5f
Conflicts:
src/session.c
2011-09-02 13:46:10 +03:00
Aris Adamantiadis
3eece8ac0b
SSH1: fix build
2011-09-02 11:43:12 +03:00
Aris Adamantiadis
92c8a71abb
ssh_select converted to ssh_event, and bugfix to ssh_channel_select
2011-09-02 11:43:12 +03:00
Aris Adamantiadis
d1ebc4697a
channels: ssh_channel_select implemented with ssh_poll
...
Should fix #56
2011-09-02 11:43:11 +03:00
Aris Adamantiadis
cb2a111fa1
channel: implement ssh_channel_poll_timeout
...
Resolves bug #57
2011-09-02 11:43:11 +03:00
Aris Adamantiadis
17ae216340
Channels: increase window size x10
...
Provides me a 3x performance boost for async sftp, 5x for sync sftp
(on localhost)
2011-09-02 11:43:07 +03:00
Aris Adamantiadis
a2c94abb92
channels: made the remaining calls nonblocking + fix #52
2011-09-02 11:42:59 +03:00
Aris Adamantiadis
510c741229
channels: use hard random for the X11 cookie
...
We are in a security library or we are not.
2011-09-02 11:42:59 +03:00
Aris Adamantiadis
f9dad9ad68
channels: made all channel requests nonblocking
2011-09-02 11:42:59 +03:00
rofl0r
66188f1af8
channels: Fix possible infinite loop in channel_read().
2011-08-29 21:47:01 +02:00
Andreas Schneider
13227714f2
channels: Fix incorrect return values in ssh_channel_write().
2011-08-10 16:58:10 +02:00
Andreas Schneider
2f87873642
channels: Handle SSH_AGAIN in channel_open().
2011-08-09 22:59:17 +02:00
rofl0r
7ccd9c31b3
channels: Fix an endless loop in case of a channel_open error.
2011-08-06 11:12:02 +02:00
rofl0r
af85337f5f
session: Fix timeout handling.
...
-2 now means to use the timeout specified in options. It wasn't used
earlier and poll only knows -1 and 0 anyway for special meanings.
2011-08-06 11:12:02 +02:00