1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-29 13:01:14 +03:00
Commit Graph

1698 Commits

Author SHA1 Message Date
87f79f177f remove embedded CVS/svn tags 2011-09-09 16:12:04 +02:00
30ac056cb0 API add:libssh2_sftp_get_channel
Return the channel of sftp, then caller can
control the channel's behavior.

Signed-off-by: liuzl <xieepp@gmail.com>
2011-09-09 16:00:11 +02:00
c45de9176b _libssh2_channel_read: react on errors from receive_window_adjust
Previously the function would ignore all errors except for EAGAIN.
2011-09-09 10:30:43 +02:00
ff40c58743 sftp_read: extend and clarify the documentation 2011-09-08 23:02:58 +02:00
10b66cef08 sftp_read: cap the read ahead maximum amount
Now we only go up to LIBSSH2_CHANNEL_WINDOW_DEFAULT*30 bytes SFTP read
ahead, which currently equals 64K*30 == 1966080 bytes.
2011-09-08 22:47:38 +02:00
81bdcf61f3 _libssh2_channel_read: fix non-blocking window adjusting
If EAGAIN is returned when adjusting the receive window, we must not
read from the transport directly until we've finished the adjusting.
2011-09-08 14:25:25 +02:00
50d451e307 Fix for systems which need sys/select.h. 2011-09-08 13:53:05 +02:00
3f2b1dea5e The files were not gone but renamed ... 2011-09-08 11:59:49 +02:00
7c9b84d1d1 sftp_read: added documenting comment
Taken from some recent email conversations I added some descriptions of
the logic in sftp_read() to aid readers.
2011-09-06 23:31:07 +02:00
1ba42ea847 1.3.1: start the work 2011-09-06 23:27:50 +02:00
507d5f96cf Makefile.am: the Makefile.win32 files are gone libssh2-1.3.0 2011-09-06 22:56:06 +02:00
84d8728835 RELEASE-NOTES: updated for 1.3.0 2011-09-06 22:47:34 +02:00
296d57bb2c sftp_read: a short read is not end of file
A returned READ packet that is short will now only reduce the
offset.

This is a temporary fix as it is slightly better than the previous
approach but still not very good.
2011-09-06 22:43:26 +02:00
9e79031ad7 _libssh2_packet_add: adjust window size when truncating
When receiving more data than what the window size allows on a
particular channel, make sure that the window size is adjusted in that
case too. Previously it would only adjust the window in the non-error
case.
2011-08-31 10:45:12 +02:00
689fc5c596 Silent compiler warning with MinGW64. 2011-08-29 15:30:18 +02:00
31a9e8860d Fixed link to native Win32 awk tool. 2011-08-29 14:05:15 +02:00
b26c3e7cce Renamed MinGW makefiles. 2011-08-29 13:59:43 +02:00
e4eeb85f01 Some MinGW makefile tweaks.
Enable build without GNU tools and with MinGW64 compiler.
2011-08-29 13:54:51 +02:00
7de77e94bf Fixed aes_ctr_do_cipher() signature. 2011-08-29 13:27:46 +02:00
8c0294db66 libssh2_sftp_seek64: flush packetlist and buffered data
When seeking to a new position, flush the packetlist and buffered data
to prevent already received or pending data to wrongly get used when
sftp-reading from the new offset within the file.
2011-08-26 13:47:35 +02:00
900c90ccbe sftp_read: advance offset correctly for buffered copies
In the case where a read packet has been received from the server, but
the entire contents couldn't be copied to the user-buffer, the data is
instead buffered and copied to the user's buffer in the next invocation
of sftp_read(). When that "extra" copy is made, the 'offset' pointer was
not advanced accordingly.

The biggest impact of this flaw was that the 'already' variable at the
top of the function that figures out how much data "ahead" that has
already been asked for would slowly go more and more out of sync, which
could lead to the file not being read all the way to the end.

This problem was most noticable in cases where the application would
only try to read the exact file size amount, like curl does. In the
examples libssh2 provides the sftp read function is most often called
with a fixed size large buffer and then the bug would not appear as
easily.

This bug was introduced in the SFTP rewrite in 1.2.8.

Bug: http://curl.haxx.se/mail/lib-2011-08/0305.html
     http://www.libssh2.org/mail/libssh2-devel-archive-2011-08/0085.shtml
