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:
Marc-André Moreau
2026-08-09 09:11:38 -04:00
parent 57471f3302
commit f582e7df60
3 changed files with 13 additions and 7 deletions
@@ -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()
-1
View File
@@ -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
+9 -2
View File
@@ -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"
))
}
}