diff --git a/NEWS b/NEWS index 6296069..cff3080 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,15 @@ This change affects the following procedures from =(ssh popen)=: Reported by graywolf in +** =make-session= now handles =#:config= set to =#f= properly +Now =make-session= disables reading the default SSH configuration files when +=#:config= is set to =#f= (as per Guile-SSH documentation.) + +When =#:config= is set to =#t= then the default SSH configuration files are +read. This is by default to keep the backward compatibility. + +Reported by graywolf in + ** New simplified version of the project logo Thanks to Darya Sev. for very helpful design advices for the new simplified version of the project logo. diff --git a/doc/api-sessions.texi b/doc/api-sessions.texi index d3bd45e..ce7f3b0 100644 --- a/doc/api-sessions.texi +++ b/doc/api-sessions.texi @@ -244,6 +244,13 @@ be ``yes'', ``no'' or a specific algorithm name if needed ("zlib", @verb{|"zlib@openssh.com"|}, "none"). Expected type of @var{value}: string. +@item process-config? +Set it to @code{#f} to disable automatic processing of per-user and +system-wide OpenSSH configuration files. LibSSH automatically uses these +configuration files unless you provide it with this option or with different +file. + +Expected type of @var{value}: boolean. @item proxycommand Set the command to be executed in order to connect to server. diff --git a/libguile-ssh/session-func.c b/libguile-ssh/session-func.c index 6e683d8..1a50396 100644 --- a/libguile-ssh/session-func.c +++ b/libguile-ssh/session-func.c @@ -67,6 +67,7 @@ static gssh_symbol_t session_options[] = { { "stricthostkeycheck", SSH_OPTIONS_STRICTHOSTKEYCHECK }, { "compression", SSH_OPTIONS_COMPRESSION }, { "compression-level", SSH_OPTIONS_COMPRESSION_LEVEL }, + { "process-config?", SSH_OPTIONS_PROCESS_CONFIG }, #if HAVE_LIBSSH_0_8_1 { "nodelay", SSH_OPTIONS_NODELAY }, @@ -384,6 +385,7 @@ set_option (SCM scm_session, gssh_session_t* sd, int type, SCM value) case SSH_OPTIONS_SSH1: case SSH_OPTIONS_SSH2: case SSH_OPTIONS_STRICTHOSTKEYCHECK: + case SSH_OPTIONS_PROCESS_CONFIG: #if HAVE_LIBSSH_0_8_1 case SSH_OPTIONS_NODELAY: #endif diff --git a/modules/ssh/session.scm b/modules/ssh/session.scm index 4aaf5d3..0f04090 100644 --- a/modules/ssh/session.scm +++ b/modules/ssh/session.scm @@ -74,7 +74,7 @@ knownhosts timeout timeout-usec ssh1 ssh2 log-verbosity ciphers-c-s ciphers-s-c compression-c-s compression-s-c proxycommand stricthostkeycheck compression - compression-level nodelay callbacks config + compression-level nodelay callbacks (config #t) public-key-accepted-types) "Make a new SSH session with specified configuration.\n Return a new SSH session." @@ -82,17 +82,19 @@ Return a new SSH session." (session-set-if-specified! host) - (when config - (or host - (throw 'guile-ssh-error - "'config' is specified, but 'host' option is missed.")) - (cond - ((string? config) - (%gssh-session-parse-config! session config)) - ((boolean? config) - (%gssh-session-parse-config! session #f)) - (else - (throw 'guile-ssh-error "Wrong 'config' value" config)))) + (if config + (begin + (or host + (throw 'guile-ssh-error + "'config' is specified, but 'host' option is missed.")) + (cond + ((string? config) + (%gssh-session-parse-config! session config)) + ((boolean? config) + (%gssh-session-parse-config! session #f)) + (else + (throw 'guile-ssh-error "Wrong 'config' value" config)))) + (session-set! session 'process-config? #f)) (session-set-if-specified! port) (session-set-if-specified! user)