Commit Graph

1240 Commits

Author SHA1 Message Date
Daniel Stenberg
4cf935abab inputchecks: make lots of API functions check for NULL pointers
If an application accidentally provides a NULL handle pointer to
the channel or sftp public functions, they now return an error
instead of segfaulting.
2010-06-11 13:05:55 +02:00
Daniel Stenberg
cce6ebbee7 libssh2_channel_eof: clarify that it returns negative on errors 2010-06-11 13:02:00 +02:00
Daniel Stenberg
18605cb81f SFTP: keep the sftp error code as 32 bit
'last_errno' holds to the error code from the SFTP protocol and
since that is 32 bits on the wire there's no point in using a
long for this internally which is larger on some platforms.
2010-06-11 13:00:31 +02:00
Daniel Stenberg
3490b3fe10 agent: make the code better deal with unexpected code flows
agent->ops gets initialized by the libssh2_agent_connect() call
but we need to make sure that we don't segfault even if a bad
sequence of function calls is used.
2010-06-11 11:13:46 +02:00
Alexander Lamaison
c87a48ae4c Better handling of invalid key files.
Passing an invalid public key to libssh2_userauth_publickey_fromfile_ex
triggered an assertion.  Replaced this with a runtime check that rejects
obviously invalid key data.
2010-06-10 12:25:26 +01:00
Daniel Stenberg
ab8ee8abf3 version: we start working on 1.2.7 now 2010-06-10 10:31:18 +02:00
Daniel Stenberg
6e40af7bea NEWS: add the 1.2.6 release details 2010-06-10 10:19:31 +02:00
Daniel Stenberg
5e46c864dc RELEASE-NOTES: 1.2.6 details added 2010-06-10 10:15:46 +02:00
Guenter Knauf
a4fdf0de01 fixed libssh2.dsw to use the generated libssh2.dsp; removed old *.dsp files. 2010-06-10 02:43:49 +02:00
Guenter Knauf
2c1c751ad1 moved MSVC strdup define to libssh2_config.h which we include already. 2010-06-10 02:31:48 +02:00
Guenter Knauf
f682684fdd added missing source files to src/NMakefile. 2010-06-10 02:28:47 +02:00
Daniel Stenberg
0ad1a52a09 libssh2_poll: refer to poll(3) and select(3) instead 2010-06-08 08:37:37 +02:00
Daniel Stenberg
4e10882e06 example: fix strdup() for MSVC compiles
MSVC has a _strdup() that we better use. This was reported in bug
2010-06-07 13:36:12 +02:00
Daniel Stenberg
eeeebd02e7 SFTP: fail init SFTP if session isn't authenticated
Alexander Lamaison filed bug #172
(http://trac.libssh2.org/ticket/172), and pointed out that SFTP
init would do bad if the session isn't yet authenticated at the
time of the call, so we now check for this situation and returns
an error if detected. Calling sftp_init() at this point is bad
usage to start with.
2010-06-07 13:10:51 +02:00
Daniel Stenberg
f285438022 direct_tcpip: bring back inclusion of libssh2_config.h
In order to increase portability of this example, I'm bringing
the inclusion of libssh2_config.h back, and I also added an
require that header for this example to compile.

I also made all code lines fit within 80 columns.
2010-06-03 13:55:54 +02:00
Guenter Knauf
81912f67e7 cast away a warning. 2010-06-03 05:21:02 +02:00
Guenter Knauf
2996e02482 moved CRT_SECURE_NO_DEPRECATE define up so its defined before the winsock headers are included. 2010-06-03 03:12:20 +02:00
Guenter Knauf
2683fddcca fixed platform detection for MingW32 test makefile. 2010-06-01 21:19:14 +02:00
Guenter Knauf
fa5d6c705d MingW32 has gettimeofday() implemented, so proper ifdef this function here. 2010-06-01 21:09:08 +02:00
Guenter Knauf
b6c6470e7e removed MSVC ifdef since seems we can use __int64 still with latest headers. 2010-06-01 20:24:05 +02:00
Guenter Knauf
dceb3d1452 changed copyright notice for MinW32 and NetWare binaries. 2010-06-01 20:17:05 +02:00
Guenter Knauf
86c935317c cleaned up MSVC ifdefs which where spreaded over 3 places. 2010-06-01 19:32:11 +02:00
Guenter Knauf
aad74b7fa6 added uint8_t typedef for NetWare CLIB platform. 2010-06-01 19:08:19 +02:00
Guenter Knauf
0b593c8a9d if the function declaration gets changed the header should be changed too. 2010-06-01 17:28:46 +02:00
Guenter Knauf
8ff3f62786 this is MSVC specific and doesnt apply for all Win32 compilers;
the uint8_t typedef clashes with MingW32 headers.
2010-06-01 17:15:46 +02:00
Guenter Knauf
4d7b2950d9 updated MingW32 makefiles for latest dependency lib versions. 2010-06-01 16:58:40 +02:00
Guenter Knauf
18569d76de updated NetWare makefiles for latest dependency lib versions. 2010-06-01 16:44:17 +02:00
Dan Fandrich
7a088a8ab7 Fixed compiling with libgcrypt
A change of parameter types from unsigned long to size_t was
missed in the prototype in libgcrypt.h
2010-05-30 22:53:53 -07:00
Daniel Stenberg
d15663477b statvfs: use libssh2_sftp_statvfs only, no "_ex"
As the long-term goal is to get rid of the extensive set of
macros from the API we can just as well start small by not adding
new macros when we add new functions. Therefore we let the
function be libssh2_sftp_statvfs() plainly without using an _ex
suffix.

I also made it use size_t instead of unsigned int for the string
length as that too is a long-term goal for the API.
2010-05-28 17:25:42 +02:00
Grubsky Grigory
8145f9e79c DSP: output lib name typo 2010-05-25 23:28:01 +02:00
Grubsky Grigory
dc747fb221 win32: provide a uint8_t typedef for better building on windows 2010-05-25 23:22:39 +02:00
Daniel Stenberg
76fd96e63e agent: win32: fix bad _libssh2_store_str call
As pointed out by Grubsky Grigory <g.grubsky@securitycode.ru>, I
made a mistake when I added the _libssh2_store_str() call before
and I made a slightly different patch than what he suggested.
Based purely on taste.
2010-05-25 23:19:46 +02:00
Joey Degges
ed526a0e24 Add libssh2_sftp_statvfs() and libssh2_sftp_fstatvfs()
These can be used to get file system statistics from servers that
support the statvfs@openssh.com and fstatvfs@openssh.com extensions.
2010-05-24 07:05:23 +02:00
Jose Baars
667f4acda6 VMS specific: make sure final release can be installed over daily build 2010-05-22 11:06:08 +01:00
Jose Baars
f3208b99ca VMS: small improvement to the man2help utilities 2010-05-22 11:05:29 +01:00
Joey Degges
b702441242 libssh2_exit and libssh2_sftp_readdir man page fixes 2010-05-22 08:30:42 +02:00
Daniel Stenberg
396dcedc56 spelling: s/sue/use 2010-05-21 23:37:43 +02:00
Alexander Lamaison
798a808a2b Change magic port number for generic knownhost check.
libssh2_knownhost_checkp took 0 as a magic port number that indicated
a 'generic' check should be performed.  However, 0 is a valid port
number in its own right so this commit changes the magic value to any
negative int.
2010-05-21 00:01:57 +01:00
Mikhail Gusarov
c8df661129 Add re-discovered copyright holders to COPYING 2010-05-05 15:45:17 +07:00
Mikhail Gusarov
b3ed8e064a Restoring copyright statements from pre-git era
Eli Fant has contributed fragmenting SFTP requests
2010-05-05 15:44:15 +07:00
Mikhail Gusarov
ffb55aa2a3 Restoring my copyright statements from pre-git era
keyboard_interactive, 'exit-status' information packet, non-atomic read/write
under FreeBSD, multi-channel operation bugfixes.
2010-05-05 15:41:19 +07:00
Daniel Stenberg
9251642ef3 pedantic: make the code C90 clean 2010-05-03 22:16:01 +02:00
Peter Stuge
79b97c67c7 Do proper keyboard-interactive user dialog in the sftp.c example 2010-05-03 15:36:16 +02:00
Daniel Stenberg
b23ae2bf22 added to tarball: libssh2_knownhost_checkp.3 2010-05-03 09:45:53 +02:00
Daniel Stenberg
a3f3347c12 knownhost: support [host]:port in knownhost file
OpenSSH has ways to add hosts to the knownhosts file that include
a specific port number which makes the key associated with only
that specific host+port pair. libssh2 previously did not support
this, and I was forced to add a new function to the API to
properly expose this ability to applications:
libssh2_knownhost_checkp()

To *add* such hosts to the knownhosts file, you make sure to pass
on the host name in that manner to the libssh2_knownhost_addc()
function.
2010-05-02 16:56:31 +02:00
Daniel Stenberg
5184aec461 init/exit: mention these were added in 1.2.5 2010-05-01 23:49:45 +02:00
Daniel Stenberg
358aa3e24b libssh2_knownhost_check docs: correct the prototype 2010-05-01 23:35:16 +02:00
Daniel Stenberg
7bbefe0660 examples: avoid use of uninitialized variable 'sock' 2010-04-30 12:30:24 +02:00
Daniel Stenberg
204100e636 KEX: stop pretending we negotiate language
There was some stub-like parts of an implementation for
implementing kex language negotiation that caused clang-analyzer
to warn and as it did nothing I've now removed the dead code.
2010-04-29 23:57:47 +02:00
Daniel Stenberg
6c85370428 Uninitialized argument 2010-04-29 22:01:32 +02:00