GUACAMOLE-381: Add copy/paste disable flags for all supported protocols.

This commit is contained in:
Michael Jumper 2019-02-19 11:34:18 -08:00
parent 802e5b5547
commit 7d2b7126db
10 changed files with 200 additions and 1 deletions

View File

@ -50,6 +50,8 @@ const char* GUAC_KUBERNETES_CLIENT_ARGS[] = {
"read-only",
"backspace",
"scrollback",
"disable-copy",
"disable-paste",
NULL
};
@ -216,6 +218,20 @@ enum KUBERNETES_ARGS_IDX {
*/
IDX_SCROLLBACK,
/**
* Whether outbound clipboard access should be blocked. If set to "true",
* it will not be possible to copy data from the terminal to the client
* using the clipboard. By default, clipboard access is not blocked.
*/
IDX_DISABLE_COPY,
/**
* Whether inbound clipboard access should be blocked. If set to "true", it
* will not be possible to paste data from the client to the terminal using
* the clipboard. By default, clipboard access is not blocked.
*/
IDX_DISABLE_PASTE,
KUBERNETES_ARGS_COUNT
};
@ -364,6 +380,16 @@ guac_kubernetes_settings* guac_kubernetes_parse_args(guac_user* user,
guac_user_parse_args_int(user, GUAC_KUBERNETES_CLIENT_ARGS, argv,
IDX_BACKSPACE, 127);
/* Parse clipboard copy disable flag */
settings->disable_copy =
guac_user_parse_args_boolean(user, GUAC_KUBERNETES_CLIENT_ARGS, argv,
IDX_DISABLE_COPY, false);
/* Parse clipboard paste disable flag */
settings->disable_paste =
guac_user_parse_args_boolean(user, GUAC_KUBERNETES_CLIENT_ARGS, argv,
IDX_DISABLE_PASTE, false);
/* Parsing was successful */
return settings;

View File

@ -170,6 +170,20 @@ typedef struct guac_kubernetes_settings {
*/
int resolution;
/**
* Whether outbound clipboard access should be blocked. If set, it will not
* be possible to copy data from the terminal to the client using the
* clipboard.
*/
bool disable_copy;
/**
* Whether inbound clipboard access should be blocked. If set, it will not
* be possible to paste data from the client to the terminal using the
* clipboard.
*/
bool disable_paste;
/**
* The path in which the typescript should be saved, if enabled. If no
* typescript should be saved, this will be NULL.

View File

@ -118,6 +118,8 @@ const char* GUAC_RDP_CLIENT_ARGS[] = {
"load-balance-info",
#endif
"disable-copy",
"disable-paste",
NULL
};
@ -545,6 +547,20 @@ enum RDP_ARGS_IDX {
IDX_LOAD_BALANCE_INFO,
#endif
/**
* Whether outbound clipboard access should be blocked. If set to "true",
* it will not be possible to copy data from the remote desktop to the
* client using the clipboard. By default, clipboard access is not blocked.
*/
IDX_DISABLE_COPY,
/**
* Whether inbound clipboard access should be blocked. If set to "true", it
* will not be possible to paste data from the client to the remote desktop
* using the clipboard. By default, clipboard access is not blocked.
*/
IDX_DISABLE_PASTE,
RDP_ARGS_COUNT
};
@ -1007,6 +1023,16 @@ guac_rdp_settings* guac_rdp_parse_args(guac_user* user,
IDX_LOAD_BALANCE_INFO, NULL);
#endif
/* Parse clipboard copy disable flag */
settings->disable_copy =
guac_user_parse_args_boolean(user, GUAC_RDP_CLIENT_ARGS, argv,
IDX_DISABLE_COPY, 0);
/* Parse clipboard paste disable flag */
settings->disable_paste =
guac_user_parse_args_boolean(user, GUAC_RDP_CLIENT_ARGS, argv,
IDX_DISABLE_PASTE, 0);
/* Success */
return settings;

View File

@ -268,6 +268,20 @@ typedef struct guac_rdp_settings {
*/
char** svc_names;
/**
* Whether outbound clipboard access should be blocked. If set, it will not
* be possible to copy data from the remote desktop to the client using the
* clipboard.
*/
int disable_copy;
/**
* Whether inbound clipboard access should be blocked. If set, it will not
* be possible to paste data from the client to the remote desktop using
* the clipboard.
*/
int disable_paste;
/**
* Whether the desktop wallpaper should be visible. If unset, the desktop
* wallpaper will be hidden, reducing the amount of bandwidth required.

View File

@ -62,6 +62,8 @@ const char* GUAC_SSH_CLIENT_ARGS[] = {
"scrollback",
"locale",
"timezone",
"disable-copy",
"disable-paste",
NULL
};
@ -258,6 +260,20 @@ enum SSH_ARGS_IDX {
*/
IDX_TIMEZONE,
/**
* Whether outbound clipboard access should be blocked. If set to "true",
* it will not be possible to copy data from the terminal to the client
* using the clipboard. By default, clipboard access is not blocked.
*/
IDX_DISABLE_COPY,
/**
* Whether inbound clipboard access should be blocked. If set to "true", it
* will not be possible to paste data from the client to the terminal using
* the clipboard. By default, clipboard access is not blocked.
*/
IDX_DISABLE_PASTE,
SSH_ARGS_COUNT
};
@ -426,6 +442,16 @@ guac_ssh_settings* guac_ssh_parse_args(guac_user* user,
guac_user_parse_args_string(user, GUAC_SSH_CLIENT_ARGS, argv,
IDX_TIMEZONE, NULL);
/* Parse clipboard copy disable flag */
settings->disable_copy =
guac_user_parse_args_boolean(user, GUAC_SSH_CLIENT_ARGS, argv,
IDX_DISABLE_COPY, false);
/* Parse clipboard paste disable flag */
settings->disable_paste =
guac_user_parse_args_boolean(user, GUAC_SSH_CLIENT_ARGS, argv,
IDX_DISABLE_PASTE, false);
/* Parsing was successful */
return settings;

View File

@ -155,6 +155,20 @@ typedef struct guac_ssh_settings {
*/
int resolution;
/**
* Whether outbound clipboard access should be blocked. If set, it will not
* be possible to copy data from the terminal to the client using the
* clipboard.
*/
bool disable_copy;
/**
* Whether inbound clipboard access should be blocked. If set, it will not
* be possible to paste data from the client to the terminal using the
* clipboard.
*/
bool disable_paste;
/**
* Whether SFTP is enabled.
*/

View File

@ -55,6 +55,8 @@ const char* GUAC_TELNET_CLIENT_ARGS[] = {
"scrollback",
"login-success-regex",
"login-failure-regex",
"disable-copy",
"disable-paste",
NULL
};
@ -216,6 +218,20 @@ enum TELNET_ARGS_IDX {
*/
IDX_LOGIN_FAILURE_REGEX,
/**
* Whether outbound clipboard access should be blocked. If set to "true",
* it will not be possible to copy data from the terminal to the client
* using the clipboard. By default, clipboard access is not blocked.
*/
IDX_DISABLE_COPY,
/**
* Whether inbound clipboard access should be blocked. If set to "true", it
* will not be possible to paste data from the client to the terminal using
* the clipboard. By default, clipboard access is not blocked.
*/
IDX_DISABLE_PASTE,
TELNET_ARGS_COUNT
};
@ -428,6 +444,16 @@ guac_telnet_settings* guac_telnet_parse_args(guac_user* user,
guac_user_parse_args_string(user, GUAC_TELNET_CLIENT_ARGS, argv,
IDX_TERMINAL_TYPE, "linux");
/* Parse clipboard copy disable flag */
settings->disable_copy =
guac_user_parse_args_boolean(user, GUAC_TELNET_CLIENT_ARGS, argv,
IDX_DISABLE_COPY, false);
/* Parse clipboard paste disable flag */
settings->disable_paste =
guac_user_parse_args_boolean(user, GUAC_TELNET_CLIENT_ARGS, argv,
IDX_DISABLE_PASTE, false);
/* Parsing was successful */
return settings;

View File

@ -171,6 +171,20 @@ typedef struct guac_telnet_settings {
*/
int resolution;
/**
* Whether outbound clipboard access should be blocked. If set, it will not
* be possible to copy data from the terminal to the client using the
* clipboard.
*/
bool disable_copy;
/**
* Whether inbound clipboard access should be blocked. If set, it will not
* be possible to paste data from the client to the terminal using the
* clipboard.
*/
bool disable_paste;
/**
* The path in which the typescript should be saved, if enabled. If no
* typescript should be saved, this will be NULL.

View File

@ -77,7 +77,8 @@ const char* GUAC_VNC_CLIENT_ARGS[] = {
"recording-exclude-mouse",
"recording-include-keys",
"create-recording-path",
"disable-copy",
"disable-paste",
NULL
};
@ -298,6 +299,20 @@ enum VNC_ARGS_IDX {
*/
IDX_CREATE_RECORDING_PATH,
/**
* Whether outbound clipboard access should be blocked. If set to "true",
* it will not be possible to copy data from the remote desktop to the
* client using the clipboard. By default, clipboard access is not blocked.
*/
IDX_DISABLE_COPY,
/**
* Whether inbound clipboard access should be blocked. If set to "true", it
* will not be possible to paste data from the client to the remote desktop
* using the clipboard. By default, clipboard access is not blocked.
*/
IDX_DISABLE_PASTE,
VNC_ARGS_COUNT
};
@ -493,6 +508,16 @@ guac_vnc_settings* guac_vnc_parse_args(guac_user* user,
guac_user_parse_args_boolean(user, GUAC_VNC_CLIENT_ARGS, argv,
IDX_CREATE_RECORDING_PATH, false);
/* Parse clipboard copy disable flag */
settings->disable_copy =
guac_user_parse_args_boolean(user, GUAC_VNC_CLIENT_ARGS, argv,
IDX_DISABLE_COPY, false);
/* Parse clipboard paste disable flag */
settings->disable_paste =
guac_user_parse_args_boolean(user, GUAC_VNC_CLIENT_ARGS, argv,
IDX_DISABLE_PASTE, false);
return settings;
}

View File

@ -127,6 +127,20 @@ typedef struct guac_vnc_settings {
*/
char* clipboard_encoding;
/**
* Whether outbound clipboard access should be blocked. If set, it will not
* be possible to copy data from the remote desktop to the client using the
* clipboard.
*/
bool disable_copy;
/**
* Whether inbound clipboard access should be blocked. If set, it will not
* be possible to paste data from the client to the remote desktop using
* the clipboard.
*/
bool disable_paste;
#ifdef ENABLE_COMMON_SSH
/**
* Whether SFTP should be enabled for the VNC connection.