From 1bbfe058f935a8b15d88830b1043f2802dae6338 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 21 Jan 2016 12:21:58 +0100 Subject: [PATCH] torture: Add additional sftp-server path for BSD Signed-off-by: Andreas Schneider --- tests/torture.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/torture.c b/tests/torture.c index f1daaf21..e89cdec2 100644 --- a/tests/torture.c +++ b/tests/torture.c @@ -891,10 +891,14 @@ static void torture_setup_create_sshd_config(void **state) sftp_server = "/usr/lib/ssh/sftp-server"; rc = lstat(sftp_server, &sb); if (rc < 0) { - sftp_server = "/usr/libexec/openssh/sftp-server"; + sftp_server = "/usr/libexec/sftp-server"; rc = lstat(sftp_server, &sb); if (rc < 0) { - sftp_server = getenv("TORTURE_SFTP_SERVER"); + sftp_server = "/usr/libexec/openssh/sftp-server"; + rc = lstat(sftp_server, &sb); + if (rc < 0) { + sftp_server = getenv("TORTURE_SFTP_SERVER"); + } } } assert_non_null(sftp_server);