diff options
author | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2019-10-02 15:24:59 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-10-25 15:15:20 +0200 |
commit | f97a8b4e3f60b2345e9e4b77c42d179435736338 (patch) | |
tree | 0e1b4efcda52687de8b8bcc5abbf90289e71f21e | |
parent | d4fe8e1f62814287448bb0a042933e3fd3e07e0a (diff) | |
download | libssh-f97a8b4e3f60b2345e9e4b77c42d179435736338.tar.gz libssh-f97a8b4e3f60b2345e9e4b77c42d179435736338.tar.xz libssh-f97a8b4e3f60b2345e9e4b77c42d179435736338.zip |
tests: Do not process config when reinitializing session
Do not process system-wide configuration when reinitializing a session
during testing. This could lead to different settings set from the
expected one (which was initialized during test setup).
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | tests/client/torture_knownhosts.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/client/torture_knownhosts.c b/tests/client/torture_knownhosts.c index c0b3ee18..fcc54846 100644 --- a/tests/client/torture_knownhosts.c +++ b/tests/client/torture_knownhosts.c @@ -103,6 +103,7 @@ static void torture_knownhosts_port(void **state) { char *p; FILE *file; int rc; + bool process_config = false; snprintf(tmp_file, sizeof(tmp_file), @@ -137,6 +138,7 @@ static void torture_knownhosts_port(void **state) { /* Now, connect back to the ssh server and verify the known host line */ s->ssh.session = session = ssh_new(); + ssh_options_set(session, SSH_OPTIONS_PROCESS_CONFIG, &process_config); ssh_options_set(session, SSH_OPTIONS_HOST, TORTURE_SSH_SERVER); ssh_options_set(session, SSH_OPTIONS_KNOWNHOSTS, known_hosts_file); free(known_hosts_file); |