Commit Graph

715 Commits

Author SHA1 Message Date
Nick Couchman
08f854ffef GUACAMOLE-313: Merge add support for logging mouse cursor information. 2018-01-30 14:05:39 -05:00
Michael Jumper
053d9d420c GUACAMOLE-352: Clean up keymap lookup/update logic for sake of verifiability. 2018-01-28 23:09:50 -08:00
Michael Jumper
9a5b5574a8 GUACAMOLE-352: Type using dead keys when necessary and possible. 2018-01-28 01:32:58 -08:00
Michael Jumper
5d56985479 GUACAMOLE-352: Add utility function for checking whether a keysym exists within the current RDP keyboard layout. 2018-01-28 00:56:24 -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
Michael Jumper
db85163e20 GUACAMOLE-384: Merge fix for potential segfault if SSH connection is closed while output is still being written to the terminal. 2018-01-23 14:44:47 -08:00
Michael Jumper
822a6c6b9d GUACAMOLE-484: Do not flush frame if connection closed mid-frame. 2018-01-22 12:24:07 -08:00
Michael Jumper
61c16a89d2 GUACAMOLE-484: Always clean up after orderly disconnect. 2018-01-22 12:23:39 -08:00
Michael Jumper
d562cb7648 GUACAMOLE-484: Ensure disconnect reason code is checked for orderly RDP disconnect. 2018-01-22 12:16:09 -08:00
csenel
93b3eebc5d
GUACAMOLE-481: Add Turkish Q keymap for RDP 2018-01-09 10:53:05 +03:00
Michael Jumper
2c12c12850 GUACAMOLE-424: Merge changes addressing potential NULL-pointer dereference in VNC user leave handler. 2017-11-15 07:05:21 -08:00
Michael Jumper
a75bca1e95 GUACAMOLE-273: Merge RDP support for Portuguese Brazilian keyboard. 2017-11-14 17:17:34 -08:00
Frode Langelo
fc599d2aec GUACAMOLE-273: Remove Mac remapping of €. 2017-11-14 20:04:49 +00:00
Michael Jumper
493fa4df16 GUACAMOLE-233: Merge RDP support for Spanish keyboards. 2017-11-14 10:56:28 -08:00
Frode Langelo
fc15850288 GUACAMOLE-233: Add Spanish keymap for RDP. 2017-11-13 22:57:21 +00:00
Frode Langelo
a8174eeac9 GUACAMOLE-273: Fix comment for remapping of €. 2017-11-13 22:52:39 +00:00
Frode Langelo
ed8a32f98b GUACAMOLE-273: Add Brazillian ABNT2 keymap for RDP. 2017-11-13 22:43:42 +00:00
Frode Langelo
625eee0caa GUACAMOLE-434: Add UK English keymap for RDP. 2017-11-13 22:26:29 +00:00
itsankoff
e139b20d12 GUACAMOLE-424: Remove check against NULL for display cursor 2017-11-13 14:51:31 +02:00
Michael Jumper
233f5e27e2 GUACAMOLE-296: Merge changes reverting explicit linking of libwinpr-utils. 2017-11-06 11:24:39 -08:00
Nick Couchman
b9f8e13d80 GUACAMOLE-296: Revert manual addition of winpr-utils library. 2017-11-06 12:20:56 -05:00
itsankoff
bbafa00df0 GUACAMOLE-424: Prevent null pointer dereference for vnc client display and cursor 2017-11-02 19:53:17 +02: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
itsankoff
15f6c4f3dc GUACAMOLE-424: Fix null pointer dereference for vnc client display 2017-10-24 20:21:03 +03:00
Michael Jumper
95be88be19 GUACAMOLE-296: Merge fix for linking issues with FreeRDP 1.1 and guacai (audio input). 2017-10-14 23:45:35 -07:00
Nick Couchman
caedf26a06 GUACAMOLE-296: Break out WINPR libs into their own variable. 2017-10-13 21:25:32 -04:00
David Fort
bb527f30f8 GUACAMOLE-402: fix out-of-tree build
Use $(srcdir) in places were it's needed, so that an out-of-tree build works.
2017-10-12 15:11:27 +02: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
Ilya Shipitsin
fc071fd1af GUACAMOLE-383: resolve issues identified by cppcheck
[src/guacd/conf-file.c:206]: (error) Memory leak: conf
[src/protocols/rdp/rdp_cliprdr.c:205]: (error) Memory leak: output
[src/terminal/display.c:283]: (error) Memory leak: display
[src/terminal/display.c:290]: (error) Memory leak: display
2017-09-20 22:55:58 +05:00
Michael Jumper
7857dd0a9a GUACAMOLE-303: Ensure there is always space for the null terminator when normalizing. 2017-07-04 12:00:43 -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
Michael Jumper
e5a1b4d8ae GUACAMOLE-326: Explicitly deny attempted reads/writes to Windows named data streams (like "foo:Zone.identifier" for the file "foo"). 2017-06-26 14:40:32 -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
89b9a905db GUACAMOLE-203: Tweak warning message sent to users. 2017-06-14 11:11:32 -04:00
Nick Couchman
df718395e8 GUACAMOLE-203: Change alive interval from int to unsigned. 2017-06-14 10:17:28 -04:00
Nick Couchman
193051dfd5 GUACAMOLE-203: Change parameter name for consistency 2017-06-14 08:40:07 -04:00
Nick Couchman
070bd25721 GUACAMOLE-203: if statement style tweak 2017-06-14 08:27:09 -04:00
Nick Couchman
03403e3ea5 GUACAMOLE-203: Correct implementation of SSH keepalive option for SFTP connections across all protocols. 2017-05-31 21:03:14 -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