1
1

132 Коммитов

Автор SHA1 Сообщение Дата
Andreas Schneider
72e91d5131 channels: Remove memset in ssh_channel_do_free()
We have nice tools to detect that in the meantime.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:58:11 +02:00
Andreas Schneider
4af4b59e21 channels: Reformat ssh_channel_free()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:58:03 +02:00
Andreas Schneider
ca464ca2ba channels: Use calloc() in ssh_channel_new()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:57:58 +02:00
Andreas Schneider
9ac6ac6c26 channel: Reformat ssh_channel_new()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:57:53 +02:00
Andreas Schneider
c2fc9ac956 channels: Fix timeout variable to match documentation
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-22 09:08:39 +02:00
Andreas Schneider
c503bb572e crytpo: Make sure we check return of ssh_get_random() correctly
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-07-05 12:12:14 +02:00
Andreas Schneider
88673b2d1f channels: Fix NULL check in channel_rcv_data callback
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-30 14:37:04 +02:00
Andreas Schneider
206f3ff895 Rest in Peace SSHv1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-06-29 14:41:14 +02:00
Andreas Schneider
c563ed636a Remove vim modelines from all files
If you want modelines use my vim plugin:
https://github.com/cryptomilk/git-modeline.vim

git config --add vim.modeline "ts=4 sw=4 et"

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-28 08:41:08 +02:00
Axel Eppe
fb2fefb3c6 channels: add ssh_channel_request_send_break to support RFC 4335
Signed-off-by: Axel Eppe <aeppe@google.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-04-10 11:16:23 +02:00
Andreas Schneider
aaeb938ca4 channels: Use calloc() instead of malloc()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-01-18 18:52:04 +01:00
Andreas Schneider
f0ddde4826 Fix config.h includes
We need stdlib.h and string.h in priv.h for free() and memset().

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-10-28 14:31:37 +02:00
Andreas Schneider
5437deed1b callbacks: Add support for MSVC
__typeof__ is GCC specific

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-05 20:00:02 +01:00
Aris Adamantiadis
9b3648ded0 connector: Implement ssh_connector_except()
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02 16:58:47 +02:00
Aris Adamantiadis
0701745cbc channels: Move ssh_channel_write_stderr out of server-only
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02 16:57:13 +02:00
Aris Adamantiadis
bbe437dbb1 callbacks: Implement list of callbacks for channels
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02 16:56:54 +02:00
David Kedves
d7df4429eb channels: Bugfix for a possible invalid pointer usage (channel->session) in various places
BUG: https://red.libssh.org/issues/230

