#+TITLE: Guile-SSH News -- history of user-visible changes. #+STARTUP: content hidestars Copyright (C) Artyom V. Poptsov Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. * Unreleased ** Bugfixes *** Fix a segfault in 'libguile-ssh' The library would always fail with segmentation fault error when an application tried to free a closed channel. Now it should be fixed. Reported by Michael Bowcutt in and Njagi Mwaniki in a personal email. *** Fix building with libssh 0.8 The 'libguile-ssh' library would fail to build due to missing 'libssh_threads' library that was removed libssh 0.8. Now 'libguile-ssh' builds without 'libssh_threads' when using libssh 0.8+. Reported by lantw44 in * Changes in version 0.11.3 (2018-03-27) ** Bugfixes *** 'node-run-server' now checks for errors When 'node-run-server' fails to start the server it would go down an infinite loop. The procedure now checks if the RREPL server started correctly and throws 'node-error' if it's not. Reported by Marius Bakke and Ludovic Courtès, in * Changes in version 0.11.2 (2017-06-18) ** Bugfixes *** Always reset the channel and sftp streams when closing ports In Guile 2.2 objects (and thus Guile-SSH channels) are finalized in a separate finalizer thread, but libssh does not work properly in such a multi-threaded fashion -- which leads to segfaults in Guile-SSH. To address that problem the following changes are made: - In (ssh dist node) REPL channels opened in 'node-eval' are closed explicitly. - Channels and SFTP streams are always reset when closing ports. Thanks to Ludovic Courtès for the patches! Reported by Ludovic Courtès and Mark H Weaver, in *** In (ssh dist node) **** 'node-guile-version' now does not fail The procedure would always fail to get Guile version. Now that should be fixed. Reported by Mark H Weaver and Ludovic Courtès, in *** In (ssh session) **** 'session-set!' now throws an option with its value on an error *** In (ssh channel) **** Printing a channel now works with Guile 2.2 **** 'channel-get-exit-status' handle freed channels properly 'channel-get-exit-status' now handles freed channels properly by throwing 'wrong-type-arg' error. **** Printing a freed channel doesn't lead to SIGSEGV anymore Guile-SSH would always crash with SIGSEGV errors when tried to print a freed channel object (e.g. after calling 'close' on a channel). This bug is fixed now by introducing new checks. Now a freed channel will be printed like this: # ** Update unit tests *** Add test cases for fixed bugs ** Misc *** Improve logging * Changes in version 0.11.1 (2017-05-09) ** Bugfixes *** Fix building scripts The building process would always fail on fresh source tree because 'configure' tried to make a symlink or a copy of files that were not present yet. This should be fixed by now. Reported by Ludovic Courtès, on #guix IRC channel. * Changes in version 0.11.0 (2017-05-09) ** Add support of Guile 2.2 Tested with GNU Guile version 2.0.14 (on Gentoo GNU/Linux) and 2.2.2.3-0c102 (on Debian GNU/Linux.) Many thanks to Ludovic Courtès for patches! ** New module (ssh shell) The module provides some procedures build upon (ssh popen) module for working with remote shell. ** Bugfixes *** In (ssh tunnel) **** 'main-loop' now handles "interrupted system call" errors that sometimes occur on 'select' call. *** In (ssh dist node) ***** 'rrepl-get-result' now handles compilation errors The procedure would always fail to read compilation errors properly because it considered the message as "undefined" result. Now this bug should be fixed. An example of an error that now should be handled is "no code for module" due to using a non-existing module in 'with-ssh' expression. Reported by Mathieu, in ***** 'rrepl-get-result' now handles "unbound variable" errors The procedure would always fail to read "unbound variable" errors properly, returning wrong result with only two values (current module name and current language name). Now this bug should be fixed. Reported by Mathieu, in ***** 'rrepl-get-result' now handles unknown # objects The procedure would always fail to read unknown objects (e.g. instances of Guile-SSH session) properly, raising an obscure errors like "Unknown # object: #\<". Now the procedure raises 'node-repl-error' with full evaluation result gotten from RREPL. Reported by Mathieu, in ** Changes in (ssh dist node) *** 'node-eval' now can work without procps The procedure now checks if procps package is present on a node and uses fallback Guile-SSH implementation of 'pgrep' and 'pkill' if it is not. The fallback implementation of 'pgrep' is built upon pure bash, and 'pkill' in addition requires Guile itself on the remote side. *** New procedure 'node-loadavg' The procedure can be used to get average load of a node. ** Changes in (ssh dist) Procedures in the module now are capable of checking presence of procps package on a remote side and switching to fallback implementation of some of the procps tools when the package is not present -- thanks to updated 'node-eval' procedure (see above.) At the end of the day it means that now the code can start/stop Guile REPL server on a remote side even without procps installed. ** Update unit tests *** Add test cases for (ssh shell) module ** Update documentation *** Add documentation for (ssh shell) module *** Describe project goals in "Introduction" section * Changes in version 0.10.2 (2016-11-25) ** New procedures *** New procedure 'channel-send-eof' in (ssh channel) The procedure allows to send end-of-file (EOF) on a channel. This action doesn't close the channel; you may still read from it but not write. 'channel-send-eof!' is handy when we deal with a remote command that reads data until EOF (such as 'wc'.) ** Documentation *** Add procedure index ** Misc *** Fixed several compilation warnings * Changes in version 0.10.1 (2016-10-09) ** Bugfixes *** Fix SMOB freeing callbacks Callbacks for many Guile-SSH objects would always fail to free allocated resources due to wrong check added in 0.10.0. The problem should be fixed now. ** Change default 'guilesitedir' to 'PREFIX/share/guile/site/X.Y' from 'PREFIX/share/guile-ssh/ssh/' * Changes in version 0.10.0 (2016-08-20) ** Add support of Guile 2.0.12 Guile-SSH now builds (and works quite well, as far as I can see) with Guile 2.0.9 and 2.0.12. Unit tests are passing too. Tested on: - Gentoo GNU/Linux, Guile 2.0.12-r1, libssh 0.7.3 - Gentoo GNU/Linux, Guile 2.0.9-r1, libssh 0.7.3 ** Add support of libssh 0.7.3 Guile-SSH now supports libssh 0.7.3 and (probably) newer versions; haven't tested. Note that [[https://www.libssh.org/2016/02/23/libssh-0-7-3-security-and-bugfix-release/][CVE-2016-0739 was found in previous libssh versions]]; though you may still use 0.6.4, you really should stick with 0.7.3+ for aforementioned reason. 0.7.3 is already should be in your distro's repository, so that won't be a big deal I guess. ** Bugfixes *** (ssh dist node) **** 'node-server-running?' now checks the default port The procedure now checks for Guile server running on the default port (that is, with '--listen' option without an argument), if that port was specified for the node. *** Fix include errors and misspecified inline procedures in C code These errors lead to build failures (reported on Arch GNU/Linux, see .) *** Don't merge stderr with stdout in remote pipes See . ** Examples *** Add 'uptop' example ** Update documentation ** Unit tests Expand test suite, improve existing tests. Namely tests now don't always fail when '-j' option is used with 'make check', with value greater than 1 (e.g. '-j4'; tested on Gentoo GNU/Linux, 4-core Intel Atom CPU) Though sometimes tests fail, so there's still a room for improvement. Another improvement is that SRFI-64 module and Guile-SSH common test module are now compiled before use, that should speed up the tests. * Changes in version 0.9.0 (2015-12-24) ** Bugfixes *** Fix a bug in distributed forms in handling of REPL errors Distributed procedures now throw an 'node-repl-error' on an evaluation error instead of returning of an unspecified value. *** Fix a bug in handling of strings in distributed forms The 'rrepl-eval' was always failing to send sexps that contain strings in the proper way because the procedure uses the human-readable printing to transmit the data. As the result an RREPL fails to evaluate it and reports an error. The bug is fixed by switching to the machine-readable data printing. *** 'dist-map' and 'distribute' now raise an error if an evaluation failed instead of silently return an empty list. *** 'channel-listen-forward' now returns a correct port number 'channel-listen-forward' would always return garbage as the 2nd argument when called with port > 0. Now when the port is explicitly specified then the procedure returns the specified port as the 2nd argument. *** Add missing export of 'node-tunnel' from (ssh dist node) module ** Changes in API *** Distributed forms now return the number of evaluation as a number instead of string. *** 'with-ssh' is now capable of handling of multiple values 'with-ssh' now returns a vector of values if an expression was evaluated to multiple values. 'distribute' and 'dist-map' only take the 1st value if multiple values were returned by an expression. *** Nodes are now capable of starting and stopping a remote REPL (RREPL) The new behaviour is controlled by 'start-repl-server?' and 'stop-repl-server?' keyed options of 'make-node'. Stopping of a RREPL server is disabled by default. *** Channels now can be created as input, output or bi-drectional ports The direction of a channel is controlled by the 2nd argument to 'make-channel' procedure. *** 'make-session' now takes 'config' option that allows to specify whether the SSH config should be parsed or not, and optionally the path to the config. ** New procedures *** New procedure 'node-server-running?' in (ssh dist node) *** New procedure 'node-run-server' in (ssh dist node) *** New procedure 'node-stop-server' in (ssh dist node) *** New procedure 'node-guile-version' in (ssh dist node) *** New procedure 'session-parse-config!' in (ssh session) ** New modules *** (ssh popen) Remote popen interface to interact with remote processes. *** (ssh sftp) SFTP interface that allows to operate on remote files. ** Documentation *** Move description of tunnels into a separate section *** Add description of the new procedures *** Update existing documentation ** Unit tests *** Expand the test suite for distributed forms *** Expand the test suite for tunnels ** Add the project logo * Changes in version 0.8.0 (2015-08-04) ** Implement port forwarding ** Add distributed forms ** Require libssh 0.6.4 or 0.6.5 ** New module: (ssh tunnel) The module provides hi-level procedures for SSH tunneling. ** New module: (ssh dist) The module provides distributed forms of 'map' and 'eval', as well as remote REPL (RREPL) implementation. ** New module: (ssh dist job) Low-level API for distributed jobs. ** New module: (ssh dist node) Low-level API for distributed nodes. ** New procedure 'channel-accept-forward' in (ssh channel) ** New procedure 'channel-listen-forward' in (ssh channel) ** Remove 'channel-open-forward/reverse' procedure from (ssh channel) ** Examples *** Add an RPC client example Add an example program that does an RPC call over a secure channel using a Guile-SSH tunnel. See 'examples/rpc' directory. *** Add a RREPL example Add a demo program that connects to a remote REPL (RREPL). ** Update documentation * Changes in version 0.7.2 (2015-02-24) ** Remove dependency on libgcrypt added by a mistake ** Fix "double free or corruption" error on GC'ing of keys Fix "double free or corruption" error that occures in case when a key was derived from an authentication message by means of `message-get-req'. When such a key is GC'ed then GC'ing of its parent message leads to error, or vice versa. ** Fix a bug in the channel implementation The bug could occasionally manifest itself on channel reading as the following error: #+BEGIN_EXAMPLE guile: ports.c:1476: scm_i_fill_input: Assertion `pt->read_pos == pt->read_end' failed. #+END_EXAMPLE ** New `server-get' procedure in (ssh server) The procedure can be used to retrieve server options. ** New `channel-get-exit-status' procedure in (ssh channel) The procedure allows to get exit status of an executed command from a channel. ** New `channel-request-send-exit-status' procedure in (ssh channel) The procedure can be used to send the exit status to a client. ** Improve printing of Guile-SSH server objects Print the bind address of a server object and its bind port. Example: #+BEGIN_EXAMPLE # #+END_EXAMPLE ** Update examples *** sssh - Check exit status of an executed command. *** ssshd - Send exit status to the client according to the result of command execution. *** echo server and client - Some cosmetic changes aimed to make the code cleaner. ** Update documentation - Add description of the new procedures. - Update examples. * Changes in version 0.7.1 (2014-10-11) ** New `%get-libssh-version' procedure in (ssh version) The procedure can be used to get libssh version in the "raw" format such as: "0.6.3/openssl/zlib". ** New `get-crypto-library' procedure in (ssh version) The procedure returns name of a cryptographic library with which libssh was compiled. ** New `zlib-support?' procedure in (ssh version) The procedure checks if zlib support is enabled in libssh. ** New `set-log-verbosity!' procedure in (ssh log) The procedure sets global libssh log verbosity. ** New `get-log-verbosity' procedure in (ssh log) The procedure gets global libssh log verbosity. ** New `make-keypair' procedure in (ssh key) The procedure can be used to generate a new keypair with the specified parameters. ** New `private-key-to-file' procedure in (ssh key) The procedure can be used to export a private key to a file (doesn't work if libssh 0.6.3 is compiled with GCrypt). ** Changes in tests *** Fix "end of file" errors in tests Fix the following kind of errors in tests: #+BEGIN_EXAMPLE ERROR: In procedure scm_i_lreadparen: /path/to/guile-ssh/sources/tests/./client-server.scm:272:34: end of file #+END_EXAMPLE Thanks to Ludovic Courtès for reporting the issue and for a good advice how to fix that. *** Don't perform ECDSA key tests if libssh is compiled with GCrypt libssh 0.6.3 does not support ECDSA keys if compiled with GCrypt instead of OpenSSL. Thus, ECDSA key tests used to fail. Now there is a check that prevents these tests from execution in case when libssh 0.6.3 is compiled with GCrypt. ** Update documentation - Add description of the new procedures. - Add note about ECDSA keys support with GCrypt library. * Changes in version 0.7.0 (2014-08-31) ** Require GNU Guile 2.0 ** Require libssh 0.6.3 ** Change `get-public-key-hash' *** Move the procedure to (ssh key) *** Return the hash as a bytevector *** Accept a public key as the first argument *** Accept a hash type as the second argument Possible types are: 'md5, 'sha1 ** (ssh auth) procedures now throw an exception if the session is not connected ** (ssh channel) procedures now handle closed and freed channels - `channel-open?' returns `#f' if the channel has been closed freed. - `channel-open-session' and `channel-eof?' throw to `guile-ssh-error' if the channel has been closed and freed. - `channel-request-env', `channel-request-exec', `channel-request-pty', `channel-request-shell', `channel-set-pty-size!', `channel-set-stream!', `channel-get-stream' now throw `wrong-type-arg` if the channel is closed. ** Some (ssh session) procedures now throw an exception if the session is not connected These procedures are: - `get-protocol-version' - `authenticate-server' - `get-server-public-key' - `write-known-host!' ** Change `userauth-pubkey!' *** Rename it to `userauth-public-key!' *** Change arguments ** `blocking-flush!' now returns `error' symbol on error instead of throwing of an exception ** `connect!' now returns `error' symbol on error instead of throwing of an exception ** `authenticate-server' now returns `error' symbol on error instead of throwing of an exception ** `private-key-from-file' now takes only a file name ** New (ssh log) module ** Rename `userauth-pubkey-auto!' to `userauth-public-key/auto!' ** New `userauth-public-key/try' procedure in (ssh auth) ** New `bytevector->hex-string' procedure in (ssh key) ** New `channel-open-forward' procedure in (ssh channel) ** New `channel-open-forward/reverse' procedure in (ssh channel) ** New `session-get' procedure in (ssh session) ** New `channel-get-session' procedure in (ssh channel) ** New `message-get-session' procedure in (ssh message) ** Improve printing of Guile-SSH objects *** Print more detailed information about `session' object Print user name, host name and current state of a `session' object. *** Print object address for `channel' object *** Print object address for `message' object *** Print object address for `key' object ** Changes in tests *** Add tests for Guile-SSH keys *** Add tests for `authenticate-server' procedure ** Bug fixes *** Fix a GC issue Keep a reference to the parent session in channels and messages to prevent the session from premature GC'ing. Without that GC could free a session even if there are live channels and by that break the channels. *** `public-key?' and `private-key?' now produce correct result Functions now return `#f' if the given argument is not a Guile-SSH key object. ** Documentation update *** Fix old URLs to Guile-SSH repository in the `Installation' chapter *** Add an overview of programming with Guile-SSH to the "Examples" chapter * Changes in version 0.6.0 (2014-03-23) ** Remove username from parameter list of auth procedures `userauth-password!' and `userauth-pubkey!' don't take a username as a parameter anymore. Rationale: According to libssh 0.6 docs, most server implementations do not permit changing the username during authentication. Moreover, the parameter was deprecated in libssh 0.5.3. Elimination of the username makes Guile-SSH Auth API clearer and simpler. Username can be set either on creation of a session or by calling of `session-set!' procedure. ** `server-accept' now throws `guile-ssh-error' on error ** Improve reads from channels Return EOF immediately if the channel is closed instead of polling it for data (which causes notable latency on the first read). Thanks Ludovic Courtès for the patch. ** Compile Guile modules Compile Guile modules and install compiled files if GNU Guile 2.0.x is available. ** Update Texinfo documentation *** Update Auth API description *** Update Server API description *** Update Acknowledgments ** Update examples *** Use actual path to Guile interpreter in the shebang Executables will be produced during building of the Guile-SSH. *** Handle `guile-ssh-error' on `server-accept' *** Catch `guile-ssh-error' on reading from a port *** ssshd **** Add `--port', `--ssh-debug' and `--pid-file' option **** Store the PID in a file instead of printing it to stdout. **** Handle password authentication correctly *** sssh **** Add `--ssh-debug' option ** Improve automated tests *** Prevent sssh-ssshd from asking of a SSH agent for keys *** Make parallel tests work * Changes in version 0.5.0 (2014-02-05) ** Implement Guile-SSH channels as GNU Guile ports. Now channels can be used with regular procedures such as `display', `write' and `read-line'. ** `session-set!' and `server-set!' now take log-verbosity as a symbol Use symbols to represent log levels instead of numbers. ** Remove duplicates of some session options Remove duplicates that are existed for some Guile-SSH session options: `port-str' (duplicates `port', differs only in expected type of value), `log-verbosity-str' (duplicates `log-verbosity', differs only in expected type of value), `add-identity' (duplicates `identity', no differences). ** New `userauth-autopubkey!' procedure. The procedure can be used for public key authentication with a SSH agent. ** New procedures. `channel-set-stream!', `channel-get-stream', `session?', `server?', `message?'. ** Remove procedures. These procedures are removed due to changes in Guile-SSH channel API: `close-channel!', `channel-poll' `free-channel!', `channel-read`, `channel-write'. ** Add documentation in Texinfo format The Guile-SSH reference manual in Info format will be installed on `make install' into `${prefix}/share/info' directory. ** Update sssh/ssshd example. *** `examples/sssh.scm' and `examples/ssshd.scm' are updated to use the new Guile-SSH channel API. *** `sssh.scm` now uses `userauth-autopubkey!' *** `ssshd.scm' now parses command-line options See `ssshd.scm --help'. ** Add echo server/client example. See `examples/echo' directory. ** Add automated tests. See `tests/' directory. * Changes in version 0.4.0 (2013-11-26) ** Port the library to GNU Guile version 2.0 Now the library works with GNU Guile version 2.0 as well as 1.8. ** Remove "ssh:" prefix from procedures names. If it is needed, an user's prefix can be added by setting a renamer for a module on loading. See the documentation for the GNU Guile module system. ** Implement basic SSH server API. ** Fix a memory corruption in `channel-read' The problem was seen on reading of an output from "lsb_release -a" command. ** Fix a memory corruption during GC'ing of SSH keys. ** Fix a bug in `session-set!' Fix the bug that leads to an error if the user tried to set a correct boolean option. ** New `channel-write' procedure. ** New `channel-request-pty' procedure. ** New `channel-request-shell' procedure. ** New `channel-set-pty-size!' procedure. ** Fix the name of `write-known-host!' The procedure was called `authenticate-server' by mistake. Rename it to `write-known-host!'. ** Change error handling in some procedures. Now `write-known-host!', `channel-open-session', `channel-request-exec', `channel-request-env', `close-channel!', throw an exception on error. The return value of these procedures now is undefined. ** `authenticate-server' now throws guile-ssh-error exception on error. Don't return the 'error symbol, throw an exception instead. ** `server-set!' now throws guile-ssh-error exception on error. The return value now is undefined. ** Rename `make-session' to `%make-session'. See `make-session' below. ** New `make-session' procedure. This is a convenient wrapper for `%make-session' which allows to set session options by passing them as keywords. ** Rename `connect' to `connect!'. ** Fix a typo in an option symbol 'strcthostkeycheck -> 'stricthostkeycheck ** Fix an infinite loop in `public-key->string'. The problem was observed on Ubuntu GNU/Linux 10.04 LTS. ** Add examples to the repository. See the "examples/" directory. ** Improve printing of SSH keys, channels and messages. Examples: #, # * Changes in version 0.3.1 (2013-07-14) ** Use a simpler method to GC'ing of SSH channels. The idea is that we don't have to free resources allocated by a channel during its GC'ing, because these resources will be freed anyway when the related SSH session is GC'ed. However, to be able to control allocating of resources more precisely, introduce new procedure ssh:free-channel! that can be used for freeing resources allocated by a channel. ** ssh:free-channel! New procedure. ** Make the library thread-safe. * Changes in version 0.3 (2013-07-13) ** Improve working with public keys. Because some libssh functions are working with public keys represented as a ssh_string instead of a ssh_public_key, we try to hide this peculiarity so all kinds of keys are look like a class from the Scheme perspective. ** Fix segmentation faults on GC'ing of SSH objects. The program doesn't crashes anymore during GC'ing of SSH objecs. ** ssh:public-key-from-file Make it work. Return newly created instance or #f on error. ** ssh:public-key->string Take a key as a instance. ** ssh:private-key-from-file Fix call to an undefined procedure. Return #f on error. ** ssh:get-key-type New procedure. The procedure returns type for a passed instance. Possible types are: 'dss, 'rsa, 'rsa1, 'unknown ** ssh:userauth-get-list New procedure. The procedure returns a list of available authentication methods for a given SSH session ** ssh:channel-read Fix call to an undefined procedure. Throw guile-ssh-error exception on error. ** ssh:close-channel! Fix return value: return #t if channel is closed successfully, #f otherwise. ** ssh:blocking-flush! Return 'error by default. ** ssh:session-set! Fix a bug with uint32 options setting. ** SSH objects now comparable. * Changes in version 0.2 (2013-05-25) ** Release of the first stable version of Guile-SSH. Local Variables: mode: org End: