Commit Graph

5648 Commits

Author SHA1 Message Date
Alexandre Julliard afaf35b9e1 include: Add more SYSTEM_INFORMATION_CLASS definitions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Paul Gofman 084519a82b ntdll: Implement NtQuerySystemInformationEx(SystemCpuSetInformation).
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Alexandre Julliard c5b0dd5fc2 ntdll: Set the window title to the image name on the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 12:26:37 +02:00
Alexandre Julliard f55f0b8448 ntdll: Remove load_builtin_dll() and get_load_order() from the Unix interface.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 11:51:28 +02:00
Alexandre Julliard bb065801a6 ntdll: Map the builtin or fake dll from the Wine dirs if it's missing from the prefix.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 11:51:25 +02:00
Alexandre Julliard 4a10f3a188 ntdll: Allow using the .fake files from the build tree as PE mapping placeholders.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 10:06:44 +02:00
Alexandre Julliard a3d9c487de ntdll: Load builtin exe without a corresponding file only before the prefix is fully initialized.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 09:59:38 +02:00
Alexandre Julliard 726cf9c0eb ntdll: Make sure the argv array matches the Unicode version, even when launching start.exe.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 09:56:32 +02:00
Zebediah Figura 195c57eeb7 ntdll: Report SegDs to be identical to SegSs in x86_64 exception handlers.
Based on a patch by Dávid Török.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47970
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 22:44:35 +02:00
Zebediah Figura 10d7a804c1 ntdll/tests: Add a test for segment register contents in x86_64 exception handlers.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 22:44:35 +02:00
Alexandre Julliard b12bf4d8d8 ntdll: Unmap main image even if not loaded at base address.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50874
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 12:19:59 +02:00
Alexandre Julliard f17483b936 ntdll: Check the loadorder for .so dlls on the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:16:12 +01:00
Alexandre Julliard e8ec7a8cec ntdll: Don't pass the application name to get_load_order().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:16:12 +01:00
Alexandre Julliard 4e2bd548b1 ntdll: Make the is_win64 variable global.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 14:48:34 +01:00
Alexandre Julliard 482a26e135 ntdll: Use the same builtin check for process creation and initial image loading.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 11:38:43 +01:00
Mark Harmstone 9ea1134eea ntdll: Add error mapping for MUI statuses.
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 21:52:18 +01:00
Alexandre Julliard 9bdfb1f34a ntdll: Set the initial DllPath to null if it's empty.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 12:07:04 +01:00
Alexandre Julliard 50e33a213d ntdll: Use start /exec to support absolute Unix paths.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50858
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 11:46:01 +01:00
Alexandre Julliard aef821ccbd ntdll: Add a helper to launch start.exe always as builtin.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 11:46:01 +01:00
Alexandre Julliard 967100258f ntdll: Check the main image for Unix path only the first time around.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50858
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 11:46:01 +01:00
Alexandre Julliard 47fed8f5bc ntdll: Don't set the DllPath parameter by default.
Recent Windows versions don't set it either.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Alexandre Julliard 34884bf5d0 ntdll: Remove the no longer needed exec_process() function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Alexandre Julliard 28fe84da45 ntdll: Load the main image from the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Alexandre Julliard 662730a1bf ntdll: Set the Wow64 environment variables from the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:48 +01:00
Mark Harmstone 3fd9a423d4 ntdll: Take into account ordinal base when resolving forwarded ordinals.
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:48 +01:00
Alexandre Julliard ec5925a8a2 ntdll: Set the additional environment variables from the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 20:50:50 +01:00
Alexandre Julliard 5246f34a3e ntdll: Return an NT path for the initial current directory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 17:42:20 +01:00
Zebediah Figura d144890c88 ntdll: Hold fd_cache_section while removing and closing handles.
Otherwise, it's possible for the old handle to be re-added to the cache between
removing and closing it.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Zebediah Figura 64cfcc1c62 ntdll: Remove the source fd from the cache before calling the dup_handle request.
If another thread creates and accesses a file between the dup_handle request and
the call to remove_fd_from_cache(), the file may be allocated to the same handle
number, and that thread will then receive the wrong unix fd. Avoid this race by
invalidating the cache first.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Zebediah Figura 5df0f5f6fb ntdll: Use a kernel APC to call NtDuplicateObject() if DUPLICATE_CLOSE_SOURCE is used on another process.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Alexandre Julliard ab8f0c3e21 ntdll: Load builtin dlls through NtMapViewOfSection().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard 49f12d65d8 ntdll: Don't return an existing address when mapping a builtin PE dll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard cb14be78ff ntdll: Move the builtin image checks to virtual_map_builtin_module().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard 24a5a10142 ntdll: Replace image mapping by the builtin module directly in NtMapViewOfSection().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard 5dcd3c1dd9 ntdll: Return the mapping size in virtual_map_builtin_module().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard 0ea5772113 ntdll: Use NtAreMappedFilesTheSame() to find duplicated module mappings.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:25 +01:00
Alexandre Julliard 20c4ae45ce ntdll: Add refcounting for .so builtin dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:58 +01:00
Alexandre Julliard 89340bb762 ntdll: Load the Unix library only when __wine_init_unix_lib() is called.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:58 +01:00
Alexandre Julliard cc9446f874 server: Don't change the reported machine for COM+ images.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50826
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-19 22:09:23 +01:00
Alexandre Julliard 74390cead3 ntdll: Add a global constant for the system directory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-19 19:55:34 +01:00
Rémi Bernon d9d478e277 ntdll/tests: Add RtlQueryPerformanceCounter tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-19 19:55:34 +01:00
Alexandre Julliard 86947587d2 server: Remove the redundant cpu field in the PE image information.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 11:49:23 +01:00
Alexandre Julliard 4ea07a30ce ntdll: Check the builtin signature when creating a module.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 11:49:23 +01:00
Rémi Bernon 4d5824112e ntdll: Don't call possibly deadly DbgUiGetThreadDebugObject.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 22:16:54 +01:00
Alexandre Julliard 5cc6035284 ntdll: Add the builtin signature in .so file mappings.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 20:36:43 +01:00
Alexandre Julliard e0fc8d7acb ntdll: Call the Unix entry point from the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 20:36:43 +01:00
Alexandre Julliard 22da5bd757 ntdll: Move the loadorder support to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 20:36:43 +01:00
Alexandre Julliard 9e38a68001 ntdll: Add a helper for mapping a PE image.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 11:01:19 +01:00
Alexandre Julliard 8824474e08 ntdll: Move the builtin dll list to virtual.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 10:58:14 +01:00
Hans Leidekker e6407c39ba ntdll: Fall back to reading /dev/urandom if getrandom() is not supported.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50168
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 10:45:59 +01:00