mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
tests: use detected sshd path
The static sshd directory wasn't matching the detected sshd and prevented the testcases to be run against local OpenSSH builts
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 1089948346)
This commit is contained in:
committed by
Anderson Toshiyuki Sasaki
parent
41e54ce042
commit
6a1dc7df87
@@ -105,23 +105,23 @@ if (SSH_EXECUTABLE)
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_program(SSHD_EXECUTABLE
|
||||||
|
NAME
|
||||||
|
sshd
|
||||||
|
PATHS
|
||||||
|
/sbin
|
||||||
|
/usr/sbin
|
||||||
|
/usr/local/sbin)
|
||||||
|
|
||||||
if (CLIENT_TESTING OR SERVER_TESTING)
|
if (CLIENT_TESTING OR SERVER_TESTING)
|
||||||
find_package(socket_wrapper 1.1.5 REQUIRED)
|
find_package(socket_wrapper 1.1.5 REQUIRED)
|
||||||
find_package(nss_wrapper 1.1.2 REQUIRED)
|
find_package(nss_wrapper 1.1.2 REQUIRED)
|
||||||
find_package(uid_wrapper 1.2.0 REQUIRED)
|
find_package(uid_wrapper 1.2.0 REQUIRED)
|
||||||
find_package(pam_wrapper 1.0.1 REQUIRED)
|
find_package(pam_wrapper 1.0.1 REQUIRED)
|
||||||
|
|
||||||
find_program(SSHD_EXECUTABLE
|
|
||||||
NAME
|
|
||||||
sshd
|
|
||||||
PATHS
|
|
||||||
/sbin
|
|
||||||
/usr/sbin
|
|
||||||
/usr/local/sbin)
|
|
||||||
if (NOT SSHD_EXECUTABLE)
|
if (NOT SSHD_EXECUTABLE)
|
||||||
message(SEND_ERROR "Could not find sshd which is required for client testing")
|
message(SEND_ERROR "Could not find sshd which is required for client testing")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_program(NC_EXECUTABLE
|
find_program(NC_EXECUTABLE
|
||||||
NAME
|
NAME
|
||||||
nc
|
nc
|
||||||
|
|||||||
@@ -65,3 +65,4 @@
|
|||||||
/* Available programs */
|
/* Available programs */
|
||||||
|
|
||||||
#cmakedefine NC_EXECUTABLE "${NC_EXECUTABLE}"
|
#cmakedefine NC_EXECUTABLE "${NC_EXECUTABLE}"
|
||||||
|
#cmakedefine SSHD_EXECUTABLE "${SSHD_EXECUTABLE}"
|
||||||
@@ -845,7 +845,7 @@ void torture_setup_sshd_server(void **state, bool pam)
|
|||||||
s = *state;
|
s = *state;
|
||||||
|
|
||||||
snprintf(sshd_start_cmd, sizeof(sshd_start_cmd),
|
snprintf(sshd_start_cmd, sizeof(sshd_start_cmd),
|
||||||
"/usr/sbin/sshd -r -f %s -E %s/sshd/daemon.log 2> %s/sshd/cwrap.log",
|
SSHD_EXECUTABLE " -r -f %s -E %s/sshd/daemon.log 2> %s/sshd/cwrap.log",
|
||||||
s->srv_config, s->socket_dir, s->socket_dir);
|
s->srv_config, s->socket_dir, s->socket_dir);
|
||||||
|
|
||||||
rc = system(sshd_start_cmd);
|
rc = system(sshd_start_cmd);
|
||||||
|
|||||||
Reference in New Issue
Block a user