1
1

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>
Этот коммит содержится в:
Anderson Toshiyuki Sasaki 2019-10-02 15:24:59 +02:00 коммит произвёл Andreas Schneider
родитель d4fe8e1f62
Коммит f97a8b4e3f

Просмотреть файл

@ -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);