diff options
author | Jakub Jelen <jjelen@redhat.com> | 2018-10-29 14:39:05 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-11-02 11:15:30 +0100 |
commit | 89a8a6fcf07368c56a98ff8168db77b6814fbe7b (patch) | |
tree | 5a3e1533ebedf00f41b06f149667c2f6d6045884 /src/options.c | |
parent | 7e44ce155639a89e261a61de06f16fbe92898a6a (diff) | |
download | libssh-89a8a6fcf07368c56a98ff8168db77b6814fbe7b.tar.gz libssh-89a8a6fcf07368c56a98ff8168db77b6814fbe7b.tar.xz libssh-89a8a6fcf07368c56a98ff8168db77b6814fbe7b.zip |
Process OpenSSH configuration files by default.
This will allow to use the same configuration in client applications
including the users aliases or system wide cryptographic configuration.
As the configuration parsing is the last thing before doing the
actual connection, it might overwrite previously set options.
If this is not intended, the client application can
ask the configuration files to be parsed before setting some other
options that should not ve overwritten. The code ensures that
the configuration is not parsed again.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c index 576af075..a7bd4538 100644 --- a/src/options.c +++ b/src/options.c @@ -1335,6 +1335,8 @@ int ssh_options_parse_config(ssh_session session, const char *filename) { r = ssh_config_parse_file(session, "/etc/ssh/ssh_config"); } + /* Do not process the default configuration as part of connection again */ + session->opts.config_processed = true; out: free(expanded_filename); return r; |