Commit Graph

4136 Commits

Author SHA1 Message Date
Gijs Vermeulen 7de2754cc6 ntdll/tests: Add Nt[WaitFor|Release]KeyedEvent test with NULL handle.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44620
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-27 09:33:25 +02:00
Gabriel Ivăncescu 3acc0b0968 ntdll: Properly set the current directory for UNC paths.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37834
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 10:28:28 +02:00
Zebediah Figura d683d243f7 ntdll: Also accept \??\ as a global namespace prefix in RtlDosPathNameToNtPathName_U().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45654
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 10:06:45 +02:00
Zebediah Figura 8c7e141bb1 ntdll/tests: Add more tests for RtlDosPathNameToNtPathName_U().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 10:06:43 +02:00
Zebediah Figura bbafba6d58 ntdll/tests: Add more tests for RtlGetFullPathName_U().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 10:06:41 +02:00
Zebediah Figura ee5c46a55c ntdll: Also accept \\? as a UNC or device path in RtlDetermineDosPathNameType_U().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 10:05:19 +02:00
Francois Gouget f466fb4e53 ntdll/tests: Spelling fixes in comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 20:01:56 +02:00
Chip Davis e6c6874ec3 ntdll: When an exception happens in DllMain(), print the code.
Also print exceptions from TLS callbacks.
Useful for debugging exceptions that prevent DLLs from loading.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-21 23:02:30 +02:00
Jacek Caban d4e0f0a12f server: Require FILE_READ_ATTRIBUTES access in get_named_pipe_info.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-21 23:02:30 +02:00
Jacek Caban 58233b47e0 kernel32: Always create file with FILE_READ_ATTRIBUTES access in CreateFile.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-21 23:02:28 +02:00
Jacek Caban 8db78eccab ntdll: Allow FileAccessInformation to be queried on files without fds.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-21 10:43:29 +02:00
Jacek Caban 290320a8fe server: Use pipe_end state in FSCTL_PIPE_LISTEN implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 18:47:00 +02:00
Fabian Maurer 754ee56644 ntdll: Add stub for NtCreateLowBoxToken.
This is required by chromium x64 sandbox >=win8.
Chrome for some reason is not affected.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45646
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 16:52:10 +02:00
Jacek Caban 3375ccba2f server: Use pipe stored in pipe_end in get_named_pipe_info.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 15:27:50 +02:00
Jacek Caban c0905e08da server: Use common implementation for pipe client and server get_sd and set_sd.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 15:27:40 +02:00
Jacek Caban 59dd8baeac ntdll/tests: Add more NtQueryInformationFile tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 15:24:52 +02:00
Jacek Caban 32169eafe2 server: Allow pipe server fd caching throughout its whole lifetime.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:07 +02:00
Jacek Caban 584ffc2341 server: Don't use set_no_fd_status for error handling in pipe objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:07 +02:00
Jacek Caban 41e39c6a63 server: Improve FSCTL_PIPE_TRANSCEIVE error handling.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:07 +02:00
Jacek Caban 7038b9ef15 server: Improve named pipe write error handling.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:07 +02:00
Jacek Caban 91852564dc server: Improve named pipe read error handling.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:07 +02:00
Jacek Caban 0973b8d2c3 server: Improve FSCTL_PIPE_PEEK error handling.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:07 +02:00
Jacek Caban 8e5bc0daf7 server: Store pipe state in pipe_end struct and return it in FSCTL_PIPE_PEEK.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:07 +02:00
Jacek Caban 5efd706c22 ntdll/tests: Add pipe state tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:07 +02:00
Dmitry Timoshkov 7def0f200f ntdll: Don't allow blocking on a critical section during process termination.
As a result HeapLock() no longer blocks process termination since underlying
implementation uses a critical section. However this should be considered as
a minor side effect because applications shouldn't depend on this behaviour.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 13:55:55 +02:00
Michael Stefaniuc 10f23ddb58 ntdll: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:15:59 +02:00
Michael Stefaniuc 9f7d802341 ntdll/tests: Avoid temp variables holding ARRAY_SIZE results.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-17 22:36:27 +02:00
Johannes Brandstätter ec418e7f55 ntdll: Check for NULL context in NtGetContextThread.
Crash Bandicoot N. Sane Trilogy calls NtGetContextThread
with the context being set to NULL which leads to a crash.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45428
Signed-off-by: Johannes Brandstätter <jbrandst@2ds.eu>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-12 13:35:13 +02:00
Alex Henrie 2c9308e7d5 ntdll: Return chassis info from NtQuerySystemInformation on Linux.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-12 12:57:54 +02:00
Alex Henrie 5008779665 ntdll: Return board info from NtQuerySystemInformation on Linux.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-12 12:57:54 +02:00
Alex Henrie a52c7c962a ntdll: Return system info from NtQuerySystemInformation on Linux.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-12 12:57:54 +02:00
Alex Henrie 28e8e9a164 ntdll: Return BIOS info from NtQuerySystemInformation on Linux.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-12 12:57:53 +02:00
Alex Henrie 0bcee5eaf8 ntdll/tests: Add SystemFirmwareTableInformation tests.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-12 12:57:53 +02:00
Mark Jansen 5ae2b885e7 ntdll/tests: Add tests for RtlIpv6AddressToString and RtlIpv6AddressToStringEx.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-11 15:45:11 +02:00
Mark Jansen bf6d38258e ntdll/tests: Tests for RtlIpv4StringToAddressEx.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-11 15:45:11 +02:00
Michał Janiszewski 3d5d8903b8 ntdll: Prevent Find{Set, Clear}Run from reading past the end of bitmap.
This can be happen in sample arrays (hex):
FindSetRun:   00 00 00 00 00 00 00 ff
FindClearRun: ff ff ff ff ff ff ff 00

Signed-off-by: Michał Janiszewski <janisozaur@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-10 22:09:32 +02:00
Michał Janiszewski 961061419a ntdll/tests: Add RtlFindNextForwardRun{Set, Clear} tests.
The tests in particular should trigger an edge case in implementation.

Signed-off-by: Michał Janiszewski <janisozaur@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-10 22:09:25 +02:00
Mark Jansen 1b1e3476b8 ntdll/tests: Tests for RtlIpv6StringToAddressEx.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-10 11:11:41 +02:00
Mark Jansen 4ad6e1b084 ntdll/tests: Tests for RtlIpv6StringToAddress.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-09 13:37:13 +02:00
Huw Davies 986d5a9958 ntdll/tests: Skip the map protect tests if we can't disable no-exec.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-09 13:35:04 +02:00
Michał Janiszewski a1ed500836 ntdll: Only set owned bits in RTL_BITMAP.
Signed-off-by: Michał Janiszewski <janisozaur@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-03 11:22:26 +02:00
Michael Müller 4c13e1765f ntdll: Implement LdrRegisterDllNotification and LdrUnregisterDllNotification.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-27 10:58:51 +02:00
Roderick Colenbrander 837cb92e0c ntdll: GetLogicalProcessorInformation report LPT_PC_SMT for SMT cores.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-22 12:53:24 +02:00
Roderick Colenbrander 13bd1b9f75 ntdll: GetLogicalProcessorInformationEx report LTP_PC_SMT for SMT cores.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-22 12:53:24 +02:00
Roderick Colenbrander 1312c66428 ntdll: Report physical cores once with proper thread mask.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-22 12:53:24 +02:00
Roderick Colenbrander c6a71b91c5 ntdll: Store core information by core on macOS.
The id parameter can be used for core / package lookup. On Linux
we pass package or core values. On Mac, we use package for both.
Use a core identifier on Mac as well.

Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-22 12:53:24 +02:00
Roderick Colenbrander 0fd6556ed2 ntdll: Derive number of logical CPU cores from core mask.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-22 12:53:24 +02:00
Michael Stefaniuc 9ef8fa2a0b ntdll/tests: Avoid ARRAY_SIZE-like macros.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-22 01:01:55 +02:00
Michael Stefaniuc 3400da025e ntdll/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-22 01:01:55 +02:00
Alexandre Julliard 9c57e23d9b ntdll: Implement RtlExpandEnvironmentStrings().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-21 14:20:57 +02:00