Commit Graph

98 Commits

Author SHA1 Message Date
Maxime Coste
199c2a0961 GUACAMOLE-871: Add support for hidden cursor (DECTECM) 2019-10-15 20:24:51 +11:00
Nick Couchman
f962eab27a Merge 1.1.0 changes back to master. 2019-08-09 13:01:54 -04:00
Michael Jumper
ccfcfb116d GUACAMOLE-630: Persist details of color scheme and font changes. 2019-08-04 12:44:43 -07:00
Michael Jumper
b5191caddc GUACAMOLE-630: Accept pre-defined color schemes in all cases, not just during terminal creation. 2019-08-04 11:37:42 -07:00
Michael Jumper
228cea4af1 GUACAMOLE-381: Disable outbound transfers from terminal protocols if "disable-copy" is set. 2019-02-19 12:11:24 -08:00
Michael Jumper
9e28de70ec GUACAMOLE-630: Separate setting of font family/size from terminal display initialization. 2018-11-10 14:22:23 -08:00
Michael Jumper
f293c5e9c0 GUACAMOLE-630: Do not entirely reset terminal state when color scheme is changed. 2018-10-22 23:23:27 -07: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
6f9f2189f2 GUACAMOLE-630: Separate color scheme parsing into own files. 2018-10-22 23:23:27 -07:00
Michael Jumper
0b39b0fc5f GUACAMOLE-622: Implicitly invoke guac_terminal_start() if prompting is required. 2018-09-02 23:04:14 -07:00
Michael Jumper
61a51df1b2 GUACAMOLE-622: Require guac_terminal_start() to be invoked before the terminal will render frames or accept user input. 2018-09-02 23:04:14 -07:00
Michael Jumper
994cb95893 GUACAMOLE-610: Add console code for altering scrollback size on the fly. 2018-08-18 11:26:12 -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
Michael Jumper
6a576f0121 GUACAMOLE-610: Limit terminal width/height to 1024 characters. 2018-08-18 11:12:50 -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
e66178ff9a GUACAMOLE-597: Add flag for forcing automatic flushing of pipe stream. 2018-07-27 14:23:50 -07:00
Michael Jumper
e02df8d550 GUACAMOLE-597: Additionally parse integer flags which may affect pipe stream contents. 2018-07-27 14:23:33 -07:00
Michael Jumper
97593958e4 GUACAMOLE-574: Add support for reading STDIN from a pipe stream. 2018-06-18 14:31:09 -07:00
Michael Jumper
1756c01522 GUACAMOLE-573: Update selected region when terminal scrolls. 2018-06-17 00:01:47 -07:00
Michael Jumper
6f08ef2a07 GUACAMOLE-573: Allow text selection to be expanded using Shift (fixes GUACAMOLE-191). 2018-06-17 00:01:47 -07:00
Michael Jumper
c0d323828e GUACAMOLE-573: Copy terminal data directly into clipboard. Do not assume selected region will be strictly visible. 2018-06-16 23:58:38 -07:00
Michael Jumper
f87af06ad6 GUACAMOLE-573: Move terminal text selection code into own file. 2018-06-16 23:58:34 -07:00
Jim Chen
9c10ddae3b GUACAMOLE-470: Fix incompatible pointer type warning under older GCC.
Older versions of GCC (prior to 5.1) emits an "incompatible pointer
type" warning when passing `foo(*)[]` as `const foo(*)[]`. This was
changed in GCC 5.1, and this patch adds explicit casts to remove the
warning under older GCC.
2018-05-27 23:46:16 -04:00
Jim Chen
6da9236ffd GUACAMOLE-470: Reset character attributes on terminal reset.
The character attributes such as foreground/background colors should be
reset as well when performing a terminal reset.
2018-05-26 23:18:27 -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
Jim Chen
f8b35078fc GUACAMOLE-470: Add support for configurable default palette.
Add support for configuring a default palette for a terminal display.
When the default palette is specified during display creation, that
palette is used instead of GUAC_TERMINAL_INITIAL_PALETTE when resetting
the display palette.
2018-05-15 22:05:59 -04:00
Nick Couchman
c898f35959 GUACAMOLE-269: Clean up terminal backspace initialization. 2018-04-02 07:47:49 -04:00
Nick Couchman
112ce5299e GUACAMOLE-269: Remove unnecessary dynamic allocation. 2018-03-24 14:54:27 -04:00
Nick Couchman
c3e1b2afef GUACAMOLE-269: Fix minor style issues and update comments. 2018-03-08 10:48:22 -05:00
Nick Couchman
33cca46346 GUACAMOLE-269: Remove debug code. 2018-03-08 10:48:22 -05:00
Nick Couchman
dd78d230ea GUACAMOLE-269: Backspace key should send null-terminated string. 2018-03-08 10:48:22 -05:00
Nick Couchman
46e908c06e GUACAMOLE-269: Allow backspace key to be configured. 2018-03-08 10:48:21 -05:00
Michael Jumper
81a0e66d9f GUACAMOLE-313: Include current button state within mouse update for completeness. 2018-01-26 16:21:53 -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
Michael Jumper
eec3607b16 GUACAMOLE-279: Migrate to mutable terminal color palette. 2017-07-10 14:08:21 -07:00
Michael Jumper
2146200dfd GUACAMOLE-280: Add support for faint (low) intensity SGR. 2017-05-21 13:46:21 -07:00
Michael Jumper
eaa71f5717 GUACAMOLE-278: Move terminal palette/color definitions into dedicated files. 2017-04-23 13:23:58 -07:00
Michael Jumper
48fc4afc5b GUACAMOLE-278: Copy terminal color values rather than referencing only by palette index. 2017-04-23 13:23:48 -07:00
James Muehlner
2c2824fc5b Merge 0.9.12-incubating changes back to master. 2017-03-13 22:13:10 -07:00
Michael Jumper
fe8771e181 GUACAMOLE-231: Notifying terminal for mouse movement is no longer necessary (common cursor sends its own position updates without requiring new frames). 2017-03-11 14:58:52 -08:00
James Muehlner
1d5d8784b3 Merge 0.9.12-incubating changes back to master. 2017-03-10 09:46:59 -08:00
Michael Jumper
6a1db08299 GUACAMOLE-231: Notify terminal when display is modified due to mouse cursor movement. 2017-03-06 22:41:19 -08:00
James Muehlner
c4903a8e36 Merge 0.9.12-incubating changes back to master. 2017-02-28 10:32:49 -08:00
Michael Jumper
3f7ccb6b9a GUACAMOLE-169: Move terminal headers to namespaced directory. 2017-02-27 14:34:46 -08:00
Michael Jumper
da81d16c27 GUACAMOLE-206: Do not drop keys while Alt is held. 2017-02-14 21:25:20 -08:00
Michael Jumper
a6e3f19bf7 GUACAMOLE-149: Ignore zero-width characters. 2017-01-31 23:57:02 -08:00
Michael Jumper
fc6f36150f GUACAMOLE-193: Take character attributes into account when testing for visibility. 2017-01-30 22:39:49 -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