[PATCH 0/1] MR9917: ntdll: Accept device paths in LdrAddDllDirectory.
This is needed to allow running Template Haskell inside Wine when cross-compiling as GHC uses device paths nowadays. Upstreaming from https://github.com/input-output-hk/haskell.nix/pull/2034/commits/44f2822afdb... Similar to https://gitlab.winehq.org/wine/wine/-/merge_requests/6308 but only for AddDll as the GetDll part seems to already allow `RtlPathTypeLocalDevice` (old `DEVICE_PATH`). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9917
From: Alexandre Esteves <alexfmpe@proton.me> --- dlls/ntdll/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 61cc9e1e112..ac42ba7c24c 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -4727,7 +4727,7 @@ NTSTATUS WINAPI LdrAddDllDirectory( const UNICODE_STRING *dir, void **cookie ) struct dll_dir_entry *ptr; RTL_PATH_TYPE type = RtlDetermineDosPathNameType_U( dir->Buffer ); - if (type != RtlPathTypeRooted && type != RtlPathTypeDriveAbsolute && type != RtlPathTypeUncAbsolute) + if (type != RtlPathTypeRooted && type != RtlPathTypeDriveAbsolute && type != RtlPathTypeUncAbsolute && type != RtlPathTypeLocalDevice) return STATUS_INVALID_PARAMETER; status = RtlDosPathNameToNtPathName_U_WithStatus( dir->Buffer, &nt_name, NULL, NULL ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9917
Please add a test case in dlls/kernel32/tests/module.c:test_AddDllDirectory. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9917#note_127345
participants (3)
-
Alexandre Esteves -
Alexandre Esteves (@alexfmpe) -
Alexandre Julliard (@julliard)