Signed-off-by: David Kedves <kedazo@severalnines.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02 15:31:46 +02:00
Fabiano Fidêncio
05fd0acf45 buffer: do not use ssh_buffer_get_rest_len()
As ssh_buffer_get_len() actually calls ssh_buffer_get_rest_len(), let's
just use the first one. This is a preparatory step for removing
ssh_buffer_get_rest_len().

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19 11:31:08 +01:00
Fabiano Fidêncio
954341dd1f buffer: rename ssh_buffer_get_rest() to ssh_buffer_get()
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19 11:31:07 +01:00
Fabiano Fidêncio
e368d01385 cleanup: use ssh_ prefix in the packet (non-static) functions
Having "ssh_" prefix in the functions' name will avoid possible clashes
when compiling libssh statically.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19 11:31:07 +01:00
Fabiano Fidêncio
501faacf8e cleanup: use ssh_ prefix in the channels (non-static) functions
Having "ssh_" prefix in the functions' name will avoid possible clashes
when compiling libssh statically.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19 11:31:07 +01:00
Fabiano Fidêncio
adc8c20ac1 cleanup: use ssh_ prefix in the buffer (non-static) functions
Having "ssh_" prefix in the functions' name will avoid possible clashes
when compiling libssh statically.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19 11:31:07 +01:00
Fabiano Fidêncio
2bf6e66ffe client: handle agent forward open requests with callbacks
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Aris Adamantiadis <aris@badcode.be>
2015-07-07 13:24:55 +02:00
Peter Volpe
7637351065 channels: Fix exit-signal data unpacking
Signed-off-by: Peter Volpe <pvolpe@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-06-29 09:50:09 +02:00
Aris Adamantiadis
c480a29052 channels: fix exit-status not correctly set 2015-06-03 16:41:05 +02:00
Mike DePaulo
4aef82237d Comment that ssh_forward_cancel() is deprecated.
Signed-off-by: Aris Adamantiadis <aris@badcode.be>
2015-05-29 11:29:49 +02:00
Mike DePaulo
8a4a22d7b7 Reintroduce ssh_forward_listen() (Fixes: #194)
Signed-off-by: Aris Adamantiadis <aris@badcode.be>
2015-05-29 11:23:31 +02:00
Aris Adamantiadis
506e11fa8b buffers: adapt channels.c to ssh_buffer_(un)pack()
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:33:03 +02:00
Gangadhar Sandrani
d6e6a453fc log: Fix log levels.
Signed-off-by: Gangadhar Sandrani <gangadhar.sandrani@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-22 09:35:33 +02:00
Andreas Schneider
adf23533e0 doc: Improve docs for ssh_channel_get_exit_status().
BUG: https://red.libssh.org/issues/154
2014-04-10 08:54:11 +02:00
Andreas Schneider
927cd90dc1 channels: Fix exit-signal request.
BUG: https://red.libssh.org/issues/153
2014-04-10 08:54:11 +02:00
Jon Simons
dee8e5688b channel: check for closed state in waitwindow loops
Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-03-27 10:34:22 +01:00
Audrius Butkevicius
a277dd9277 Add session/channel byte/packet counters
Signed-off-by: Audrius Butkevicius <audrius.butkevicius@elastichosts.com>
2014-02-12 18:21:16 +01:00
Jon Simons
f7b61bf557 doc: correct ssh_channel_read_timeout units
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-02-02 22:19:46 +01:00
Oleksandr Shneyder
d904784489 Make function ssh_channel_accept() nonblocking if timeout is 0.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-02-02 22:19:45 +01:00
Andreas Schneider
cb9786b3ae src: Rename buffer_add_data() to ssh_buffer_add_data(). 2014-01-19 20:55:55 +01:00
Andreas Schneider
9c4144689d src: Rename buffer_init to ssh_buffer_init(). 2014-01-19 20:43:29 +01:00
Andreas Schneider
e745236ae5 doc: Fix channel documentation. 2014-01-17 11:08:49 +01:00
Andreas Schneider
5229253f86 channel: Fix the name scheme of the forward functions. 2014-01-16 09:13:06 +01:00
Oleksandr Shneyder
a1c4fc07d4 channel: Add ssh_channel_accept_forward().
This works same way as ssh_forward_accept() but can return a destination
port of the channel (useful if SSH connection forwarding several TCP/IP
ports).

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-01-16 09:12:03 +01:00
Andreas Schneider
6fe51b13fb src: Update my mail address. 2014-01-07 16:08:23 +01:00
Aris Adamantiadis
aecd952d18 update copyright information 2014-01-07 15:18:15 +01:00
Jon Simons
20b5734649 channel: fix setting of channel->flags
Fix the setting of 'channel->flags' to use '|='.  Before this
change, one bug symptom can be that channels are never fully
free'd via ssh_channel_free, resulting in memory leaks.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-12-11 21:02:47 +01:00
Andreas Schneider
d65777b570 channels: Add a ssh_channel_read_timeout function. 2013-12-04 20:34:13 +01:00
Jon Simons
3d934f3ddc channel: fix infinite loop in channel_write_common
BUG: https://red.libssh.org/issues/130

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-11-22 10:34:23 +01:00
Rod Vagg
06cc94eecf flush channel after EOF and CLOSE 2013-11-18 17:22:30 +01:00
Andreas Schneider
6f0f1ef292 doc: Fix doxygen warnings. 2013-11-04 21:55:29 +01:00
Andreas Schneider
e30acdb58a channel: Reinit the buffer and reset the state on error.
BUG: https://red.libssh.org/issues/126
2013-10-20 12:46:57 +02:00
Andreas Schneider
b0cbe88b0b channel: Fix ssh_global_request_termination().
BUG: https://red.libssh.org/issues/126
2013-10-20 12:46:17 +02:00
Andreas Schneider
423d8c9b6a channel: Fix packets termination timeout in global_request().
BUG: https://red.libssh.org/issues/126
2013-10-01 14:50:56 +02:00