mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
options: Set the local username if still not set.
This commit is contained in:
@@ -860,6 +860,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) {
|
if (session->knownhosts == NULL) {
|
||||||
tmp = ssh_path_expand_escape(session, "%d/known_hosts");
|
tmp = ssh_path_expand_escape(session, "%d/known_hosts");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user