Andreas Schneider
86bf835d50
session: Group auth variables in a struct
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 73c9d60e5a )
2018-08-27 12:25:03 +02:00
Jakub Jelen
c9d0362a6b
sftp: Avoid race condition reading incomplete data messages
...
This changes amends f561e6bcb3 which
introduces same check in one place, but miss it in other two places.
We encountered this issue with qemu using SFTP to transfer large
data chunks and in some cases, the file transfer was interrupted
without any reason. From the debug messages, it showed up that
last part of data message/packet was not handled in the time
of the sftp_read() call, therefore the ssh_channel_read() returned
zero (there was no more data to read yet), which made the whole
transfer fail hard instead of retrying later.
The proposed change is reusing the code from previously referenced
commit also in the other places.
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit ae3825dfb2 )
2018-08-27 09:30:14 +02:00
Andreas Schneider
d2989f28db
auth: Fix possible NULL pointer dereference
...
explicit_bzero() doesn't handle NULL.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 8f1e995cec )
2018-08-27 09:30:12 +02:00
Andreas Schneider
0bab6013d0
cmake: Check if the linker supports version scripts
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 4de8ed684b )
2018-08-27 09:30:10 +02:00
Anderson Toshiyuki Sasaki
361d93586c
docs: Update threading documentation
...
Updated threading documentation mentioning changes in the requirements
to use libssh in multithread scenarios.
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit d0f3cdfa10 )
2018-08-24 14:59:12 +02:00
Andreas Schneider
0db13661b4
cmake: Improve compiler flag detection
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit a97e227a9d )
2018-08-24 07:53:20 +02:00
Andreas Schneider
c866592d7d
options: Fix size types
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 119a457357 )
2018-08-24 07:53:18 +02:00
Andreas Schneider
eb90325bed
cmake: Allow zero for variadic macro argument
...
This is also needed for clang.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 4ae7e35d9c )
2018-08-23 22:41:25 +02:00
Andreas Schneider
c878545977
cmake: Add header to AddCCompilerFlag.cmake
...
(cherry picked from commit 47bf099c36 )
2018-08-23 22:41:23 +02:00
Andreas Schneider
741021513b
options: Fix integer types
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 9a43298b3a )
2018-08-23 22:41:21 +02:00
Andreas Schneider
97e8aba080
options: Reformat ssh_options_getopt()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 3f17154367 )
2018-08-23 22:41:19 +02:00
Andreas Schneider
802d46d040
cmake: Disable include_guard as oss-fuzz's cmake version is too old
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit f8435e261c )
2018-08-22 12:12:27 +02:00
Andreas Schneider
96718df15e
gitlab-ci: Add target to build the docs
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 6162b63d5e )
2018-08-22 09:09:13 +02:00
Andreas Schneider
89bd779e78
cmake: Remove obsolete UseDoxygen.cmake
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 19e081aedb )
2018-08-22 09:09:12 +02:00
Andreas Schneider
b5af3e74d7
cmake: Use FindDoxygen package provided by cmake
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit a154bd9f22 )
2018-08-22 09:09:10 +02:00
Andreas Schneider
2d3932d988
doc: Update Doxyfile.in
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit e618298bda )
2018-08-22 09:09:08 +02:00
Andreas Schneider
d0c1583ad2
knownhosts: Add knownhosts to libssh_session group
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 7e1b67754c )
2018-08-22 09:09:06 +02:00
Andreas Schneider
59ff4064ba
libssh: Document ssh_known_hosts_e
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 868623f9a8 )
2018-08-22 09:09:04 +02:00
Andreas Schneider
00a68c985f
libsshpp: Match documentation with the code
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 49f92cf5cd )
2018-08-22 09:09:02 +02:00
Andreas Schneider
e862ea556c
channels: Fix timeout variable to match documentation
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit c2fc9ac956 )
2018-08-22 09:09:00 +02:00
Andreas Schneider
a4704cba0b
cmake: Remove obsolete DefineCompilerFlags.cmake
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 9820a35a9e )
2018-08-22 09:08:20 +02:00
Andreas Schneider
455b3a7865
cmake: Set -D_FORTIFY_SOURCE=2 if possible
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 5e9435924c )
2018-08-22 09:08:19 +02:00
Andreas Schneider
fabaab1540
gssapi: Fix size types
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 64a354159f )
2018-08-22 09:08:17 +02:00
Andreas Schneider
8ac49ff181
options: Fix size types
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 0a46690eca )
2018-08-22 09:08:15 +02:00
Andreas Schneider
cdf55a18d2
kex: Fix size types
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 26263aabd4 )
2018-08-22 09:08:13 +02:00
Andreas Schneider
d158ca7101
tests: Check return code of setuid()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 6867a35004 )
2018-08-22 09:08:12 +02:00
Andreas Schneider
664b7ebfa1
known_hosts: Update documentation of deprecated knwon_hosts functions
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 7946104566 )
2018-08-21 11:40:48 +02:00
Andreas Schneider
163c488e30
gitlab-ci: Add two builds with optimizations turned on
...
This enables the optimizer and will give use additional compiler
warnings and errors.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 140ddf5109 )
2018-08-20 18:43:25 +02:00
Andreas Schneider
4b5bfa7a9d
gitlab-ci: Enable PICKY_DEVELOPER
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 887908107a )
2018-08-20 18:43:23 +02:00
Andreas Schneider
decbadda45
cmake: Add support for picky developer flags
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 8855a140cf )
2018-08-20 18:43:22 +02:00
Andreas Schneider
f00d780c16
cmake: Improve compiler flag detection
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit a9a99fb31f )
2018-08-20 18:43:20 +02:00
Andreas Schneider
1daa2e4609
cmake: Check for -Werror in ConfigureChecks.cmake
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 26a4097742 )
2018-08-20 18:43:19 +02:00
Andreas Schneider
d84bc3ad8e
cmake: Respect CMAKE_REQUIRED_* variables in CHECK_C_COMPILER_FLAG_SSP
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 99a9cf0fcb )
2018-08-20 18:43:18 +02:00
Andreas Schneider
a9350e3205
tests: Make sure pointer are initialized in torture_pki_ed25519
...
Fixes compiler warnings.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit fd157befae )
2018-08-20 18:43:16 +02:00
Andreas Schneider
95e3a7e7a3
tests: Make sure pointer are initialized in torture_pki_ecdsa
...
Fixes compiler warnings.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 6f6840a88a )
2018-08-20 18:43:15 +02:00
Andreas Schneider
e4cecee7d3
tests: Make sure pointer are initialized in torture_pki_dsa
...
Fixes compiler warnings.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 562e579675 )
2018-08-20 18:43:14 +02:00
Andreas Schneider
8b867b41d3
tests: Make sure pointer are initialized in torture_pki_rsa
...
Fixes compiler warnings.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 1e89896d05 )
2018-08-20 18:43:12 +02:00
Andreas Schneider
c6bd2fe734
tests: Use ZERO_STRUCT for readfds
...
This fixes a compiler warning on FreeBSD.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 3b896750b8 )
2018-08-20 18:43:11 +02:00
Andreas Schneider
d7e52b99bd
tests: Fix function declaration in pkd_hello
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit f433949dcd )
2018-08-20 18:43:09 +02:00
Andreas Schneider
a640d9472a
tests: Fix function declaration in torture_packet
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 8e418ea020 )
2018-08-20 18:43:08 +02:00
Andreas Schneider
b15103ef4e
log: Make sure the buffer for date is big enough
...
src/log.c:71:32: error: '%06ld' directive output may be truncated
writing between 6 and 20 bytes into a region of size between 0 and 63
[-Werror=format-truncation=]
snprintf(buf, len, "%s.%06ld", tbuf, (long)tv.tv_usec);
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 6766b0a860 )
2018-08-20 18:43:06 +02:00
Andreas Schneider
95071cd1fe
agent: Fix type of the buffer
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit ce45de9ea2 )
2018-08-20 18:43:05 +02:00
Andreas Schneider
18a888f9fb
mbedtls: Use getter for ssh_mbedtls_ctr_drbg
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 85d2c0371a )
2018-08-20 18:43:04 +02:00
Andreas Schneider
bbfc41948a
examples: Fix function declaration in sshnetcat
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 1d9f548204 )
2018-08-20 18:43:02 +02:00
Andreas Schneider
c29a8cc084
include: Fix shadow variables in libsshpp
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit dad456a1ee )
2018-08-20 18:43:00 +02:00
Jakub Jelen
54e7af83e6
sftp: Fix the debug message in sftp_enqueue()
...
This fixes the assignment of variables to comments and makes
the output symmetric with sftp_dequeue().
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit a0214dfc9a )
2018-08-18 10:01:47 +02:00
Jakub Jelen
3483d6327d
tests: Unsupported and unknown configuration options do not crash
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit c004b43fde )
2018-08-16 18:18:17 +02:00
Jakub Jelen
5869345899
config: Do not access negative indexes of seen array
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
(cherry picked from commit 6848c23d84 )
2018-08-16 18:18:15 +02:00
Andreas Schneider
0cad2778b4
cmake: Correctly detect support for __bounded__ attribute
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 4104d2fb91 )
2018-08-16 17:47:14 +02:00
Andreas Schneider
24de1fbde8
init: Fix DllMain
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 86d00f438c )
2018-08-16 09:22:12 +02:00