Andreas Schneider
8e418ea020
tests: Fix function declaration in torture_packet
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-20 18:42:03 +02:00
Andreas Schneider
6766b0a860
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>
2018-08-20 18:42:03 +02:00
Andreas Schneider
ce45de9ea2
agent: Fix type of the buffer
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-20 18:42:03 +02:00
Andreas Schneider
85d2c0371a
mbedtls: Use getter for ssh_mbedtls_ctr_drbg
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-20 18:42:03 +02:00
Andreas Schneider
1d9f548204
examples: Fix function declaration in sshnetcat
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-20 18:42:03 +02:00
Andreas Schneider
dad456a1ee
include: Fix shadow variables in libsshpp
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-20 18:42:03 +02:00
Jakub Jelen
a0214dfc9a
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>
2018-08-18 10:00:37 +02:00
Jakub Jelen
c004b43fde
tests: Unsupported and unknown configuration options do not crash
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2018-08-16 17:51:05 +02:00
Jakub Jelen
6848c23d84
config: Do not access negative indexes of seen array
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2018-08-16 17:51:05 +02:00
Andreas Schneider
4104d2fb91
cmake: Correctly detect support for __bounded__ attribute
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-16 17:45:56 +02:00
Andreas Schneider
86d00f438c
init: Fix DllMain
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-16 09:19:58 +02:00
Andreas Schneider
f65882cca6
cmake: Fix optional ABIMap detection
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2018-08-14 15:54:55 +02:00
Andreas Schneider
a3475c2e4b
cmake: Bump library version for release
2018-08-13 22:18:41 +02:00
Andreas Schneider
4d87256ca7
init: Add a library constructor and destructor for VC
...
If we compile with Visual Studio, we need a DllMain() for running init
and finialize which is the same as a constructor and destructor.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 21:48:48 +02:00
Andreas Schneider
6aa9392699
cmake: Only set -Werror on UNIX
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 21:48:48 +02:00
Andreas Schneider
0656f8a43d
cmake: Improve NSIS detection on Windows
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 21:48:48 +02:00
Anderson Toshiyuki Sasaki
66a3bc0332
init: ignore init counter if destructor calls finalize
...
If the destructor calls finalize, ignore the init counter and finalize
the library anyway.
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 15:27:36 +02:00
Andreas Schneider
dbce0e5228
cmake: Fix PACKAGE and VERSION in config.h
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 13:44:58 +02:00
Andreas Schneider
8ef35a005c
cmake: Fix pkg-config file
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 13:44:58 +02:00
Andreas Schneider
8425dce7b2
cmake: Remove obsolete libssh_threads.pc.cmake
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 13:44:58 +02:00
Anderson Toshiyuki Sasaki
0be1ae0e3b
threads: use static error check mutex initializer if available
...
This changes the condition to use the static error check mutex
initializer. If it is not available, use the default static mutex
initializer.
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 12:00:13 +02:00
Andreas Schneider
83898f3f6c
cmake: Only install static lib if built WITH_STATIC_LIB
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 10:27:17 +02:00
Andreas Schneider
a33e71ae88
include: Bump libssh version
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 09:22:39 +02:00
Andreas Schneider
f2b6899298
init: Only use constructor attribute if available
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 09:21:39 +02:00
Andreas Schneider
4c058aefd9
cmake: Detect constructor and destructor attributes
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 09:21:17 +02:00
Andreas Schneider
8c2ad7bdd3
cmake: Fix fallthrough attribute detection
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 09:15:35 +02:00
Andreas Schneider
e04a8b3abd
cmake: Fix check for bounded attribute
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 09:14:15 +02:00
Andreas Schneider
15ab612592
cmake: Set the PACKAGE_VERSION correctly
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-13 08:47:39 +02:00
Andreas Schneider
4f0f1a9160
cpack: Fix ignore files
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-10 14:18:18 +02:00
Andreas Schneider
d66ea0b3b1
Update ChangeLog entries for 0.8.0
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-10 12:20:57 +02:00
Andreas Schneider
1d93b94086
cmake: Remove DESCRIPTION from project
...
This is only available with cmake >= 3.9.0. It should fix oss-fuzz.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-10 12:20:57 +02:00
Anderson Toshiyuki Sasaki
efc427fdce
cmake: Introduce symbol versioning
...
This adds a cmake module, FindABIMap, which looks for abimap and
provides functions to generate a symbol version linker script.
The module can be included using find_package(ABIMap).
This also adds the option to compile with symbol versioning. The symbol
list is obtained from the header files by filtering those marked with
the LIBSSH_API modifier.
Such symbols are used as input to generate the version script used by
the linker. The version script is automatically updated as new symbols
marked with LIBSSH_API are added to the header files.
If any symbol is removed, the build will fail due to break in the ABI.
Symbol versioning is enabled by default if abimap has been found. It is
disabled in non-UNIX platforms. It can be disabled by passing
"-DWITH_SYMBOL_VERSIONING=OFF" option to cmake.
Pair-Programmed-With: Andreas Schneider <asn@cryptomilk.org>
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-08 20:58:23 +02:00
Andreas Schneider
0f64bc78a8
ABI: Add map file for library version 4.5.0
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-08 20:58:23 +02:00
Andreas Schneider
2dbb7ff091
cmake: Update cmake and cpack config
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-08 20:58:23 +02:00
Andreas Schneider
b77fa93551
gitlab-ci: Point openSUSE to its krb5-config
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-08 20:58:23 +02:00
Andreas Schneider
8ce4004260
tests: Free memory of tmp_file in torture_knownhosts_parsing
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-08 15:04:59 +02:00
Andreas Schneider
8c11367410
tests: Fix memory leak in torture_knownhosts_read_file()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-08 15:04:59 +02:00
Andreas Schneider
460026459b
tests: Do not leak memory when freeing ed25519 keys
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-08 15:04:59 +02:00
Andreas Schneider
6c87316a9c
session: Fix memory leak of global_knownhosts
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-08 15:04:59 +02:00
Andreas Schneider
96476f74af
kownhosts: Fix a memory leak in ssh_session_has_known_hosts_entry()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-08 15:04:59 +02:00
Andreas Schneider
52b57077de
knownhosts: Fix a memory leak in ssh_session_get_known_hosts_entry()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-08 15:04:59 +02:00
Andreas Schneider
2839d48cb8
tests: Fix a typo in torture.c
...
Thanks Nikos for spotting it.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-07 15:41:45 +02:00
Marcin Szalowicz
5ea81166bf
include: Fix segfault in getIssueBanner, add missing wrappers in libsshpp
...
Also make some private properties protected
Signed-off-by: Marcin Szalowicz <marcin.szalowicz@oracle.com>
2018-08-07 14:31:55 +02:00
Andreas Schneider
a86d1d335b
torture: Increase wait time for sshd startup
...
It is much slower when started with valgrind.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-06 15:23:43 +02:00
Anderson Toshiyuki Sasaki
18dd902307
gssapi: set error state when GSSAPI auth fails
...
When errors occurred, the session auth state was not being updated,
leading to failures due to the wrong state in following authentication
methods.
Fixes T56
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-06 10:48:16 +02:00
Anderson Toshiyuki Sasaki
d85827f646
auth: Some code style fixes
...
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-06 10:26:19 +02:00
Anderson Toshiyuki Sasaki
6e74c6c1dc
auth: Improve pending call error messages
...
This can help when debugging in the future
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-06 10:26:00 +02:00
Andreas Schneider
ec6df9896a
tests: Add missing check for valid fd
...
CID 1032753
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-06 09:52:14 +02:00
Andreas Schneider
ab7c5c448c
tests: Add additional NULL checks
...
CID 1393894
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-06 09:43:51 +02:00
Andreas Schneider
5871d604cd
tests: Use fstat instead of lstat
...
CID 1393878
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-06 09:38:59 +02:00