Andreas Schneider
d840a05be3
sftp: Reformat sftp_free()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-17 10:48:49 +02:00
Andreas Schneider
662c30eb72
sftp: Reformat sftp_new()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-17 10:48:49 +02:00
Andreas Schneider
29b5477849
include: Add SSH_BUFFER_FREE
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-17 10:48:49 +02:00
Andreas Schneider
2e8f2f03e7
cmake: Correctly detect if glob has gl_flags member
...
Thanks to Baruch Siach.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-17 10:48:49 +02:00
Andreas Schneider
983d1189d0
gitlab-ci: Add builds with gcc7
...
It looks like gcc7 has more warning enabled or something is broken in
gcc8.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-10 13:02:40 +02:00
Andreas Schneider
7b2e1c7fb7
gitlab-ci: Big cleanup
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-10 12:02:08 +02:00
Andreas Schneider
ceecd3fd6f
config: Fix size type
...
src/config.c:562:12: error: assuming signed overflow does not occur when
simplifying conditional to constant [-Werror=strict-overflow]
if (args < 1) {
^
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-06 08:28:24 +02:00
Andreas Schneider
bfd33ecf29
cmake: Use -Wpedantic and remove -pedantic-errors
...
We get -Werror if -DPICKY_DEVELOPER=ON is set.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-06 08:28:24 +02:00
Jakub Jelen
56317caafc
tests: UsePrivilegeSeparation has no effect since OpenSSH 7.5
...
Additionally, we can already work around the privilege separation.
http://www.openssh.com/txt/release-7.5
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 15:43:11 +02:00
Jakub Jelen
ca4fb9c6f8
tests: Do not trace sshd
...
OpenSSH's sshd does not work well under valgrind so lets avoid tracing it.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 15:43:00 +02:00
Andreas Schneider
91800eb243
cmake: Move CompilerFlags to own file
...
They need to be included before the project() call.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 15:28:29 +02:00
Andreas Schneider
2923ad59f9
cmake: Update defaults
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 15:21:34 +02:00
Jakub Jelen
556ad59a5a
tests: Verify the Match keyword from configuration file
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 11:43:05 +02:00
Jakub Jelen
fcb203cb2d
tests: No need to restore log level now
...
Since the verbosity is now set from the setup phase, we do not
need to reset the verbosity, especially not to any arbirary value
such as WARNING.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 11:43:05 +02:00
Jakub Jelen
6dbcc21921
tests: Use global verbosity in tests
...
This allows adjusting the log level of config and options tests using
environment variable LIBSSH_VERBOSITY as it works in most of the other
tests.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 11:43:05 +02:00
Jakub Jelen
2eccd04ff6
tests: Missing unlink
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 11:43:05 +02:00
Jakub Jelen
e9b44d26b1
config: Parse Match keyword
...
Amends f818e63f8, which introduced the constants and matching of this
configuration option, but did not implement the handling of the values
which was causing the configuration parser failing for certain
configurations.
This commit exposes match_pattern_list() from match.c
Red Hat Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1624425
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 11:43:05 +02:00
Jakub Jelen
9f5f10552b
config: Do not overwrite previously matched result in Host blocks
...
The match_hostname() expects comma separated list, while the Host
config keyword in openssh uses spaces separated list by default.
Therefore any subseqent match or negated match in space separated
list will overwrite the previous matches.
This also adjusts the tests to make sure both of the versions work.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 11:43:05 +02:00
Andreas Schneider
458bda8877
tests: Define LIBSSH_STATIC for torture_cmocka
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 11:43:05 +02:00
Andreas Schneider
3d35250c07
tests: Fix linking unit tests
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 11:43:05 +02:00
Andreas Schneider
ef06ef2c1b
channels: Allow infinite timeout for ssh_channel_read_timout()
...
This is also documented.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05 11:43:05 +02:00
Andreas Schneider
ba1ff992ce
libsshpp: Initialize the string returned by getIssueBanner()
...
Fixes T13
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-04 20:52:31 +02:00
Andreas Schneider
e558827c4e
channels: Don't read from a closed channel
...
Fixes T76
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-04 20:34:52 +02:00
Andreas Schneider
1e195a232a
auth: Use calloc to allocate memory
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:59:07 +02:00
Andreas Schneider
d1cd914012
misc: Use C99 initializer to initialize string
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:59:01 +02:00
Andreas Schneider
c3980d433a
pki_container: Use string functions for cleanup
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:58:47 +02:00
Andreas Schneider
78498ee289
packet: Use C99 initializer to reset session->in_packet
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:58:38 +02:00
Andreas Schneider
76f5a60a82
packet: Reformat ssh_packet_parse_type()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:58:30 +02:00
Andreas Schneider
07986731c6
gzip: Use calloc in initcompress() and initdecompress()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:58:23 +02:00
Andreas Schneider
f1608778be
kex: Use C99 initializer instead of memset
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:58:17 +02:00
Andreas Schneider
72e91d5131
channels: Remove memset in ssh_channel_do_free()
...
We have nice tools to detect that in the meantime.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:58:11 +02:00
Andreas Schneider
4af4b59e21
channels: Reformat ssh_channel_free()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:58:03 +02:00
Andreas Schneider
ca464ca2ba
channels: Use calloc() in ssh_channel_new()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:57:58 +02:00
Andreas Schneider
9ac6ac6c26
channel: Reformat ssh_channel_new()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:57:53 +02:00
Andreas Schneider
b6b5a61c97
pki_mbedcrypto: Use explicit_bzero()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:57:48 +02:00
Andreas Schneider
1acb82e38a
pki_crypto: Use explicit_bzero()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:57:43 +02:00
Andreas Schneider
a6d59811bb
getpass: Use explicit_bzero()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:57:31 +02:00
Andreas Schneider
d4a443d56c
getpass: Use calloc to allocate memory
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:57:22 +02:00
Andreas Schneider
62bff4aff1
wrapper: Use explicit_bzero() in crypto_free()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:57:16 +02:00
Andreas Schneider
f8e68b92b8
wrapper: Fix size type
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:57:12 +02:00
Andreas Schneider
9c5d2d4543
wrapper: Reformat crypto_free()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 19:57:06 +02:00
Andreas Schneider
7867126aa6
tests: Add a test for sftp_canonicalize_path()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-04 18:13:37 +02:00
Andreas Schneider
4774d2b9f7
sftp: Fix segfault in sftp_canonicalize_path()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-04 17:30:18 +02:00
Andreas Schneider
f48dcb26e3
string: Don't allow to allocate strings bigger than 256M
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 12:29:20 +02:00
Andreas Schneider
d1f23cd6d8
string: Reformat ssh_string_new()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-04 12:29:09 +02:00
Andreas Schneider
e601dbd8e3
sftp: Use ssh_buffer_pack() in sftp_fstat()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
f3ffd8aa41
sftp: Reformat sftp_lstat()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
4d98b1cd7e
sftp: Use ssh_buffer_pack() in sftp_xstat()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
b00a0578f9
sftp: Reformat sftp_xstat()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
336c097ae7
sftp: Use ssh_buffer_unpack() in sftp_canonicalize_path()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00