Milestone 5: deliver embedded RDP sessions and lifecycle hardening
This commit is contained in:
22
third_party/FreeRDP/channels/drive/CMakeLists.txt
vendored
Normal file
22
third_party/FreeRDP/channels/drive/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# FreeRDP cmake build script
|
||||
#
|
||||
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
define_channel("drive")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
endif()
|
||||
20
third_party/FreeRDP/channels/drive/ChannelOptions.cmake
vendored
Normal file
20
third_party/FreeRDP/channels/drive/ChannelOptions.cmake
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
set(OPTION_DEFAULT ON)
|
||||
set(OPTION_CLIENT_DEFAULT ON)
|
||||
set(OPTION_SERVER_DEFAULT OFF)
|
||||
|
||||
define_channel_options(
|
||||
NAME
|
||||
"drive"
|
||||
TYPE
|
||||
"device"
|
||||
DESCRIPTION
|
||||
"Drive Redirection Virtual Channel Extension"
|
||||
SPECIFICATIONS
|
||||
"[MS-RDPEFS]"
|
||||
DEFAULT
|
||||
${OPTION_DEFAULT}
|
||||
CLIENT_DEFAULT
|
||||
${OPTION_CLIENT_DEFAULT}
|
||||
SERVER_DEFAULT
|
||||
${OPTION_SERVER_DEFAULT}
|
||||
)
|
||||
23
third_party/FreeRDP/channels/drive/client/CMakeLists.txt
vendored
Normal file
23
third_party/FreeRDP/channels/drive/client/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# FreeRDP cmake build script
|
||||
#
|
||||
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
define_channel_client("drive")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS drive_file.c drive_file.h drive_main.c)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS winpr freerdp)
|
||||
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DeviceServiceEntry")
|
||||
1087
third_party/FreeRDP/channels/drive/client/drive_file.c
vendored
Normal file
1087
third_party/FreeRDP/channels/drive/client/drive_file.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
84
third_party/FreeRDP/channels/drive/client/drive_file.h
vendored
Normal file
84
third_party/FreeRDP/channels/drive/client/drive_file.h
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* File System Virtual Channel
|
||||
*
|
||||
* Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
* Copyright 2010-2011 Vic Lee
|
||||
* Copyright 2012 Gerald Richter
|
||||
* Copyright 2015 Thincast Technologies GmbH
|
||||
* Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
|
||||
* Copyright 2016 Inuvika Inc.
|
||||
* Copyright 2016 David PHAM-VAN <d.phamvan@inuvika.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_CHANNEL_DRIVE_CLIENT_FILE_H
|
||||
#define FREERDP_CHANNEL_DRIVE_CLIENT_FILE_H
|
||||
|
||||
#include <winpr/stream.h>
|
||||
#include <winpr/file.h>
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/channels/log.h>
|
||||
|
||||
#define TAG CHANNELS_TAG("drive.client")
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT32 id;
|
||||
BOOL is_dir;
|
||||
HANDLE file_handle;
|
||||
HANDLE find_handle;
|
||||
WIN32_FIND_DATAW find_data;
|
||||
const WCHAR* basepath;
|
||||
WCHAR* fullpath;
|
||||
BOOL delete_pending;
|
||||
UINT32 FileAttributes;
|
||||
UINT32 SharedAccess;
|
||||
UINT32 DesiredAccess;
|
||||
UINT32 CreateDisposition;
|
||||
UINT32 CreateOptions;
|
||||
} DRIVE_FILE;
|
||||
|
||||
FREERDP_LOCAL BOOL drive_file_free(DRIVE_FILE* file);
|
||||
|
||||
WINPR_ATTR_MALLOC(drive_file_free, 1)
|
||||
WINPR_ATTR_NODISCARD FREERDP_LOCAL DRIVE_FILE*
|
||||
drive_file_new(const WCHAR* base_path, const WCHAR* path, UINT32 PathWCharLength, UINT32 id,
|
||||
UINT32 DesiredAccess, UINT32 CreateDisposition, UINT32 CreateOptions,
|
||||
UINT32 FileAttributes, UINT32 SharedAccess);
|
||||
|
||||
WINPR_ATTR_NODISCARD FREERDP_LOCAL BOOL drive_file_open(DRIVE_FILE* file);
|
||||
|
||||
WINPR_ATTR_NODISCARD FREERDP_LOCAL BOOL drive_file_seek(DRIVE_FILE* file, UINT64 Offset);
|
||||
|
||||
WINPR_ATTR_NODISCARD FREERDP_LOCAL BOOL drive_file_read(DRIVE_FILE* file, BYTE* buffer,
|
||||
UINT32* Length);
|
||||
|
||||
WINPR_ATTR_NODISCARD FREERDP_LOCAL BOOL drive_file_write(DRIVE_FILE* file, const BYTE* buffer,
|
||||
UINT32 Length);
|
||||
|
||||
WINPR_ATTR_NODISCARD FREERDP_LOCAL BOOL drive_file_query_information(DRIVE_FILE* file,
|
||||
UINT32 FsInformationClass,
|
||||
wStream* output);
|
||||
|
||||
WINPR_ATTR_NODISCARD FREERDP_LOCAL BOOL drive_file_set_information(DRIVE_FILE* file,
|
||||
UINT32 FsInformationClass,
|
||||
UINT32 Length, wStream* input);
|
||||
|
||||
WINPR_ATTR_NODISCARD FREERDP_LOCAL BOOL
|
||||
drive_file_query_directory(DRIVE_FILE* file, UINT32 FsInformationClass, BYTE InitialQuery,
|
||||
const WCHAR* path, UINT32 PathWCharLength, wStream* output);
|
||||
|
||||
#endif /* FREERDP_CHANNEL_DRIVE_FILE_H */
|
||||
1184
third_party/FreeRDP/channels/drive/client/drive_main.c
vendored
Normal file
1184
third_party/FreeRDP/channels/drive/client/drive_main.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user