mirror of
https://github.com/Devolutions/IronRDP.git
synced 2026-11-25 17:52:28 +00:00
fix(rdpdr): restore rebased factory source
Restore the portable factory contract and registry-backed Windows backend lifecycle required by the retained host-integration source after #1590 was squash-merged. This preserves the merged filesystem dispatch behavior while making the extraction reference compile and retain multi-drive state. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,6 @@ use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
use ironrdp_core as _;
|
||||
use ironrdp_pdu as _;
|
||||
use ironrdp_rdpdr::{RdpdrBackend, backend::RdpdrBackendFactory};
|
||||
use ironrdp_rdpdr::pdu::efs::{
|
||||
AnyIoCtlCode, CreateDisposition, CreateOptions, DecodedDeviceControlRequest, DesiredAccess, DeviceCloseRequest,
|
||||
DeviceControlRequest, DeviceCreateRequest, DeviceFlushBuffersRequest, DeviceIoRequest, DeviceReadRequest,
|
||||
@@ -16,6 +15,7 @@ use ironrdp_rdpdr::pdu::efs::{
|
||||
ServerDriveQueryVolumeInformationRequest, ServerDriveSetInformationRequest, ServerDriveSetSecurityRequest,
|
||||
SharedAccess,
|
||||
};
|
||||
use ironrdp_rdpdr::{RdpdrBackend, backend::RdpdrBackendFactory};
|
||||
use ironrdp_rdpdr_native::{RedirectedDrive, WindowsRdpdrBackendFactory};
|
||||
use ironrdp_svc::SvcMessage;
|
||||
use tracing as _;
|
||||
@@ -577,9 +577,9 @@ impl Fixture {
|
||||
}
|
||||
|
||||
fn backend_with_read_only(&self, read_only: bool) -> Box<dyn RdpdrBackend> {
|
||||
WindowsRdpdrBackendFactory::new(
|
||||
vec![RedirectedDrive::new(1, "Test", &self.volume_root, read_only).expect("valid test drive")],
|
||||
)
|
||||
WindowsRdpdrBackendFactory::new(vec![
|
||||
RedirectedDrive::new(1, "Test", &self.volume_root, read_only).expect("valid test drive"),
|
||||
])
|
||||
.expect("unique test drive ID")
|
||||
.with_initial_device_ids([])
|
||||
.build_rdpdr_backend()
|
||||
|
||||
@@ -162,7 +162,6 @@ impl RdpdrBackendProduct {
|
||||
initial_drives,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the filesystem devices announced when the server accepts RDPDR.
|
||||
pub fn initial_drives(&self) -> &[RdpdrDrive] {
|
||||
&self.initial_drives
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
use ironrdp_core::impl_as_any;
|
||||
use ironrdp_pdu::{PduResult, pdu_other_err};
|
||||
use ironrdp_svc::SvcMessage;
|
||||
|
||||
use super::RdpdrBackend;
|
||||
use crate::pdu::efs::{DeviceControlRequest, ServerDeviceAnnounceResponse};
|
||||
use crate::pdu::esc::{ScardCall, ScardIoCtlCode};
|
||||
use ironrdp_core::impl_as_any;
|
||||
use ironrdp_pdu::PduResult;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct NoopRdpdrBackend;
|
||||
@@ -16,4 +18,9 @@ impl RdpdrBackend for NoopRdpdrBackend {
|
||||
fn handle_scard_call(&mut self, _req: DeviceControlRequest<ScardIoCtlCode>, _call: ScardCall) -> PduResult<()> {
|
||||
Ok(())
|
||||
}
|
||||
fn handle_drive_io_request(&mut self, _req: crate::pdu::efs::ServerDriveIoRequest) -> PduResult<Vec<SvcMessage>> {
|
||||
Err(pdu_other_err!(
|
||||
"filesystem I/O is not supported by the noop RDPDR backend"
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user