mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-12 15:41:16 +03:00
server: Use default methods instead of all
Previously, when no methods were set, the server would enable all supported methods. This changes this behaviour by setting only the default methods. The server in pkd_daemon.c was changed to set explicitly all the supported methods to keep the previous behaviour. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
committed by
Andreas Schneider
parent
2db2a4e170
commit
dc35bbbeb1
@@ -142,7 +142,7 @@ int server_set_kex(ssh_session session)
|
||||
if (session->opts.wanted_methods[SSH_HOSTKEYS]) {
|
||||
allowed = session->opts.wanted_methods[SSH_HOSTKEYS];
|
||||
} else {
|
||||
allowed = ssh_kex_get_supported_method(SSH_HOSTKEYS);
|
||||
allowed = ssh_kex_get_default_methods(SSH_HOSTKEYS);
|
||||
}
|
||||
|
||||
/* It is expected for the list of allowed hostkeys to be ordered by
|
||||
@@ -164,7 +164,7 @@ int server_set_kex(ssh_session session)
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
if ((wanted = session->opts.wanted_methods[i]) == NULL) {
|
||||
wanted = ssh_kex_get_supported_method(i);
|
||||
wanted = ssh_kex_get_default_methods(i);
|
||||
}
|
||||
server->methods[i] = strdup(wanted);
|
||||
if (server->methods[i] == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user