[PATCH 0/1] MR2371: ntdll: Update system_path to search for .sys files
vgk.sys from Valorant wants to load cng.sys. But it fails. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2371
From: Tareque Md Hanif <tarequemd.hanif(a)yahoo.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 f05cd1b4fd9..d02b4668fe4 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -85,7 +85,7 @@ const WCHAR windows_dir[] = L"C:\\windows"; const WCHAR system_dir[] = L"C:\\windows\\system32\\"; /* system search path */ -static const WCHAR system_path[] = L"C:\\windows\\system32;C:\\windows\\system;C:\\windows"; +static const WCHAR system_path[] = L"C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows"; static BOOL is_prefix_bootstrap; /* are we bootstrapping the prefix? */ static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2371
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details: The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=130501 Your paranoid android. === debian11 (32 bit report) === kernel32: path.c:2438: Test failed: got L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0" expected L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0" path.c:2446: Test failed: got L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" expected L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" path.c:2456: Test failed: got L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" expected L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" path.c:2487: Test failed: got L"C:\\users\\winetest\\Temp\\wct;.;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0" expected L"C:\\users\\winetest\\Temp\\wct;.;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0" path.c:2494: Test failed: got L"C:\\users\\winetest\\Temp\\wct;.;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0" expected L"C:\\users\\winetest\\Temp\\wct;.;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0" path.c:2503: Test failed: got L"C:\\users\\winetest\\Temp\\wct;.;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0" expected L"C:\\users\\winetest\\Temp\\wct;.;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0" path.c:2510: Test failed: got L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0" expected L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0" path.c:2518: Test failed: got L"C:\\users\\winetest\\Temp\\wct;.;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;foo" expected L"C:\\users\\winetest\\Temp\\wct;.;C:\\windows\\system32;C:\\windows\\system;C:\\windows;foo" path.c:2528: Test failed: got L"C:\\users\\winetest\\Temp\\wct;.;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;foo" expected L"C:\\users\\winetest\\Temp\\wct;.;C:\\windows\\system32;C:\\windows\\system;C:\\windows;foo" path.c:2558: Test failed: got L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0" expected L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0" path.c:2566: Test failed: got L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" expected L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" path.c:2576: Test failed: got L"C:\\users\\winetest\\Temp\\wct;C:\\;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;foo" expected L"C:\\users\\winetest\\Temp\\wct;C:\\;C:\\windows\\system32;C:\\windows\\system;C:\\windows;foo" path.c:2621: Test failed: got L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" expected L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" path.c:2628: Test failed: got L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" expected L"C:\\users\\winetest\\Temp\\wct;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" path.c:2635: Test failed: got L".\\foo;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" expected L".\\foo;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" path.c:2642: Test failed: got L"temp;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" expected L"temp;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" path.c:2649: Test failed: got L"c:\\temp;C:\\windows\\system32\\drivers;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo" expected L"c:\\temp;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;foo"
This is suspiciously similar to my own patch (which got closed) https://gitlab.winehq.org/wine/wine/-/merge_requests/842/diffs you can see the reason why the original got closed edit: I didn't see zf's comment on it whoops -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2371#note_26700
``` 01ac:trace:module:load_dll looking for L"cng.sys" in (null) 01ac:warn:module:load_dll Failed to load module L"cng.sys"; status=c0000135 01ac:err:module:import_dll Library cng.sys (which is needed by L"C:\\Program Files\\Riot Vanguard\\vgk.sys") not found ``` Function calls: `LdrInitializeThunk()` -> `import_dll()` -> `load_dll()` It doesn't call `LoadLibrary()`. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2371#note_26730
On Sat Mar 11 19:25:18 2023 +0000, Tareque Md Hanif wrote:
``` 01ac:trace:module:load_dll looking for L"cng.sys" in (null) 01ac:warn:module:load_dll Failed to load module L"cng.sys"; status=c0000135 01ac:err:module:import_dll Library cng.sys (which is needed by L"C:\\Program Files\\Riot Vanguard\\vgk.sys") not found ``` The function calls are `LdrInitializeThunk()` -> `import_dll()` -> `load_dll()`. It doesn't call `LoadLibrary()`. Do we need a `load_sys()` for this case?
if we make a new function it will (probably) fix the tests, because the system_path would remain the same -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2371#note_26736
This merge request was closed by Tareque Md Hanif. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2371
participants (4)
-
Etaash Mathamsetty (@etaash.mathamsetty) -
Marvin -
Tareque Md Hanif -
Tareque Md Hanif (@tmdh)