Michael Jumper
0cf24219d8
GUACAMOLE-630: Define maximum "argv" stream length for SSH and telnet with symbolic constants.
2018-11-09 20:27:28 -08:00
Michael Jumper
edbdd08476
GUACAMOLE-649: Allow SSH connection to continue despite failure to set LANG environment variable.
2018-11-08 19:29:32 -08:00
Michael Jumper
454682979e
GUACAMOLE-649: Add support for setting LANG environment variable via SSH.
2018-11-04 21:20:47 -08:00
Michael Jumper
2f16eadb35
GUACAMOLE-630: Allow color scheme to be changed from webapp via argv streams.
2018-10-22 23:23:27 -07:00
Michael Jumper
d851f10a48
GUACAMOLE-353: Clarify applicability of ASF header when transcluded into generated build files.
2018-10-02 20:37:49 -07:00
Michael Jumper
286cbf32a7
GUACAMOLE-622: Ensure connection to guacd is kept alive even if the SSH daemon is taking its time responding. Lengthy connect times due to DNS verification, PAM, etc. are not uncommon.
2018-09-02 23:04:14 -07:00
Michael Jumper
4606607309
GUACAMOLE-622: Start terminal for SSH only after SSH connection succeeds.
2018-09-02 23:04:14 -07:00
Michael Jumper
0e6d549a40
GUACAMOLE-610: Allow scrollback size to be specified for SSH and telnet.
2018-08-18 11:12:55 -07:00
Nick Couchman
0062f61d67
Merge 1.0.0 changes back to master.
2018-07-31 08:12:30 -04:00
Michael Jumper
860a5fca8f
GUACAMOLE-559: Maintain terminal clipboard at client level such that it is guaranteed to exist immediately after user connects.
2018-07-30 23:53:03 -07:00
Michael Jumper
67680bd2d5
Merge 1.0.0 changes back to master.
2018-06-25 17:27:10 -07:00
Nick Couchman
aec2be6da2
GUACAMOLE-527: Remove unnecessary includes.
2018-06-25 08:31:37 -04:00
Nick Couchman
2bebb96804
GUACAMOLE-527: Fix host key options in the protocol settings.
2018-06-25 08:31:37 -04:00
Nick Couchman
551598e0a4
GUACAMOLE-527: Use libssh2_knownhost_readline and remove host key type.
2018-06-25 08:31:37 -04:00
Nick Couchman
42044e4279
GUACAMOLE-527: Clean up memory and logging.
2018-06-25 08:31:37 -04:00
Nick Couchman
ec4315dfbe
GUACAMOLE-527: Correct names of parameters coming from client.
2018-06-25 08:31:37 -04:00
Nick Couchman
9112c4f32f
GUACAMOLE-527: Enable host key setting for SFTP connections.
2018-06-25 08:31:37 -04:00
Nick Couchman
0d82cd1e6c
GUACAMOLE-527: Add host key and type settings.
2018-06-25 08:31:37 -04:00
Michael Jumper
b650bef139
GUACAMOLE-574: Redirect STDIN from pipe stream named "STDIN" for SSH and telnet.
2018-06-18 14:31:09 -07:00
Michael Jumper
81bba1b587
GUACAMOLE-470: Merge support for fully configurable terminal color palette.
2018-05-27 08:49:18 -07:00
Jim Chen
87df97317f
GUACAMOLE-565: Add terminal-type parameter for SSH and Telnet.
...
Add a terminal-type parameter for SSH and Telnet connections, to specify
the terminal emulator type that is passed to programs. If not specified,
the default type of "linux" is used in keep with existing behavior.
2018-05-26 23:30:22 -04:00
Jim Chen
1bd537c350
GUACAMOLE-470: Support configurable colors in color-scheme parameter.
...
Add support for configuring individual colors in the color-scheme
parameter, by parsing the parameter content into name-value pairs.
Backward compatibility is preserved by translating previously supported
values into corresponding new values.
2018-05-26 23:18:27 -04:00
Nick Couchman
dc1918b217
GUACAMOLE-269: Don't abort on ttymode issue, just log a warning.
2018-04-02 15:05:56 -04:00
Nick Couchman
7453bc8f44
GUACAMOLE-269: Clean up logging and comments, and simplify code.
2018-04-02 15:04:03 -04:00
Nick Couchman
b441181c18
GUACAMOLE-269: Remove unnecessary data structure and array size, and update comments.
2018-04-02 10:43:57 -04:00
Nick Couchman
ea946f2492
GUACAMOLE-269: Changes to initializing opcode array.
2018-04-02 09:10:11 -04:00
Nick Couchman
e16bfd7837
GAUCAMOLE-269: Memory effeciency updates.
2018-03-24 15:50:11 -04:00
Nick Couchman
11136f7d7b
GUACAMOLE-269: More documentation updates.
2018-03-24 15:09:34 -04:00
Nick Couchman
86dde85b2d
GUACAMOLE-269: Comment and spelling updates.
2018-03-24 14:53:22 -04:00
Nick Couchman
45b832bfdc
GUACAMOLE-269: Remove all dynamic allocation and simplify implementation.
2018-03-08 11:36:15 -05:00
Nick Couchman
dd7522bd9f
GUACAMOLE-269: Get rid of dynamic allocation and properly free up data structures.
2018-03-08 10:48:22 -05:00
Nick Couchman
c3e1b2afef
GUACAMOLE-269: Fix minor style issues and update comments.
2018-03-08 10:48:22 -05:00
Nick Couchman
64ca77f3a5
GUACAMOLE-269: Change struct to struct pointer.
2018-03-08 10:48:22 -05:00
Nick Couchman
c286668b79
GUACAMOLE-269: Name functions per Guacamole standards.
2018-03-08 10:48:22 -05:00
Nick Couchman
9bd28321e5
GUACAMOLE-269: Fix up style in comments.
2018-03-08 10:48:21 -05:00
Nick Couchman
fd58d31eea
GUACAMOLE-269: Use backspace config to set up tty modes.
2018-03-08 10:48:21 -05:00
Nick Couchman
46e908c06e
GUACAMOLE-269: Allow backspace key to be configured.
2018-03-08 10:48:21 -05:00
Nick Couchman
2ace9385a2
GUACAMOLE-269: Add documentation for the defines and variables.
2018-03-08 10:48:21 -05:00
Nick Couchman
5583748b54
GUACAMOLE-269: Move constant declaration to ttymode.c
2018-03-08 10:48:21 -05:00
Nick Couchman
f1bf70a4a2
GUACAMOLE-269: Add basic support for sending TTY mode encoding.
2018-03-08 10:48:21 -05:00
Michael Jumper
4fb17d5610
GUACAMOLE-313: Add flags for controlling the contents of session recordings.
2018-01-26 16:42:24 -08:00
Michael Jumper
876516a1fb
GUACAMOLE-313: Add support for including key states within session recordings.
2018-01-26 16:42:14 -08:00
Michael Jumper
81a0e66d9f
GUACAMOLE-313: Include current button state within mouse update for completeness.
2018-01-26 16:21:53 -08:00
Michael Jumper
df770ae4ea
GUACAMOLE-313: Add support for including mouse location within session recordings.
2018-01-26 16:21:28 -08:00
Michael Jumper
b37e73488f
GUACAMOLE-313: Provide reference to in-progress screen recording.
2018-01-26 16:21:24 -08:00
sanhex
d33bd8deff
GUACAMOLE-384: fixing segfault during ssh disconnect
...
Root Cause:
See the core dump and Valgrind report posted on Jira. guacd was reading a ssh terminal which had been freed. When a ssh connection is terminated, guac_ssh_client_free_handler() will be called from guacd_exec_proc() -> guac_client_free() with pointer client->free_handler. In guac_ssh_client_free_handler(), when ssh_client->term is freed, ssh_client->client_thread may still be using the ssh_client->term. It causes the crash reported in this bug.
The stack trace exposing the problem can be found by running guacd under Valgrind with a ssh test script. The test script repeats doing ssh login and logout for 5000 times.
Solution:
In guac_ssh_client_free_handler(), before calling guac_terminal_free(ssh_client->term), close the stdin pipe of the terminal to stop reading the pipe with guac_terminal_read_stdin() in ssh_input_thread(). So that ssh_input_thread() can be terminated in this case. Call pthread_join() to wait for ssh_client_thread() terminating before freeing the terminal.
Add a new function guac_terminal_stop() to close the pipe and set the fds to invalid (-1). Call it in guac_ssh_client_free_handler() and guac_terminal_free().
Checking the client running state in ssh_input_thread() and ssh_client_thread() to make sure they can be terminated when the client is stopped in guacd_exec_proc() by another thread.
Test:
- Confirmed ssh connection works normally.
- Observed the child process of guacd exits when ssh connection is terminated.
- Reran the ssh test script. Observed no crash.
2017-10-29 18:11:15 -07:00
sanhex
3c7a09f52b
GUACAMOLE-400: Fix guacd crash when ssh key fails
...
Root Cause:
In the ssh library of guacd, function ssh_client_thread(), when guac_ssh_get_user() fails to load private key for ssh authentication, it will return NULL. In this case, the subsequent call to guac_common_ssh_create_session() with parameter 'user=0x0' will cause guacd crash in function guac_common_ssh_authenticate() by accessing 'user->username'.
Solution:
- Update the comment of function guac_ssh_get_user() to document that NULL will be returned if fails to import key for the user.
- In function ssh_client_thread(), verify the return of guac_ssh_get_user(). If ssh_client->user is NULL, return NULL.
Test:
- Configured a ssh app with an encrypted private key and a wrong passphrase.
- Ran the ssh app from web portal and observed guacd crash.
- Applied the fix and reran the ssh app. Observed no crash.
2017-09-29 11:04:48 -07:00
Michael Jumper
d51e92eb31
GUACAMOLE-303: Add "sftp-root-directory" parameter to VNC, RDP, and SSH.
2017-06-29 15:48:23 -07:00
Michael Jumper
0474f86c46
GUACAMOLE-303: Extend common SFTP filesystem such that arbitrary directories can be used as the root of the filesystem.
2017-06-29 15:36:10 -07:00
Nick Couchman
041fcc4651
GUACAMOLE-203: Change remaining instances of timer to timeout.
2017-06-25 05:13:22 -04:00
Nick Couchman
05dfb1a6ae
GUACAMOLE-203: Deal correctly with negative keepalive values.
2017-06-25 05:10:22 -04:00
Nick Couchman
8c24c77d55
GUACAMOLE-203: Change timer to timeout
2017-06-14 13:00:30 -04:00
Nick Couchman
af4d762147
GUACAMOLE-203: Move warning about minimum alive interval to single place in common code.
2017-06-14 12:49:49 -04:00
Nick Couchman
df718395e8
GUACAMOLE-203: Change alive interval from int to unsigned.
2017-06-14 10:17:28 -04:00
Nick Couchman
070bd25721
GUACAMOLE-203: if statement style tweak
2017-06-14 08:27:09 -04:00
Nick Couchman
e7fc8a0d98
GUACAMOLE-203: Expand SSH keepalives to cover SFTP connections for other protocols.
2017-05-31 21:03:09 -04:00
Nick Couchman
9993684205
GUACAMOLE-203: Warn user if they try to enter keepalive value < 2 seconds.
2017-05-31 21:03:06 -04:00
Nick Couchman
1e3d82cc63
GUACAMOLE-203: Update comment for keep alive interval.
2017-05-31 21:03:04 -04:00
Nick Couchman
f693b02e12
GUACAMOLE-203: Tighten up code, implement constant for socket poll timer.
2017-05-31 21:02:59 -04:00
Nick Couchman
75019f5e4b
GUACAMOLE-203: Add a few more comments to code.
2017-05-31 21:02:53 -04:00
Nick Couchman
8ab7e56972
GUACAMOLE-203: Implement keepalive config in SSH connection.
2017-05-31 21:02:50 -04:00
Nick Couchman
f42f05aab7
GUACAMOLE-203: Add option entries for ServerAliveInterval.
2017-05-31 21:02:38 -04:00
Michael Jumper
61896e829c
GUACAMOLE-257: Set VNC/SSH file upload handlers only if SFTP is enabled.
2017-03-28 10:48:38 -07:00
Michael Jumper
3f7ccb6b9a
GUACAMOLE-169: Move terminal headers to namespaced directory.
2017-02-27 14:34:46 -08:00
Michael Jumper
d371f2d9ee
GUACAMOLE-169: Move common-ssh headers to namespaced directory.
2017-02-27 14:28:23 -08:00
Michael Jumper
eee928548d
GUACAMOLE-169: Use proper namespace for internal common headers.
2017-01-23 23:26:26 -08:00
Michael Jumper
e5b3af8ffe
GUACAMOLE-86: Remove terminal emulator's STDOUT pipe. Use pthread_cond_t to signal modification.
2017-01-16 00:02:30 -08:00
Michael Jumper
2421fc2f11
GUACAMOLE-118: Use poll() when waiting for data from SSH.
2016-11-11 13:16:57 -08:00
Michael Jumper
1ad99a312e
GUACAMOLE-5: Add "read-only" parameter to RDP, SSH, and telnet (per-user, just like VNC).
2016-07-24 22:36:25 -07:00
Michael Jumper
0641ccf601
GUACAMOLE-5: Store connection parameters at user level. Maintain reference to owner's connection parameters at client level.
2016-07-24 22:05:04 -07:00
James Muehlner
ec93a2989f
GUACAMOLE-33: Merge mouse duplication user disconnect fix.
2016-05-23 20:45:18 -07:00
Michael Jumper
82fd6a279b
GUACAMOLE-33: Implement leave handlers for RDP, SSH, and telnet.
2016-05-23 13:58:30 -07:00
Michael Jumper
a64c3e0179
GUACAMOLE-34: Ensure guac_client_stop() or guac_client_abort() are called in ALL cases where the client thread terminates.
2016-05-23 13:58:01 -07:00
Michael Jumper
f4b8c70f79
GUACAMOLE-1: Relicense build/shell scripts.
2016-03-28 20:39:38 -07:00
Michael Jumper
4da3bef4ec
GUACAMOLE-1: Relicense C files.
2016-03-28 20:39:19 -07:00
Michael Jumper
0a5e57362e
GUAC-236: Add missing plurals.
2016-03-16 10:45:11 -07:00
Michael Jumper
6fc208554d
GUAC-236: Add session recording parameters to VNC, RDP, and SSH.
2016-03-14 20:22:02 -07:00
Michael Jumper
3a4aec3708
GUAC-1389: Document parameters of SSH client thread.
2016-03-14 18:32:03 -07:00
Michael Jumper
fa43a94e02
GUAC-1389: Rely on API definition for handler.
2016-03-14 18:27:52 -07:00
Michael Jumper
075b7ffba9
GUAC-1389: Add screen sharing support to SSH.
2016-03-14 17:33:17 -07:00
Michael Jumper
4661f432f0
GUAC-1452: Parse and handle typescript parameters within SSH and telnet.
2016-01-27 12:43:53 -08:00
Michael Jumper
ad34aa99b4
GUAC-1452: Add typescript parameters for SSH/telnet.
2016-01-25 13:12:24 -08:00
Michael Jumper
e8b98abfc4
GUAC-1038: Add support for running specific commands via SSH (instead of a shell).
2015-10-19 15:58:44 -07:00
Michael Jumper
677c3ce6e8
GUAC-1195: Add "color-scheme" parameter to SSH and telnet.
2015-07-28 16:46:32 -07:00
Michael Jumper
fa443249c9
GUAC-1195: Use color scheme constants and names.
2015-07-28 16:43:23 -07:00
Michael Jumper
b2c2779465
GUAC-1195: Define and use color constants for terminal.
2015-07-28 16:20:14 -07:00
Michael Jumper
029b3bdb80
GUAC-1195: Configure default foreground/background when terminal is created.
2015-07-28 15:59:20 -07:00
Michael Jumper
49beb7d7fd
GUAC-1264: Require explicit free for users and sessions. Ensure SSH client data is zeroed upon allocation.
2015-07-24 13:20:36 -07:00
Michael Jumper
bfe4895408
GUAC-1171: Remove extra trailing spaces from parameter comments.
2015-07-10 21:01:17 -07:00
Michael Jumper
3d1d2ea334
GUAC-1171: Migrate to common SSH for SFTP transfers.
2015-07-10 17:21:58 -07:00
Michael Jumper
a6b46a0ea0
GUAC-1171: Add and document SFTP functionality within common SSH.
2015-07-10 17:21:27 -07:00
Michael Jumper
0fcea2738b
GUAC-1171: Migrate to common SSH within client.
2015-07-10 12:46:11 -07:00
Michael Jumper
fbcf8a1e0d
GUAC-1171: Move initialization of SSH, OpenSSL, etc. to common SSH base.
2015-07-09 12:02:31 -07:00
Michael Jumper
c199cfc8d7
GUAC-1171: Adopt cleaner style for Makefile.am.
2015-07-08 15:39:25 -07:00
Michael Jumper
77cde6ae4b
GUAC-1171: Stub out common SSH client within build.
2015-07-08 14:55:18 -07:00
Michael Jumper
58621ca42b
GUAC-1172: Move JSON functions to common.
2015-07-05 18:08:22 -07:00
Michael Jumper
ddbbcf032a
GUAC-1172: Ensure empty directories are valid JSON.
2015-07-05 12:56:10 -07:00
Michael Jumper
054698a3ad
GUAC-1172: Append. Do not appaned.
2015-07-01 11:11:07 -07:00
Michael Jumper
42c36f5b84
GUAC-1172: Properly store/free filesystem object.
2015-07-01 10:48:25 -07:00
Michael Jumper
0bbc958373
GUAC-1172: Implement file upload via filesystem object.
2015-07-01 10:48:25 -07:00