options: Set the local username if still not set.

This commit is contained in:
Andreas Schneider
2010-05-21 10:19:06 +02:00
parent 3453cafd95
commit 13af149ef9

View File

@@ -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 {