GUACAMOLE-446: Add settings for drive name.

This commit is contained in:
Nick Couchman 2018-07-03 22:59:30 -04:00
parent da1e078242
commit cfcfe8866c
2 changed files with 18 additions and 0 deletions

View File

@ -54,6 +54,7 @@ const char* GUAC_RDP_CLIENT_ARGS[] = {
"enable-printing", "enable-printing",
"printer-name", "printer-name",
"enable-drive", "enable-drive",
"drive-name",
"drive-path", "drive-path",
"create-drive-path", "create-drive-path",
"console", "console",
@ -199,6 +200,12 @@ enum RDP_ARGS_IDX {
*/ */
IDX_ENABLE_DRIVE, IDX_ENABLE_DRIVE,
/**
* The name of the virtual driver that will be passed through to the
* RDP connection.
*/
IDX_DRIVE_NAME,
/** /**
* The local system path which will be used to persist the * The local system path which will be used to persist the
* virtual drive. This must be specified if the virtual drive is enabled. * virtual drive. This must be specified if the virtual drive is enabled.
@ -810,6 +817,11 @@ guac_rdp_settings* guac_rdp_parse_args(guac_user* user,
guac_user_parse_args_boolean(user, GUAC_RDP_CLIENT_ARGS, argv, guac_user_parse_args_boolean(user, GUAC_RDP_CLIENT_ARGS, argv,
IDX_ENABLE_DRIVE, 0); IDX_ENABLE_DRIVE, 0);
/* Name of the drive being passed through */
settings->drive_name =
guac_user_parse_args_string(user, GUAC_RDP_CLIENT_ARGS, argv,
IDX_DRIVE_NAME, 0);
settings->drive_path = settings->drive_path =
guac_user_parse_args_string(user, GUAC_RDP_CLIENT_ARGS, argv, guac_user_parse_args_string(user, GUAC_RDP_CLIENT_ARGS, argv,
IDX_DRIVE_PATH, ""); IDX_DRIVE_PATH, "");
@ -990,6 +1002,7 @@ void guac_rdp_settings_free(guac_rdp_settings* settings) {
/* Free settings strings */ /* Free settings strings */
free(settings->client_name); free(settings->client_name);
free(settings->domain); free(settings->domain);
free(settings->drive_name);
free(settings->drive_path); free(settings->drive_path);
free(settings->hostname); free(settings->hostname);
free(settings->initial_program); free(settings->initial_program);

View File

@ -187,6 +187,11 @@ typedef struct guac_rdp_settings {
*/ */
int drive_enabled; int drive_enabled;
/**
* The name of the virtual drive to pass through to the RDP connection.
*/
char* drive_name;
/** /**
* The local system path which will be used to persist the * The local system path which will be used to persist the
* virtual drive. * virtual drive.