mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-28 07:13:54 +09:00
CVE-2025-14821 cmake: Fix global config location on Windows
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
committed by
Jakub Jelen
parent
12ccea8dd8
commit
6a7f19ec34
@@ -907,7 +907,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(GLOBAL_CONF_DIR "/ssh_known_hosts");
|
||||
if (session->opts.global_knownhosts == NULL) {
|
||||
ssh_set_error_oom(session);
|
||||
return -1;
|
||||
@@ -2072,7 +2072,7 @@ int ssh_options_apply(ssh_session session)
|
||||
|
||||
if ((session->opts.exp_flags & SSH_OPT_EXP_FLAG_GLOBAL_KNOWNHOSTS) == 0) {
|
||||
if (session->opts.global_knownhosts == NULL) {
|
||||
tmp = strdup("/etc/ssh/ssh_known_hosts");
|
||||
tmp = strdup(GLOBAL_CONF_DIR "/ssh_known_hosts");
|
||||
} else {
|
||||
tmp = ssh_path_expand_escape(session,
|
||||
session->opts.global_knownhosts);
|
||||
|
||||
Reference in New Issue
Block a user