From f97a8b4e3f60b2345e9e4b77c42d179435736338 Mon Sep 17 00:00:00 2001 From: Anderson Toshiyuki Sasaki Date: Wed, 2 Oct 2019 15:24:59 +0200 Subject: 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 Reviewed-by: Andreas Schneider --- tests/client/torture_knownhosts.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.2.3