diff --git a/tests/client/torture_rekey.c b/tests/client/torture_rekey.c index 7c9d8127..a70b39d6 100644 --- a/tests/client/torture_rekey.c +++ b/tests/client/torture_rekey.c @@ -283,7 +283,7 @@ static void torture_rekey_recv(void **state) memcpy(secret_hash, c->secret_hash, c->digest_len); /* Download a file */ - file = sftp_open(s->ssh.tsftp->sftp, "/usr/bin/ssh", O_RDONLY, 0); + file = sftp_open(s->ssh.tsftp->sftp, SSH_EXECUTABLE, O_RDONLY, 0); assert_non_null(file); mask = umask(S_IRWXO | S_IRWXG); @@ -473,7 +473,7 @@ static void torture_rekey_server_recv(void **state) memcpy(secret_hash, c->secret_hash, c->digest_len); /* Download a file */ - file = sftp_open(s->ssh.tsftp->sftp, "/usr/bin/ssh", O_RDONLY, 0); + file = sftp_open(s->ssh.tsftp->sftp, SSH_EXECUTABLE, O_RDONLY, 0); assert_non_null(file); mask = umask(S_IRWXO | S_IRWXG); diff --git a/tests/client/torture_sftp_read.c b/tests/client/torture_sftp_read.c index 2208fbae..687153eb 100644 --- a/tests/client/torture_sftp_read.c +++ b/tests/client/torture_sftp_read.c @@ -73,7 +73,7 @@ static void torture_sftp_read_blocking(void **state) { sftp_file file; mode_t mask; - file = sftp_open(t->sftp, "/usr/bin/ssh", O_RDONLY, 0); + file = sftp_open(t->sftp, SSH_EXECUTABLE, O_RDONLY, 0); assert_non_null(file); mask = umask(S_IRWXO | S_IRWXG);