2011-08-26 11:45:48 +02:00
d5eec4aad9 wrap some long lines < 80 columns 2011-08-25 22:41:17 +02:00
19864f0f64 LIBSSH2_RECV: fix typo, use the RECV_FD macro 2011-08-25 22:38:46 +02:00
420f0b7793 subsystem_netconf.c: fix compiler warnings 2011-08-21 15:24:55 +02:00
7aa4bfc671 Custom callbacks for performing low level socket I/O 2011-08-21 15:19:44 +02:00
462996b064 version bump: start working towards 1.3.0 2011-08-16 23:03:52 +02:00
07d7a85bdb RELEASE-NOTES: synced with 95d69d3a81 libssh2-1.2.9 2011-08-16 10:30:13 +02:00
95d69d3a81 Document prototypes for macro defined functions 2011-08-16 10:29:07 +02:00
2fe1770d9f Avoid reuse after free when closing X11 channels 2011-08-16 10:27:49 +02:00
3c71ad4fce _libssh2_channel_write: handle window_size == 0 better
When about to send data on the channel and the window size is 0, we must
not just return 0 if the transport_read() function returned EAGAIN as it
then causes a busy-loop.

Bug: http://libssh2.org/mail/libssh2-devel-archive-2011-08/0011.shtml
2011-08-11 14:36:05 +02:00
79f48e4881 gettimeofday: fix name space pollution
For systems without its own gettimeofday() implementation, we still must
not provide one outside our namespace.

Reported by: Bill Segall
2011-08-05 23:50:22 +02:00
49453c9ae2 libssh2.pc.in: Fixed spelling in pkgconfig file 2011-08-05 14:33:26 -07:00
b232eeb598 example/subsystem_netconf.c: Add missing #include <string.h> 2011-07-17 08:04:52 +02:00
f922df9e1b example/subsystem_netconf.c: Discard ]]>]]> and return only XML response 2011-07-17 08:00:48 +02:00
7e47bd6640 example/subsystem_netconf.c: Fix uninitialized variable bug 2011-07-17 07:18:39 +02:00
4ae907cdef example: Add subsystem_netconf.c
This example demonstrates how to use libssh2 to send a request to
the NETCONF subsystem available e.g. in JunOS.

See also http://tools.ietf.org/html/draft-ietf-netconf-ssh-06
2011-07-17 07:08:48 +02:00
01d199180a man page cleanups: non-existing functions need no man pages 2011-07-16 00:22:00 +02:00
7e18862eae libssh2_new_host_entry.3: removed
This is just junk leftovers.
2011-07-16 00:17:12 +02:00
45ffdcfe3c userauth_keyboard_interactive: fix buffer overflow
Partly reverse 566894494b which was simplifying the code far too
much and ended up overflowing a buffer within the LIBSSH2_SESSION
struct. Back to allocating the buffer properly like it used to do.

Bug: http://www.libssh2.org/mail/libssh2-devel-archive-2011-06/0032.shtml
Reported by: Alfred Gebert
2011-06-29 21:32:50 +02:00
dadc05fdfd keyboard-interactive man page: cleaned up 2011-06-29 20:49:35 +02:00
733bf877f8 _libssh2_recv(): handle ENOENT error as EAGAIN
A sftp session failed with error "failure establishing ssh session" on
Solaris and HP-UX. Sometimes the first recv() function call sets errno
to ENOENT. In the man pages for recv of Solaris and HP-UX the error
ENOENT is not documented.

I tested Solaris SPARC and x86, HP-UX i64, AIX, Windows and Linux.
2011-06-28 22:43:50 +02:00
2db7d9c655 agent_list_identities: fix out of scope access
An auto variable out of scope was being referenced and used.

fixes #220
2011-06-20 00:08:51 +02:00
9a24b03402 _libssh2_wait_socket: fix timeouts for poll() uses 2011-06-20 00:08:51 +02:00
81d53de4dc windows: inclusion fix
include winsock2.h for all windows compilers
2011-06-04 22:24:41 +02:00
5b004a4b67 keyb-interactive: add the fixed buffer
Belongs to commit 5668944
2011-05-31 23:35:49 +02:00
da64618c9a code cleanup: don't use C99/c++ comments
We aim for C89 compliance
2011-05-31 23:35:06 +02:00
566894494b keyb-interactive: allow zero length fields
Allow zero length fields so they don't cause malloc(0) calls

Avoid free()ing NULL pointers

Avoid a malloc of a fixed 5 byte buffer.
2011-05-31 23:33:56 +02:00
0723dab4d7 libssh2_channel_process_startup.3: clean up
Remove the references to the macro-fied shortcuts as they have their own
individual man pages.

Made the prototype different and more readable.
2011-05-30 09:28:31 +02:00
67ba8713a6 man page: fix .BR lines
We don't use \fI etc on .BR lines
2011-05-30 09:26:34 +02:00
dade304c47 userauth_keyboard_interactive: skip code on zero length auth 2011-05-25 22:39:25 +02:00