| Commit message (Expand) | Author | Age | Files | Lines |
| * | channel-func.c (guile_ssh_channel_get_exit_status): Handle freed channels•••* libguile-ssh/channel-func.c (guile_ssh_channel_get_exit_status): Throw
'wrong-type-arg' if a freed channel is passed as an argument.
* libguile-ssh/channel-type.h (GSSH_VALIDATE_OPEN_CHANNEL): Check if a channel
is freed.
* tests/client-server.scm ("channel-get-exit-status, freed channel"): New test
case.
* tests/common.scm (test-error-with-log/=): Check error key and message
properly.
(test-error-with-log): Check an error key.
(test-error-with-log/handler): Remove extra rules.
* NEWS: Update.
| Artyom V. Poptsov | 2017-05-22 | 2 | -1/+4 |
| * | channel-type.c (print_channel): Bugfix: Handle freed channels•••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 patch fixes
the bug.
* libguile-ssh/channel-type.c (print_channel): Bugfix: Handle freed channels
properly.
* tests/client-server.scm ("channel-request-exec, printing a freed channel"):
New test case.
* NEWS: Update.
| Artyom V. Poptsov | 2017-05-21 | 1 | -11/+17 |
| * | log.c (_gssh_log_warning): New procedure•••* libguile-ssh/log.c (_gssh_log_warning): New procedure.
* libguile-ssh/log.h: Likewise.
* libguile-ssh/channel-func.c (guile_ssh_channel_get_exit_status): Issue a
warning if 'ssh_channel_get_exit_status' failed to get the exit status.
| Artyom V. Poptsov | 2017-05-21 | 3 | -0/+24 |
| * | log.c (_gssh_log_error): New procedure•••* libguile-ssh/log.c (_gssh_log_error): New procedure.
* libguile-ssh/log.h: Likewise.
* libguile-ssh/error.c (guile_ssh_error1): Use it.
| Artyom V. Poptsov | 2017-05-21 | 3 | -10/+22 |
| * | build: Generate and use libguile-ssh/config.h.•••Among other things, this allows us to work around broken guile-snarf
handling of whitespace arguments in Guile 2.2.1:
<https://bugs.gnu.org/25803>.
* configure.ac: Use 'AC_CONFIG_HEADER'.
* libguile-ssh/auth.c,
libguile-ssh/channel-func.c,
libguile-ssh/channel-main.c,
libguile-ssh/channel-type.c,
libguile-ssh/common.c,
libguile-ssh/error.c,
libguile-ssh/key-func.c,
libguile-ssh/key-main.c,
libguile-ssh/key-type.c,
libguile-ssh/log.c,
libguile-ssh/message-func.c,
libguile-ssh/message-main.c,
libguile-ssh/message-type.c,
libguile-ssh/server-func.c,
libguile-ssh/server-main.c,
libguile-ssh/server-type.c,
libguile-ssh/session-func.c,
libguile-ssh/session-main.c,
libguile-ssh/session-type.c,
libguile-ssh/sftp-file-main.c,
libguile-ssh/sftp-file-type.c,
libguile-ssh/sftp-session-func.c,
libguile-ssh/sftp-session-main.c,
libguile-ssh/sftp-session-type.c,
libguile-ssh/threads.c,
libguile-ssh/version.c: Include <config.h>.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2017-04-30 | 26 | -0/+52 |
| * | libguile-ssh: Adjust port code to Guile 2.2.•••This ports Guile-SSH to the port API found in Guile 2.2.
* libguile-ssh/common.h (USING_GUILE_BEFORE_2_2): New macro.
* libguile-ssh/channel-type.c (channel_tag) [!USING_GUILE_BEFORE_2_2]:
New definition.
(read_from_channel_port, write_to_channel_port): New functions.
(ptob_close): Add #if USING_GUILE_BEFORE_2_2.
(guile_ssh_is_channel_p): Likewise.
(equalp_channel): Condition on USING_GUILE_BEFORE_2_2.
(_scm_from_channel_data): Add #if USING_GUILE_BEFORE_2_2.
(_scm_to_channel_data): Likewise.
(init_channel_type): Likewise.
* libguile-ssh/sftp-file-type.c (sftp_file_tag) [!USING_GUILE_BEFORE_2_2]:
New defintion.
(read_from_sftp_file_port, write_to_sftp_file_port): New functions.
(equalp_sftp_file): Condition on USING_GUILE_BEFORE_2_2.
(print_sftp_file): Use 'scm_port_filename' instead of 'SCM_FILENAME'.
(ptob_flush): Condition on USING_GUILE_BEFORE_2_2.
(ptob_close, ptob_seek): Add #if USING_GUILE_BEFORE_2_2.
(gssh_sftp_file_p): Likewise.
(_scm_to_sftp_file_data, _scm_from_sftp_file): Likewise.
(init_sftp_file_type): Likewise.
* configure.ac: Request "2.2" before "2.0" in 'GUILE_PKG'.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2017-04-23 | 3 | -52/+260 |
| * | libguile-ssh/sftp-file-type.c: Remove 'mark' and 'free' procedures.•••The mark function was unnecessary given that 'sftp_file_data' is
allocated with 'scm_gc_malloc' and thus scanned by the GC. The
free function was already a no-op.
* libguile-ssh/sftp-file-type.c (mark_sftp_file): Remove.
(free_sftp_file): Remove.
(init_sftp_file_type): Remove call to 'scm_set_port_mark' and to
'scm_set_port_free'.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2017-04-23 | 1 | -15/+0 |
| * | libguile-ssh/sftp-file-type.c (sftp_file_tag): Make 'static'.•••* libguile-ssh/sftp-file-type.c (sftp_file_tag): Make 'static'.
* libguile-ssh/sftp-file-type.h (sftp_file_tag): Remove.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2017-04-23 | 2 | -3/+1 |
| * | libguile-ssh/channel-type.c: Remove 'mark' and 'free' procedures.•••The mark function was unnecessary given that 'channel_data' is
allocated with 'scm_gc_malloc' and thus scanned by the GC. The
free function was already a no-op.
* libguile-ssh/channel-type.c (mark_channel, free_channel): Remove.
(init_channel_type): Remove call to 'scm_set_port_mark' and to
'scm_set_port_free'.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2017-04-23 | 1 | -15/+0 |
| * | libguile-ssh/channel-type.c (channel_tag): Make 'static'.•••* libguile-ssh/channel-type.c (channel_tag): Make 'static'
* libguile-ssh/channel-type.h (channel_tag): Remove.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2017-04-23 | 2 | -3/+1 |
| * | error.c (guile_ssh_error1): Print errors to the libssh log•••* libguile-ssh/error.c (guile_ssh_error1): Print errors to the libssh log.
| Artyom V. Poptsov | 2017-01-04 | 1 | -1/+11 |
| * | sftp-file-type.c (ptob_close): Add missing 'return' statement•••* libguile-ssh/sftp-file-type.c (ptob_close): Add missing 'return' statement.
| Artyom V. Poptsov | 2016-11-20 | 1 | -1/+3 |
| * | sftp-session-type.c (print_sftp_session): Add missing 'return' statement•••* libguile-ssh/sftp-session-type.c (print_sftp_session): Add missing 'return'
statement.
| Artyom V. Poptsov | 2016-11-20 | 1 | -1/+2 |
| * | session-func.c (guile_ssh_session_get): Fix warnings•••* libguile-ssh/session-func.c (guile_ssh_session_get): Fix warnings:
initialize variables with default values.
| Artyom V. Poptsov | 2016-11-06 | 1 | -2/+2 |
| * | channel-func.c (_ssh_result_to_symbol): Add assertion, fix warning•••* libguile-ssh/channel-func.c (_ssh_result_to_symbol): Assert that the
argument is one of the libssh valid return codes. Fix warning related to
missed 'return' statement.
| Artyom V. Poptsov | 2016-11-06 | 1 | -0/+8 |
| * | channel-func.c (guile_ssh_channel_get_stream): Fix a warning•••* libguile-ssh/channel-func.c (guile_ssh_channel_get_stream): Fix a warning
due to missed 'return' statement at the end of non-void procedure.
| Artyom V. Poptsov | 2016-11-06 | 1 | -0/+2 |
| * | build: Build with '-Wall'.•••* configure.ac: Set and substitute 'WARN_CFLAGS'.
* libguile-ssh/Makefile.am (AM_CFLAGS): New variable.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2016-11-06 | 1 | -0/+1 |
| * | libguile-ssh: Remove unused variables.•••* libguile-ssh/auth.c (guile_ssh_userauth_public_key_x): Remove
'public_key'.
* libguile-ssh/message-func.c (get_auth_req): Remove 'pkey_smob' and
'pkey_data'.
* libguile-ssh/session-type.c (print_session): Remove 'smob_addr'.
* libguile-ssh/sftp-file-type.c (print_sftp_file): Remove 'attr'.
(ptob_flush): Remove 'fd'.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2016-11-06 | 4 | -6/+0 |
| * | libguile-ssh/server-func.c: Add missing 'const'.•••This is a followup to e490ba5226cedf22eb8f9166b5ac9fb5486c65f8.
* libguile-ssh/server-func.c (set_sym_opt)
(guile_ssh_server_set_x, guile_ssh_server_get): 'const'-qualify 'opt'
and 'sd'.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2016-11-06 | 1 | -4/+4 |
| * | channel.scm: Remove trailing bang from 'channel-send-eof'.•••This procedure merely does I/O without mutating its argument, so it does
not deserve the trailing '!' (similar to Scheme's 'write',
'put-bytevector', etc. procedures).
* libguile-ssh/channel-func.c (gssh_channel_send_eof_x): Rename to...
(gssh_channel_send_eof): ... this. Change Scheme name to
'%channel-send-eof'. Adjust caller.
* modules/ssh/channel.scm (channel-send-eof!): Rename to...
(channel-send-eof): ... this.
* tests/client-server.scm ("channel-send-eof!"): Rename to...
("channel-send-eof"): ... this. Adjust accordingly.
* doc/api-channels.texi (Channel Management): Adjust accordingly.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2016-11-06 | 1 | -2/+2 |
| * | libguile-ssh/key-type.c: Improve locality and constness.•••* libguile-ssh/key-type.c (key_types): Mark as 'static const'.
(mark_key_smob, free_key_smob, equalp_key): Mark as 'static'.
* libguile-ssh/key-type.h (key_types): Remove declaration.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2016-11-04 | 2 | -6/+4 |
| * | libguile-ssh/common.h: 'const'-qualify pointers to 'symbol_mapping'.•••* libguile-ssh/common.h (_ssh_const_to_scm): Const-qualify 'types'
parameter.
(_scm_to_ssh_const): Likewise, and const-qualify return type.
* libguile-ssh/common.c (_ssh_const_to_scm):
(_scm_to_ssh_const): Adjust accordingly.
* libguile-ssh/key-func.c (guile_ssh_string_to_public_key): Adjust
accordingly.
* libguile-ssh/key-type.c (_scm_to_ssh_key_type,
guile_ssh_make_keypair): Likewise.
* libguile-ssh/key-type.h (_scm_to_ssh_key_type): Likewise.
* libguile-ssh/log.c (guile_ssh_write_log)
(guile_ssh_set_log_verbosity_x): Likewise.
* libguile-ssh/session-func.c (set_sym_opt): Likewise.
(guile_ssh_session_set, guile_ssh_session_get): Likewise.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2016-11-04 | 7 | -18/+18 |
| * | libguile-ssh/key-type.c: Add mapping for ed25519 keys.•••* libguile-ssh/key-type.c (key_types): Add entry for
'SSH_KEYTYPE_ED25519'.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
| Ludovic Courtès | 2016-11-04 | 1 | -0/+1 |
| * | channel.scm (channel-send-eof!): New procedure•••* modules/ssh/channel.scm (channel-send-eof!): New procedure.
* libguile-ssh/channel-func.c (gssh_channel_send_eof_x): New procedure.
* doc/api-channels.texi: Add description of 'channel-send-eof!'.
* tests/client-server.scm ("channel-send-eof!"): New TC.
* doc/version.texi, NEWS: Update.
| Artyom V. Poptsov | 2016-10-30 | 1 | -0/+27 |
| * | session-type.c (free_session): Improve a bit•••* libguile-ssh/session-type.c (free_session): Use shorter argument names.
| Artyom V. Poptsov | 2016-10-09 | 1 | -3/+3 |
| * | libguile-ssh: Update some copyright dates•••* libguile-ssh/key-type.c, libguile-ssh/message-type.c,
libguile-ssh/server-type.c: Update copyright dates.
| Artyom V. Poptsov | 2016-10-09 | 3 | -3/+3 |
| * | libguile-ssh: Bugfix: Fix SMOB freeing callbacks•••The SMOB freeing callbacks would always fail to free any resources due to
mistaken use of 'SCM_SMOB_PREDICATE' procedure -- the procedure doesn't work
in these GC callbacks according to the documentation (see '(guile) Smobs') and
always returns 'false' as the result when used in such context.
The solution is to remove the check 'SCM_SMOB_PREDICATE' and just get the
SMOB's data.
Reported by: David Kastrup <dak@gnu.org>
Reported by: Ludovic Courtès <ludo@gnu.org>
* libguile-ssh/key-type.c, libguile-ssh/message-type.c,
libguile-ssh/server-type.c, libguile-ssh/session-type.c,
libguile-ssh/sftp-session-type.c: Bugfix: Fix SMOB freeing callbacks.
* NEWS: Update.
| Artyom V. Poptsov | 2016-10-09 | 5 | -37/+12 |
| * | libguile-ssh: Bugfix: Check if smobs are already freed•••* libguile-ssh/message-type.c (free_message): Bugfix: Check if the smob is
already freed, don't try to free it once more.
* libguile-ssh/server-type.c (free_server): Likewise.
* libguile-ssh/session-type.c (free_session): Likewise.
* libguile-ssh/sftp-session-type.c (free_sftp_session): Likewise.
| Artyom V. Poptsov | 2016-08-19 | 4 | -0/+20 |
| * | libguile-ssh/key-type.c (free_key_smob): Bugfix: Check smob type•••* libguile-ssh/key-type.c (free_key_smob): Bugfix: Check if the smob is
already freed, don't try to free it once more.
* tests/common.scm (test-begin-with-log): Set log verbosity to the highest
level by default.
* tests/key.scm: Perform test with logging.
| Artyom V. Poptsov | 2016-08-19 | 1 | -1/+9 |
| * | configure.ac: Check for libssh 0.7.3+•••* configure.ac: Check for libssh 0.7.3+.
* libguile-ssh/channel-func.c: Replace deprecated functions with new ones if
libssh 0.7.3+ is used.
| Artyom V. Poptsov | 2016-02-25 | 1 | -0/+5 |
| * | log.c: Add missed include•••* libguile-ssh/log.c: Include 'libssh/callbacks.h' where
'ssh_set_log_callback' procedure is declared.
| Artyom V. Poptsov | 2016-02-24 | 1 | -0/+1 |
| * | key-func.c: Add missed include•••* libguile-ssh/key-func.c: Include 'error.h' header where 'guile_ssh_error1'
is declared.
| Artyom V. Poptsov | 2016-02-24 | 1 | -0/+1 |
| * | channel-func.c: Add missed include•••* libguile-ssh/channel-func.c: Include 'libssh/server.h' because it is needed
for 'ssh_channel_request_send_exit_status' procedure.
| Artyom V. Poptsov | 2016-02-24 | 1 | -0/+1 |
| * | libguile-ssh: Add missed "threads.h" include•••* libguile-ssh/sftp-file-main.c, libguile-ssh/sftp-session-main.c: Add missed
"threads.h" include.
| Artyom V. Poptsov | 2016-02-08 | 2 | -0/+2 |
| * | libguile-ssh: Add missed "error.h" include•••* libguile-ssh/key-type.c, libguile-ssh/sftp-file-type.c,
libguile-ssh/sftp-session-func.c, libguile-ssh/sftp-session-type.c: Add
missed "error.h" include.
| Artyom V. Poptsov | 2016-02-08 | 4 | -0/+4 |
| * | Bugfix: Use regular procedures instead of non-static inlines•••There are ill-defined non-static inlines that lead to linkage errors; it
appears that these inlines are the root cause for errors that can be seen on
Arch GNU/Linux. Replace them with regular procedures.
Reported by: SaffronSnail in <https://github.com/artyom-poptsov/guile-ssh/issues/1>
* libguile-ssh/common.c, libguile-ssh/common.h, libguile-ssh/error.c,
libguile-ssh/error.h, libguile-ssh/key-func.h, libguile-ssh/key-type.c,
libguile-ssh/key-type.h: Bugfix: Remove all non-static inlines; use regular
procedures instead.
| Artyom V. Poptsov | 2016-02-08 | 6 | -12/+12 |
| * | key-func.h (public_key_to_ssh_string): Remove•••* libguile-ssh/key-func.h (public_key_to_ssh_string): Remove the declaration
because there function is not defined (and not used anywhere.)
| Artyom V. Poptsov | 2016-02-08 | 1 | -3/+0 |
| * | libguile-ssh/server-type.c: Add missed include•••* libguile-ssh/server-type.c: Add missed "common.h" include.
| Artyom V. Poptsov | 2016-01-19 | 1 | -0/+1 |
| * | libguile-ssh/Makefile.am: Bugfix•••* libguile-ssh/Makefile.am (libguile_ssh_la_SOURCES): Bugfix: Remove unused
'sftp-session-main.h'.
| Artyom V. Poptsov | 2015-12-06 | 1 | -1/+1 |
| * | libguile-ssh/channel-type.c (print_channel): Improve•••* libguile-ssh/channel-type.c (print_channel): Use 'scm_print_port_mode'
procedure from Guile API so the mode will be printed right.
| Artyom V. Poptsov | 2015-12-06 | 1 | -6/+3 |
| * | libguile-ssh/channel-type.c (init_channel_type): Use 'scm_from_long' | Artyom V. Poptsov | 2015-12-06 | 1 | -2/+2 |
| * | libguile-ssh/channel-type.c: Bugfix: Fix assertion | Artyom V. Poptsov | 2015-12-06 | 1 | -3/+3 |
| * | channel.scm (make-channel): Accept optional flags•••* modules/ssh/channel.scm (make-channel): Accept optional flags that allow to
create an input, output or input/output channel. The procedure creates a
bidirectional tunnel by default.
* libguile-ssh/channel-type.c (guile_ssh_make_channel): Likewise. Rename the
Scheme procedure to '%make-channel'. All callers updated.
(_scm_from_channel_data): Accept flags. Assert flags value.
(print_channel): Print the direction of a channel.
(init_channel_type): Define 'RDNG' and 'WRTNG' symbols.
* libguile-ssh/channel-type.h: Update.
* libguile-ssh/message-func.c
(guile_ssh_message_channel_request_open_reply_accept): Update.
* doc/api-channels.texi: Update description of 'make-channel'.
| Artyom V. Poptsov | 2015-12-05 | 4 | -12/+38 |
| * | session.scm: Implement SSH config parsing•••* modules/ssh/session.scm (make-session): Accept 'config' option.
(session-parse-config!): New procedure.
* libguile-ssh/session-func.c (gssh_session_parse_config): New procedure.
* tests/common.scm (%config): Export the new global symbol.
* doc/api-sessions.texi: Update.
* tests/config: Add to the repository.
* tests/session.scm ("session-parse-config!"): New test case.
* NEWS: Update.
| Artyom V. Poptsov | 2015-12-01 | 1 | -0/+39 |
| * | libguile-ssh/channel-func.c: Use SCM_GSSH_DEFINE' macro•••* libguile-ssh/channel-func.c: Use SCM_GSSH_DEFINE' macro where it is
possible.
| Artyom V. Poptsov | 2015-11-24 | 1 | -17/+14 |
| * | libguile-ssh/sftp-session-type.c: Make GC callbacks static | Artyom V. Poptsov | 2015-11-23 | 1 | -3/+3 |
| * | libguile-ssh/sftp-file-type.h: Export some procedures | Artyom V. Poptsov | 2015-11-23 | 1 | -0/+8 |
| * | libguile-ssh/sftp-session-func.h: Include 'libguile.h' | Artyom V. Poptsov | 2015-11-23 | 1 | -0/+2 |
| * | libguile-ssh/sftp-session-func.h: Export Scheme procedures | Artyom V. Poptsov | 2015-11-23 | 1 | -0/+7 |
| * | libguile-ssh/sftp-session-type.h: Export some procedures | Artyom V. Poptsov | 2015-11-23 | 1 | -0/+3 |