Commit graph

1953 commits

Author SHA1 Message Date
Alistair Leslie-Hughes 9fd2c50434 advapi32: Remove DECLSPEC_HIDDEN usage. 2023-07-07 12:20:53 +02:00
Alexandre Julliard c8c22e1348 advapi32/tests: Avoid sizeof() in traces. 2023-07-06 20:54:30 +02:00
Zebediah Figura bf45b87a3a advapi32/tests: Add more tests for token duplication. 2023-05-08 20:02:28 +02:00
Nikolay Sivov a63612045d ntdll/tests: Add some RtlValidSecurityDescriptor() tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-05-03 16:48:45 +02:00
Francois Gouget 4abd7af2e4 advapi32/tests: Make the services resume handle traces more informative. 2023-04-13 18:00:25 +02:00
Zebediah Figura 95258873a5 advapi32: Print ReportEvent() messages one line at a time.
.NET Framework passes multiline backtraces to ReportEvent(), which get cut off when passed to debugstr_w().
2023-04-06 14:32:32 +02:00
Sven Baars da0ec7fbbd kernelbase: Recursively obtain the Wow6432Node parent. 2023-03-28 20:40:09 +02:00
Sven Baars 63c6b89314 kernelbase: Add support for shared registry keys. 2023-03-28 20:40:09 +02:00
Sven Baars 3f82f6ff59 kernelbase: Use open_key() to obtain any existing Wow6432node in create_key(). 2023-03-22 20:03:52 +01:00
Sven Baars 8b327eee5e advapi32/tests: Copy Software\Classes tests from ntdll. 2023-03-22 20:03:51 +01:00
Francois Gouget 2078afb928 advapi32/tests: Skip some tests if the EventLog service crashed.
advapi32:eventlog crashes the EventLog service in some Windows
versions so defend against that condition.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53461
2023-03-17 19:32:00 +01:00
Francois Gouget 42bd3bb79a advapi32/tests: Enumerate the services using the Unicode API.
The ANSI one is broken in some UTF-8 locales which prevents most of the
tests from running. So use the Unicode API for most tests and just
confirm that it is consistent with the ANSI one instead of doing the
reverse.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=52895
2023-03-17 19:02:10 +01:00
Francois Gouget 81e33a3484 advapi32/tests: Take into account service start / stop race conditions.
Services sometimes start or stop between two EnumServicesStatus()
calls. Fortunately this is rare so the tests can just retry to get the
expected result.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=53460
2023-03-17 19:02:08 +01:00
Francois Gouget 1da9e7c087 advapi32/tests: Better check the EnumServicesStatusExW() output.
It only has this one test.
2023-03-17 19:02:05 +01:00
Francois Gouget 3bfe315707 advapi32/tests: Separate the EnumServicesStatus() and EnumServicesStatusEx() tests. 2023-03-17 19:02:02 +01:00
Francois Gouget 7b3f804606 advapi32/tests: Better account for starting and stopping services.
The START_PENDING and STOP_PENDING services don't always have a
process id. Also trace unusual service states so we can identify which
ones behave in unexpected ways.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=53460
2023-03-17 19:02:00 +01:00
Francois Gouget eecb285841 advapi32/tests: Improve the resume handle service tests.
Fix the comments to not imply that the tests expect all services but
one to be returned.
Add a test of the needed buffer size to retrieve the remaining services
and document the limits of the test.
2023-03-17 19:01:57 +01:00
Sven Baars 88fa3459b9 kernelbase: Also call NtOpenKeyEx() on empty key names.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54691
2023-03-17 14:12:33 +01:00
Sven Baars 68920ee430 advapi32/tests: Test deleting 32-bit registry keys. 2023-03-17 14:12:33 +01:00
Francois Gouget 95f2cc0f15 advapi32/tests: Fix the RegEnumValueA() tests in UTF-8 locales.
On Windows RegEnumValueA() is buggy such that when the value name
buffer is too small, it may way overestimate the required data buffer
size, sometimes returning more than the sufficiently large buffer it was
provided, in which case that buffer is untouched and thus not
NUL-terminated.
So modify the tests to accept this broken result and avoid checking
out-of-bounds data.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=53172
2023-03-06 11:03:13 +01:00
Hans Leidekker 369e0cfae6 advapi32: Bump random buffer size.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54364
2023-01-25 18:31:03 +01:00
André Zwing e2b0cbb797 advapi32/tests: Don't test function directly when reporting GetLastError(). 2023-01-06 13:39:44 +01:00
Rémi Bernon 0204e6e33a advapi32/tests: Only free GetSecurityInfo pointer on success. 2022-12-02 11:04:45 +01:00
Alex Henrie d2ad82c87e advapi32/tests: Avoid using GCC's typeof extension. 2022-11-22 18:27:30 +01:00
Sven Baars b8d7434e33 server: Recursively obtain the Wow6432Node parent. 2022-11-18 13:55:21 +01:00
Alexandre Julliard 5965771a9c advapi32/tests: Mark some failing tests as todo. 2022-09-16 14:07:13 +02:00
Paul Gofman f527e4a694 advapi32: Add stub for PerfQueryCounterData(). 2022-09-13 12:54:54 +02:00
Paul Gofman 7e7580145d advapi32: Add stub for PerfAddCounters(). 2022-09-13 12:54:53 +02:00
Paul Gofman a5921e715c advapi32: Add stub for PerfOpenQueryHandle(). 2022-09-13 12:54:52 +02:00
Paul Gofman f83181587d advapi32: Add stub for PerfCloseQueryHandle(). 2022-09-13 12:54:51 +02:00
Santino Mazza 25dce6137d advapi32/tests: Add tests for RegLoadAppKey.
Signed-off-by: Santino Mazza <smazza@codeweavers.com>
2022-09-08 18:42:40 +02:00
Jinoh Kang 9090229e67 server: Use the token owner instead of the token user for default object owner.
Also, replace the token user with the token owner for the default DACL
as well.  Wine currently selects domain_users_sid as the token owner, so
use that.  This is required to pass the advapi32:security test which
expects the security descriptor owner SID to be referenced in the DACL
as well.
2022-07-20 22:33:44 +02:00
Jinoh Kang b735ded8c2 advapi32/tests: Test that the token default DACL uses token owner instead of token user. 2022-07-20 22:33:44 +02:00
Jinoh Kang 2eb6a25f44 advapi32/tests: Test that default object group match the token primary group. 2022-07-20 22:33:44 +02:00
Jinoh Kang 9e7e6d29f6 advapi32/tests: Test that default object owner match the token owner. 2022-07-20 22:33:44 +02:00
Jinoh Kang 67429f3ad6 advapi32/tests: Check that each ACE is ACCESS_ALLOWED_ACE in the default DACL.
To ensure type safety, without complicating the test.
2022-07-20 22:33:44 +02:00
Francois Gouget 321ec274d7 advapi32/tests: Fix the print format, LARGE_INTEGER is signed.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2022-07-18 19:43:44 +02:00
Jinoh Kang e61d4853f1 advapi32/tests: Add tests for GetTokenInformation TokenOwner. 2022-07-18 11:25:02 +02:00
Dmitry Timoshkov f2583de38d sechost: Support decimal or octal access rights in ConvertStringSecurityDescriptorToSecurityDescriptor.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-07-06 20:32:39 +02:00
Alexandre Julliard e76c07d4e7 advapi32/tests: Remove some workarounds for older Windows versions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-07-05 14:00:38 +02:00
Nikolay Sivov ebbee24c5d advapi32: Implement RegRenameKey().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-28 15:54:15 +02:00
Nikolay Sivov 440d37172d advapi32/tests: Add some tests for RegRenameKey().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-28 15:39:55 +02:00
Louis Lenders 561a5b8f84 advapi32: Fix spec entry for LookupPrivilegeDisplayName{A,W}.
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-09 20:56:39 +02:00
Alexandre Julliard dd99319cde server: Return the full token group for TokenLogonSid.
Based on a patch by Fabian Maurer.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52845
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 13:24:02 +02:00
Gijs Vermeulen d867196553 advapi32: Add GetThreadWaitChain stub.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-14 18:30:28 +01:00
Gijs Vermeulen 2a723e3efa advapi32: Add OpenThreadWaitChainSession stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52655
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-14 18:30:28 +01:00
Eric Pouech 339f4a3a70 advapi32/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-23 10:17:25 +01:00
Eric Pouech ec49488778 advapi32/tests: Don't outdent todo_wine*.
This prevents -Wmisleading-indentation warnings (Mingw GCC11).

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 18:55:22 +01:00
Eric Pouech 7e39b60a69 advapi32: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 10:45:56 +01:00
André Zwing e6a2bb3432 advapi32: Fix some spec file entries.
Signed-off-by: André Zwing <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 18:38:54 +01:00