mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
options: Set the local username if still not set.
This commit is contained in:
@@ -1058,6 +1058,13 @@ int ssh_options_apply(ssh_session session) {
|
||||
}
|
||||
}
|
||||
|
||||
if (session->username == NULL) {
|
||||
rc = ssh_options_set(session, SSH_OPTIONS_USER, NULL);
|
||||
if (rc < 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (session->knownhosts == NULL) {
|
||||
tmp = ssh_path_expand_escape(session, "%d/known_hosts");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user