options: Set the global known_hosts file
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
bdb3bb9ccd
Коммит
ae6b0e0f49
@ -1370,6 +1370,17 @@ int ssh_options_apply(ssh_session session) {
|
||||
free(session->opts.knownhosts);
|
||||
session->opts.knownhosts = tmp;
|
||||
|
||||
if (session->opts.global_knownhosts == NULL) {
|
||||
tmp = strdup("/etc/ssh/ssh_known_hosts");
|
||||
} else {
|
||||
tmp = ssh_path_expand_escape(session, session->opts.global_knownhosts);
|
||||
}
|
||||
if (tmp == NULL) {
|
||||
return -1;
|
||||
}
|
||||
free(session->opts.global_knownhosts);
|
||||
session->opts.global_knownhosts = tmp;
|
||||
|
||||
if (session->opts.ProxyCommand != NULL) {
|
||||
tmp = ssh_path_expand_escape(session, session->opts.ProxyCommand);
|
||||
if (tmp == NULL) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user