diff options
author | Andreas Schneider <mail@cynapses.org> | 2010-05-21 10:19:06 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2010-05-21 10:22:27 +0200 |
commit | d3f1d094f72ced9ab864c78d9f780be36036c6dc (patch) | |
tree | 1b5293ff3aff65cd1b4352651ec38432f2c1eb34 /libssh | |
parent | 421fb2a829307dc67ec7e15c028bc1b07ed1a77e (diff) | |
download | libssh-d3f1d094f72ced9ab864c78d9f780be36036c6dc.tar.gz libssh-d3f1d094f72ced9ab864c78d9f780be36036c6dc.tar.xz libssh-d3f1d094f72ced9ab864c78d9f780be36036c6dc.zip |
options: Set the local username if still not set.
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/options.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 { |