From 6cd6fe0c8b60d558ffb5682f20f6345ebc89852b Mon Sep 17 00:00:00 2001 From: Alexey Shabalin Date: Tue, 10 Dec 2019 22:59:38 +0300 Subject: Fix path for ALT. /etc/ssh/ -> /etc/openssh/ /usr/lib/sftp-server -> /usr/lib/openssh/sftp-server diff --git a/libssh/examples/samplesshd-cb.c b/libssh/examples/samplesshd-cb.c index f93ab4b..f6b0e10 100644 --- a/libssh/examples/samplesshd-cb.c +++ b/libssh/examples/samplesshd-cb.c @@ -29,7 +29,7 @@ clients must be made or how a client should react. #ifdef _WIN32 #define KEYS_FOLDER #else -#define KEYS_FOLDER "/etc/ssh/" +#define KEYS_FOLDER "/etc/openssh/" #endif #endif diff --git a/libssh/examples/samplesshd-kbdint.c b/libssh/examples/samplesshd-kbdint.c index 522aebd..53106e3 100644 --- a/libssh/examples/samplesshd-kbdint.c +++ b/libssh/examples/samplesshd-kbdint.c @@ -32,7 +32,7 @@ clients must be made or how a client should react. #ifdef _WIN32 #define KEYS_FOLDER #else -#define KEYS_FOLDER "/etc/ssh/" +#define KEYS_FOLDER "/etc/openssh/" #endif #endif diff --git a/libssh/examples/ssh_server_fork.c b/libssh/examples/ssh_server_fork.c index c9892d8..cf4064e 100644 --- a/libssh/examples/ssh_server_fork.c +++ b/libssh/examples/ssh_server_fork.c @@ -44,7 +44,7 @@ The goal is to show the API in action. #ifdef _WIN32 #define KEYS_FOLDER #else -#define KEYS_FOLDER "/etc/ssh/" +#define KEYS_FOLDER "/etc/openssh/" #endif #endif @@ -52,7 +52,7 @@ The goal is to show the API in action. #define PASS "mypassword" #define BUF_SIZE 1048576 #define SESSION_END (SSH_CLOSED | SSH_CLOSED_ERROR) -#define SFTP_SERVER_PATH "/usr/lib/sftp-server" +#define SFTP_SERVER_PATH "/usr/lib/openssh/sftp-server" static void set_default_keys(ssh_bind sshbind, int rsa_already_set, diff --git a/libssh/examples/sshd_direct-tcpip.c b/libssh/examples/sshd_direct-tcpip.c index 076933f..5652d50 100644 --- a/libssh/examples/sshd_direct-tcpip.c +++ b/libssh/examples/sshd_direct-tcpip.c @@ -38,7 +38,7 @@ clients must be made or how a client should react. #ifdef _WIN32 #define KEYS_FOLDER #else -#define KEYS_FOLDER "/etc/ssh/" +#define KEYS_FOLDER "/etc/openssh/" #endif #endif diff --git a/libssh/src/dh-gex.c b/libssh/src/dh-gex.c index 16ecd1b..b4d4706 100644 --- a/libssh/src/dh-gex.c +++ b/libssh/src/dh-gex.c @@ -301,7 +301,7 @@ error: #ifdef WITH_SERVER -#define MODULI_FILE "/etc/ssh/moduli" +#define MODULI_FILE "/etc/openssh/moduli" /* 2 "Safe" prime; (p-1)/2 is also prime. */ #define SAFE_PRIME 2 /* 0x04 Probabilistic Miller-Rabin primality tests. */ diff --git a/libssh/src/options.c b/libssh/src/options.c index d9799e8..e595c47 100644 --- a/libssh/src/options.c +++ b/libssh/src/options.c @@ -303,7 +303,7 @@ int ssh_options_set_algo(ssh_session session, * \n * If the value is NULL, the directory is set to the * default global known hosts file, normally - * /etc/ssh/ssh_known_hosts.\n + * /etc/openssh/ssh_known_hosts.\n * \n * The known hosts file is used to certify remote hosts * are genuine. @@ -666,7 +666,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type, SAFE_FREE(session->opts.global_knownhosts); if (v == NULL) { session->opts.global_knownhosts = - strdup("/etc/ssh/ssh_known_hosts"); + strdup("/etc/openssh/ssh_known_hosts"); if (session->opts.global_knownhosts == NULL) { ssh_set_error_oom(session); return -1; @@ -1449,7 +1449,7 @@ int ssh_options_apply(ssh_session session) { session->opts.knownhosts = tmp; if (session->opts.global_knownhosts == NULL) { - tmp = strdup("/etc/ssh/ssh_known_hosts"); + tmp = strdup("/etc/openssh/ssh_known_hosts"); } else { tmp = ssh_path_expand_escape(session, session->opts.global_knownhosts); } diff --git a/libssh/tests/server/test_server/default_cb.h b/libssh/tests/server/test_server/default_cb.h index 487794c..efc13ad 100644 --- a/libssh/tests/server/test_server/default_cb.h +++ b/libssh/tests/server/test_server/default_cb.h @@ -36,13 +36,13 @@ #ifdef _WIN32 #define KEYS_FOLDER #else -#define KEYS_FOLDER "/etc/ssh/" +#define KEYS_FOLDER "/etc/openssh/" #endif #endif #define BUF_SIZE 1048576 #define SESSION_END (SSH_CLOSED | SSH_CLOSED_ERROR) -#define SFTP_SERVER_PATH "/usr/lib/sftp-server" +#define SFTP_SERVER_PATH "/usr/lib/openssh/sftp-server" #ifdef HAVE_PTY_H #include diff --git a/libssh/tests/unittests/torture_config.c b/libssh/tests/unittests/torture_config.c index 55ea210..ef525bc 100644 --- a/libssh/tests/unittests/torture_config.c +++ b/libssh/tests/unittests/torture_config.c @@ -31,7 +31,7 @@ extern LIBSSH_THREAD int ssh_log_level; #define PUBKEYACCEPTEDTYPES "rsa-sha2-512,ssh-rsa,ecdsa-sha2-nistp521" #define MACS "hmac-sha1,hmac-sha2-256,hmac-sha2-512,hmac-sha1-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com" #define USER_KNOWN_HOSTS "%d/my_known_hosts" -#define GLOBAL_KNOWN_HOSTS "/etc/ssh/my_ssh_known_hosts" +#define GLOBAL_KNOWN_HOSTS "/etc/openssh/my_ssh_known_hosts" #define BIND_ADDRESS "::1" @@ -426,7 +426,7 @@ static void torture_config_unknown(void **state) { /* test corner cases */ ret = ssh_config_parse_file(session, LIBSSH_TESTCONFIG9); assert_true(ret == 0); - ret = ssh_config_parse_file(session, "/etc/ssh/ssh_config"); + ret = ssh_config_parse_file(session, "/etc/openssh/ssh_config"); assert_true(ret == 0); ret = ssh_config_parse_file(session, GLOBAL_CLIENT_CONFIG); assert_true(ret == 0); diff --git a/libssh/tests/unittests/torture_options.c b/libssh/tests/unittests/torture_options.c index 396772d..304c930 100644 --- a/libssh/tests/unittests/torture_options.c +++ b/libssh/tests/unittests/torture_options.c @@ -767,7 +767,7 @@ static void torture_options_copy(void **state) "User tester\n" "Hostname example.com\n" "BindAddress 127.0.0.2\n" - "GlobalKnownHostsFile /etc/ssh/known_hosts2\n" + "GlobalKnownHostsFile /etc/openssh/known_hosts2\n" "UserKnownHostsFile ~/.ssh/known_hosts2\n" "KexAlgorithms curve25519-sha256,ecdh-sha2-nistp521\n" "Ciphers aes256-ctr\n"