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",
"printer-name",
"enable-drive",
"drive-name",
"drive-path",
"create-drive-path",
"console",
@ -199,6 +200,12 @@ enum RDP_ARGS_IDX {
*/
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
* 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,
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 =
guac_user_parse_args_string(user, GUAC_RDP_CLIENT_ARGS, argv,
IDX_DRIVE_PATH, "");
@ -990,6 +1002,7 @@ void guac_rdp_settings_free(guac_rdp_settings* settings) {
/* Free settings strings */
free(settings->client_name);
free(settings->domain);
free(settings->drive_name);
free(settings->drive_path);
free(settings->hostname);
free(settings->initial_program);

View File

@ -187,6 +187,11 @@ typedef struct guac_rdp_settings {
*/
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
* virtual drive.