From d3f1d094f72ced9ab864c78d9f780be36036c6dc Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 21 May 2010 10:19:06 +0200 Subject: options: Set the local username if still not set. --- libssh/options.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libssh') diff --git a/libssh/options.c b/libssh/options.c index 160b87c..4fdd5dc 100644 --- a/libssh/options.c +++ b/libssh/options.c @@ -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) { tmp = ssh_path_expand_escape(session, "%d/known_hosts"); } else { -- cgit v1.2.3