Commit Graph

5401 Commits

Author SHA1 Message Date
Michael Stefaniuc 636d398c7d ntdll: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 09:37:42 +01:00
Michael Stefaniuc 4da4e98a7a ntdll: Use wide-char string literals in version.c.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 09:37:12 +01:00
Michael Stefaniuc 3b4239351a ntdll: Use wide-char string literals in actctx.c.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 09:37:00 +01:00
Michael Stefaniuc cdf1b61a47 ntdll: Print the correct debug string and not a random global variable.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 09:36:14 +01:00
Akihiro Sagawa 22612bcff5 ntdll: Add a timezone mapping rule for North Korea Standard Time.
Otherwise, another UTC+9 timezone matches to the timezone.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50213
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 13:43:07 +01:00
Daniel Lehman bd02a82d9c ntdll: Handle 64-bit addresses in +seh traces on x64.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 13:15:31 +01:00
Damjan Jovanovic 6d829f2baf ntdll: Fix backward compatibility for struct link_map on FreeBSD.
Checking for the _rtld_version_laddr_offset symbol only works when
header and library versions match. Checking for the offset of l_addr
instead lets us use the older header with the new library too.

Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 22:18:20 +01:00
Francois Gouget dcdd98f5c1 ntdll/tests: Don't check the load address in the WoW64 case.
It could sometimes be NULL, such as win32k.sys on Win <= 7.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 21:36:12 +01:00
Rémi Bernon 141c55a72d ntdll: Initialize local variable (valgrind).
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 19:01:56 +01:00
Alexandre Julliard 4e6c1dff58 ntdll: Avoid closing an invalid handle on process creation failure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-27 15:57:07 +01:00
Paul Gofman 44e135a7bd ntdll/tests: Test noname named pipe uniqueness.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Paul Gofman 1f3064c5d5 server: Allow client pipe creation with server pipe as root directory.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Paul Gofman aa5c1e871b server: Return STATUS_OBJECT_PATH_INVALID for noname pipe name query.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Paul Gofman a2ffa8ef7e server: Allow named pipes creation with device file as root directory.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Paul Gofman ae106feed2 server: Do not dereference symlinks specified as root directory.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Alexandre Julliard ce5e1c12c3 ntdll/tests: Fix a trace format on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Alexandre Julliard baec5f1eca ntdll: Store the syscall dispatcher also in the WOW32Reserved TEB field.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Alexandre Julliard b636f9816f krnl386: Move the 16-bit stack out of the WOW32Reserved field.
Based on a patch by Sebastian Lackner.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Rémi Bernon 97825b9c53 ntdll: Return failure from RtlQueryProcessDebugInformation.
Some DRM call it with GetCurrentThreadId(), although they don't seem to
mind about the result.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Rémi Bernon e0a1bdf2bc server: Return STATUS_INVALID_CID from NtOpenProcess.
When appropriate, instead of STATUS_INVALID_PARAMETER.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Rémi Bernon 3326c578f3 ntdll/tests: Add tests for NtOpenProcess return status.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Alexandre Julliard 043489456c ntdll: Make x86_64 syscall thunks position independent.
Based on a patch by Paul Gofman.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-25 21:39:19 +01:00
Erich E. Hoover 773b97bb2b ntdll: Fix converting large 32-bit time_t when time_t is signed.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-24 22:09:30 +01:00
Alexandre Julliard 9dc2892785 include: Use proper dllimports for kernel32 functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-24 18:41:13 +01:00
Kevin Puetz 029ec25e54 ntdll: Don't access empty IMAGE_FILE_IMPORT_DIRECTORY.
Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-24 16:53:52 +01:00
Zebediah Figura 74ec9773dd ntdll: Use a dynamically allocated buffer in find_forwarded_export() if necessary.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50105
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-23 21:05:04 +01:00
Rémi Bernon 255270373e ntdll: Raise debug exceptions when invalid heap is destroyed.
And when PEB->BeingDebugged is set to 1. Lords Of The Fallen anti-tamper
does this and only continues if a DBG_PRINTEXCEPTION_C is received.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Rémi Bernon c5129d6fc0 ntdll: Reimplement DbgPrint* using DBG_PRINTEXCEPTION_C.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Rémi Bernon 1425363bbd ntdll/tests: Add tests for DbgPrint* functions.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Rémi Bernon ad24187de8 ntdll: Stub ThreadEnableAlignmentFaultFixup info class.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46216
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Paul Gofman 03cebb22d8 ntdll: Fix SMT CPU flag reporting.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Paul Gofman 2002aa15f4 ntdll: Avoid overwriting parameters with context in call_user_apc_dispatcher() on x86.
Fixes crash in 32 bit kernel32 file test. The crash is not always reproducible
as the issue depends on stack layout.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 21:16:43 +01:00
David Torok 74f95d9ff2 ntdll: Add NtDebugActiveProcess stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47198
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 21:06:18 +01:00
Damjan Jovanovic 2f90b17ab2 ntdll: Document a few other filesystem case-sensitivity cases.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic eba4f333b9 ntdll: Treat smbfs as case-insensitive on FreeBSD.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic 9ba13fbca6 ntdll: Msdosfs was case-insensitive since FreeBSD 8 or even earlier.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic d1c8611886 ntdll: FAT filesystems are called "msdosfs" on FreeBSD >= 5.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic 4e6621f3a6 ntdll: Fix wrong return values in get_dir_case_sensitivity_stat().
It should be returning TRUE (= case sensitive) on failure as case
sensitive is the safe assumption, but some returns are FALSE on
failure and even TRUE when case insensitive. Fix that.

Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic bf8da00ee0 ntdll: Improve character device type detection on FreeBSD and macOS.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 20:15:11 +01:00
Damjan Jovanovic a563f584f5 ntdll: Implement get_thread_times() on FreeBSD.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 20:15:11 +01:00
Brendan Shanks f40195cd92 dbghelp: Use PEB->CloudFileFlags instead of PEB->Reserved for debug base address.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50077
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 22:06:52 +01:00
Zebediah Figura ebd92b980a ntdll: Semi-stub SystemModuleInformationEx.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45666
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 09:51:32 +01:00
Zebediah Figura bf9235aa56 ntdll/tests: Add more tests for SystemModuleInformation[Ex].
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 09:51:27 +01:00
Zebediah Figura 6257da8b42 ntdll: Don't check "info" for NULL in NtQuerySystemInformation(SystemModuleInformation).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 09:51:25 +01:00
Myah Caron d453db5ba2 ntdll: Stub NtAllocateVirtualMemoryEx.
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 20:34:19 +01:00
Zebediah Figura ab1469597a ntdll: Stub NtQuerySystemInformation(SystemExtendedProcessInformation).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46870
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 20:27:44 +01:00
Joachim Priesner e533a26dcf ntdll: Fix read buffer overflow in find_file_in_dir().
Signed-off-by: Joachim Priesner <joachim.priesner@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:03 +02:00
Paul Gofman 36dcb69651 ntdll: Fix xmm registers copy offset in call_consolidate_callback() on x86_64.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50010
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:03 +02:00
Nikolay Sivov d3ce5fff85 ntdll/actctx: Handle empty <dependency> element.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:01 +02:00
Alexandre Julliard 54c31d5332 ntdll: Make NtGetNlsSectionPtr() into a proper Nt syscall.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:01 +02:00