Ignore set end-of-file and set allocation.

This commit is contained in:
Michael Jumper 2013-10-21 16:06:19 -07:00
parent 683e8c24c0
commit f9cf524993
3 changed files with 52 additions and 23 deletions

View File

@ -380,9 +380,10 @@ void guac_rdpdr_fs_process_set_file_info(guac_rdpdr_device* device,
wStream* input_stream, int file_id, int completion_id) {
int fs_information_class;
int length;
Stream_Read_UINT32(input_stream, fs_information_class);
Stream_Seek(input_stream, 4); /* Length */
Stream_Read_UINT32(input_stream, length); /* Length */
Stream_Seek(input_stream, 24); /* Padding */
/* Dispatch to appropriate class-specific handler */
@ -390,27 +391,27 @@ void guac_rdpdr_fs_process_set_file_info(guac_rdpdr_device* device,
case FileBasicInformation:
guac_rdpdr_fs_process_set_basic_info(device, input_stream,
file_id, completion_id);
file_id, completion_id, length);
break;
case FileEndOfFileInformation:
guac_rdpdr_fs_process_set_end_of_file_info(device, input_stream,
file_id, completion_id);
file_id, completion_id, length);
break;
case FileDispositionInformation:
guac_rdpdr_fs_process_set_disposition_info(device, input_stream,
file_id, completion_id);
file_id, completion_id, length);
break;
case FileRenameInformation:
guac_rdpdr_fs_process_set_rename_info(device, input_stream,
file_id, completion_id);
file_id, completion_id, length);
break;
case FileAllocationInformation:
guac_rdpdr_fs_process_set_allocation_info(device, input_stream,
file_id, completion_id);
file_id, completion_id, length);
break;
default:

View File

@ -130,35 +130,63 @@ void guac_rdpdr_fs_process_query_attribute_tag_info(guac_rdpdr_device* device, w
}
void guac_rdpdr_fs_process_set_rename_info(guac_rdpdr_device* device,
wStream* input_stream, int file_id, int completion_id) {
wStream* input_stream, int file_id, int completion_id, int length) {
/* STUB */
guac_client_log_error(device->rdpdr->client,
"Unimplemented stub: %s", __func__);
}
void guac_rdpdr_fs_process_set_allocation_info(guac_rdpdr_device* device,
wStream* input_stream, int file_id, int completion_id) {
/* STUB */
guac_client_log_error(device->rdpdr->client,
"Unimplemented stub: %s", __func__);
wStream* input_stream, int file_id, int completion_id, int length) {
wStream* output_stream = Stream_New(NULL, 60);
/* Write header */
Stream_Write_UINT16(output_stream, RDPDR_CTYP_CORE);
Stream_Write_UINT16(output_stream, PAKID_CORE_DEVICE_IOCOMPLETION);
/* Write content */
Stream_Write_UINT32(output_stream, device->device_id);
Stream_Write_UINT32(output_stream, completion_id);
Stream_Write_UINT32(output_stream, STATUS_SUCCESS);
/* No content for now */
Stream_Write_UINT32(output_stream, length);
svc_plugin_send((rdpSvcPlugin*) device->rdpdr, output_stream);
}
void guac_rdpdr_fs_process_set_disposition_info(guac_rdpdr_device* device,
wStream* input_stream, int file_id, int completion_id) {
wStream* input_stream, int file_id, int completion_id, int length) {
/* STUB */
guac_client_log_error(device->rdpdr->client,
"Unimplemented stub: %s", __func__);
}
void guac_rdpdr_fs_process_set_end_of_file_info(guac_rdpdr_device* device,
wStream* input_stream, int file_id, int completion_id) {
/* STUB */
guac_client_log_error(device->rdpdr->client,
"Unimplemented stub: %s", __func__);
wStream* input_stream, int file_id, int completion_id, int length) {
wStream* output_stream = Stream_New(NULL, 60);
/* Write header */
Stream_Write_UINT16(output_stream, RDPDR_CTYP_CORE);
Stream_Write_UINT16(output_stream, PAKID_CORE_DEVICE_IOCOMPLETION);
/* Write content */
Stream_Write_UINT32(output_stream, device->device_id);
Stream_Write_UINT32(output_stream, completion_id);
Stream_Write_UINT32(output_stream, STATUS_SUCCESS);
/* No content for now */
Stream_Write_UINT32(output_stream, length);
svc_plugin_send((rdpSvcPlugin*) device->rdpdr, output_stream);
}
void guac_rdpdr_fs_process_set_basic_info(guac_rdpdr_device* device,
wStream* input_stream, int file_id, int completion_id) {
wStream* input_stream, int file_id, int completion_id, int length) {
/* STUB */
guac_client_log_error(device->rdpdr->client,
"Unimplemented stub: %s", __func__);

View File

@ -81,21 +81,21 @@ void guac_rdpdr_fs_process_query_attribute_tag_info(guac_rdpdr_device* device,
* this operation is used to rename a file.
*/
void guac_rdpdr_fs_process_set_rename_info(guac_rdpdr_device* device,
wStream* input_stream, int file_id, int completion_id);
wStream* input_stream, int file_id, int completion_id, int length);
/**
* Process a set operation for FileAllocationInformation. From the
* documentation, this operation is used to set a file's allocation size.
*/
void guac_rdpdr_fs_process_set_allocation_info(guac_rdpdr_device* device,
wStream* input_stream, int file_id, int completion_id);
wStream* input_stream, int file_id, int completion_id, int length);
/**
* Process a set operation for FileDispositionInformation. From the
* documentation, this operation is used to mark a file for deletion.
*/
void guac_rdpdr_fs_process_set_disposition_info(guac_rdpdr_device* device,
wStream* input_stream, int file_id, int completion_id);
wStream* input_stream, int file_id, int completion_id, int length);
/**
* Process a set operation for FileEndOfFileInformation. From the
@ -103,7 +103,7 @@ void guac_rdpdr_fs_process_set_disposition_info(guac_rdpdr_device* device,
* a file."
*/
void guac_rdpdr_fs_process_set_end_of_file_info(guac_rdpdr_device* device,
wStream* input_stream, int file_id, int completion_id);
wStream* input_stream, int file_id, int completion_id, int length);
/**
* Process a set operation for FileBasicInformation. From the documentation,
@ -111,6 +111,6 @@ void guac_rdpdr_fs_process_set_end_of_file_info(guac_rdpdr_device* device,
* access, last write, and change, in addition to file attributes."
*/
void guac_rdpdr_fs_process_set_basic_info(guac_rdpdr_device* device,
wStream* input_stream, int file_id, int completion_id);
wStream* input_stream, int file_id, int completion_id, int length);
#endif