1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00
Commit Graph

90 Commits

Author SHA1 Message Date
Andreas Schneider
166ccef8dc session: Fix a possible use after free in ssh_free().
We need to cleanup the channels first cause we call ssh_channel_close()
on the channels which still require a working socket and poll context.

Thanks to sh4rm4!
2012-10-22 17:37:32 +02:00
Andreas Schneider
802e4133cb session: Don't leak memory in ssh_send_debug().
Found by Coverity.
2012-10-12 08:07:02 +02:00
Andreas Schneider
c5782b7486 session: Make sure we don't segfault on freeing id. 2012-10-07 10:52:54 +02:00
Andreas Schneider
280ce3fe93 session: Fix a memory leak in ssh_new() on error. 2012-10-05 11:12:13 +02:00
Andreas Schneider
43e3a8e497 socket: Add a SSH_WRITE_PENDING socket status. 2012-07-17 18:05:51 +02:00
Andreas Schneider
ee774479de session: Use a struct for all options. 2012-02-05 11:50:49 +01:00
Martin Drasar
31727bf33a Ignore and debug messages can be sent using public API
Signed-off-by: Martin Drasar <drasar@ics.muni.cz>
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-01-05 11:26:53 +01:00
rofl0r
2ffbdb0492 commit a7e14524c4f7903f607cdcd02b83782e89f0a82c 2012-01-02 16:31:37 +01:00
rofl0r
4305da29a1 session: Cleanup timeout functions.
It is possible that we get unrelated packets while waiting for
termination, thus waiting indefinitely. As a workaround we have to
check the user-supplied timeout.
2012-01-02 12:39:43 +01:00
Andreas Schneider
5083742192 packet: Move packet callbacks to packet_cb.c. 2011-09-18 21:37:18 +02:00
Andreas Schneider
acfc8ea83f priv: Remove crypto.h and add correct includes to src files. 2011-09-18 21:37:17 +02:00
Aris Adamantiadis
ac41a083ef kex: moved KEX structures to ssh_crypto_struct 2011-09-18 20:34:16 +02:00
Aris Adamantiadis
07abc3406d kex: split key selection and sending 2011-09-18 20:34:15 +02: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
6d8bb956c5 channels: replaced bugged lists with ssh_list
cherry-picked from 0aef5f
Conflicts:

	src/session.c
2011-09-02 13:46:10 +03:00
Andreas Schneider
4de4520559 server: Use new pki infrastructure. 2011-08-22 14:29:39 +02:00
Andreas Schneider
5bcf36f098 session: Fix ssh_free() with NULL argument. 2011-08-20 10:47:59 +02:00
rofl0r
7949f2cdc6 session: Fix an infinite loop in the termination callback.
This happened due to the use of the buggy and obsolete timeout
funtions.
2011-08-10 15:41:36 +02:00
Andreas Schneider
2f87873642 channels: Handle SSH_AGAIN in channel_open(). 2011-08-09 22:59:17 +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
Aris Adamantiadis
da954c2c5e Fixes the ssh_log issue on ssh_bind handles. 2011-07-19 22:16:28 +02:00
Andreas Schneider
3c21281bf0 session: Fix return code of ssh_blocking_flush(). 2011-05-28 13:27:14 +02:00
Aris Adamantiadis
59f7647cd9 Introduced ssh_timeout_elapsed functions
Functions to mesure elapsed time before and after a serie of
calls. Introduces a dependancy to clock_gettime() and librt,
hope this doesn't break anything. Porting to gettimeofday() should
not be too hard.
2011-05-24 23:26:18 +02:00
Oliver Stöneberg
671a982739 connect: Set timeout on connect
This also fixes error handling in ssh_poll_ctx_dopoll() and
ssh_handle_packets(), so it won't loop forever on an actual timeout.
2011-05-17 14:21:04 +02:00
Andreas Schneider
8b95328b1b poll: Fix poll input events.
bug#38
2011-04-15 19:14:15 +02:00
Aris Adamantiadis
4bc9c96e4e Change session state after receiving a Disconnect 2011-03-28 12:46:08 +02:00
Aris Adamantiadis
dff4e4e6d3 Implement ssh_blocking_flush()
Based on code from Jan Willamowius
2011-03-22 11:49:57 +01:00
milo
32e23a25da Reverse commit 076dfb82 for the server side 2011-02-10 14:37:34 +01:00
Andreas Schneider
93a2d79459 session: Added ssh_is_connected(). 2011-02-06 10:50:14 +01:00
Andreas Schneider
8f850585dd session: Fixed possible uninitialized return of ret. 2011-02-05 15:23:19 +01:00
Aris Adamantiadis
5b6f048197 Use termination functions for event polling 2011-01-12 23:04:43 +01:00
Aris Adamantiadis
bcea8921ba Change blocking parameter to a flag 2011-01-10 17:39:47 +01:00
Aris Adamantiadis
076dfb8294 Fix connection callbacks called at wrong time 2011-01-10 12:14:26 +01:00
Aris Adamantiadis
ac6278feb7 Fix leak when key exchange fails. 2011-01-09 22:27:55 +01:00
Aris Adamantiadis
4fa2e4dde1 Added compression options and allow "yes/no" setting
SSH_OPTION_COMPRESSION and SSH_OPTION_COMPRESSION_LEVEL options have been added. Now, end-level apps may simply choose to enable compression without knowing the relevant algorithms behind it.
2010-12-27 23:28:39 +01:00
Aris Adamantiadis
4f8907a524 Removed the global poll ctx in fav. of /session ctx 2010-10-12 17:57:15 +02:00
Aris Adamantiadis
75a0281a6b Fixed outgoing flow control + writes behaviours 2010-09-26 22:33:58 +02:00
Andreas Schneider
325cc4e395 session: Fixed a memory leak with session->bindaddr. 2010-09-07 17:30:10 +02:00
Andreas Schneider
f7842e3a4b misc: Rename libssh/ to src/ 2010-09-06 14:28:38 +02:00