From: Piotr Caban piotr@codeweavers.com
--- 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 1db987be10b..6984503a2a4 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -2569,7 +2569,7 @@ static NTSTATUS get_dll_load_path_search_flags( LPCWSTR module, DWORD flags, WCH if (flags & LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR) { DWORD type = RtlDetermineDosPathNameType_U( module ); - if (type != ABSOLUTE_DRIVE_PATH && type != ABSOLUTE_PATH && type != DEVICE_PATH) + if (type != ABSOLUTE_DRIVE_PATH && type != ABSOLUTE_PATH && type != DEVICE_PATH && type != UNC_PATH) return STATUS_INVALID_PARAMETER; mod_end = get_module_path_end( module ); len += (mod_end - module) + 1;
From: Piotr Caban piotr@codeweavers.com
--- 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 6984503a2a4..21378102ebd 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -4604,7 +4604,7 @@ NTSTATUS WINAPI LdrAddDllDirectory( const UNICODE_STRING *dir, void **cookie ) struct dll_dir_entry *ptr; DOS_PATHNAME_TYPE type = RtlDetermineDosPathNameType_U( dir->Buffer );
- if (type != ABSOLUTE_PATH && type != ABSOLUTE_DRIVE_PATH) + if (type != ABSOLUTE_PATH && type != ABSOLUTE_DRIVE_PATH && type != UNC_PATH) return STATUS_INVALID_PARAMETER;
status = RtlDosPathNameToNtPathName_U_WithStatus( dir->Buffer, &nt_name, NULL, NULL );
On Mon Aug 19 17:56:38 2024 +0000, Elizabeth Figura wrote:
Is this testable?
If you're asking about adding wine tests - it's possible to write tests that will fail on Wine (the easiest way of doing it is to use default administrative shares like e.g. `\127.0.0.1\c$...`). We can't really add tests that will work with wine without implementing additional features.
If you're asking about an easy way of testing Wine manually - setup the share by creating $WINEPREFIX/dosdevices/unc/SHARE directory, put sample.dll there and call `LoadLibraryW(L"\\SHARE\sample.dll")`.
On Mon Aug 19 17:57:54 2024 +0000, Piotr Caban wrote:
If you're asking about adding wine tests - it's possible to write tests that will fail on Wine (the easiest way of doing it is to use default administrative shares like e.g. `\127.0.0.1\c$...`). We can't really add tests that will work with wine without implementing additional features. If you're asking about an easy way of testing Wine manually - setup the share by creating $WINEPREFIX/dosdevices/unc/SHARE directory, put sample.dll there and call `LoadLibraryW(L"\\SHARE\sample.dll")`.
Ah my bad, I misremembered \.\ as being a UNC path (which it technically may be, but it's DEVICE_PATH, not UNC_PATH).