Commit Graph

1834 Commits

Author SHA1 Message Date
Dmitry Timoshkov de679af492 advapi32/tests: Add QueryServiceStatusEx test for the EventLog service.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:59:05 +02:00
Dmitry Timoshkov 7e7e81f0c6 wevtsvc: Add EventLog service stub.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 17:03:57 +02:00
Zebediah Figura fa1b0fcf6c server: Check duplicated handle access against the calling thread token and target process token.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:22:36 +02:00
Michael Müller d0bea3d702 server: Implement support for creating a process with a specified token.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:21:43 +02:00
Zebediah Figura d694928ec2 advapi32/tests: Add basic tests for CreateProcessAsUser().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:18:29 +02:00
Zebediah Figura 6946d78ed9 kernelbase: Implement CreateRestrictedToken().
Based on a patch by Michael Müller.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 15:58:45 +02:00
Zebediah Figura 67f7d6872b advapi32/tests: Add more tests for CreateRestrictedToken().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 15:46:48 +02:00
Zebediah Figura 965ebac6c1 advapi32/tests: Test which tokens DuplicateHandle() validates access against.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 15:46:46 +02:00
Michael Stefaniuc d6c4efec1a advapi32: Remove superfluous cast to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 21:45:37 +02:00
Hans Leidekker 53d956700a advapi32: Use wide character string literals.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-10 22:06:39 +02:00
Alexandre Julliard c487f21b6b advapi32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:31 +02:00
Hans Leidekker e9090e1c90 advapi32: Reimplement SystemFunction036 using system interrupt information.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:31 +02:00
Hans Leidekker 66baf15352 advapi32: Enumerate host credentials through mountmgr.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 15:47:27 +02:00
Hans Leidekker f69b9e2446 advapi32: Delete host credentials through mountmgr.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 17:21:44 +02:00
Hans Leidekker 98a3986c7d advapi32: Write host credentials through mountmgr.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 17:21:44 +02:00
Hans Leidekker faef38479c advapi32: Read host credentials through mountmgr.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:03 +02:00
Shawn M. Chapla 1e8cfc016e advapi32: Add RegRenameKey stub.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-02 10:58:12 +02:00
Alex Henrie e5819ebe37 advapi32: Add RegEnableReflectionKey stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49358
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 16:53:39 +02:00
Vladimir Panteleev 7ad5e1bc8a kernelbase: Preserve last error when GetEnvironmentVariableA succeeds.
Avoid clobbering last error with NO_ERROR when GetEnvironmentVariableA
succeeds, matching the behavior of GetEnvironmentVariableW and
Windows.

Instead of naively saving and restoring the last error, call
RtlQueryEnvironmentVariable_U directly to avoid unnecessarily setting
it in the first place.

Signed-off-by: Vladimir Panteleev <git@vladimir.panteleev.md>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00
Gijs Vermeulen 3c1edaaae5 advapi32: Set last error directly in GetUserName.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00
Zebediah Figura a67af66aea advapi32: Move string SID/SD conversion functions to sechost.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-02 13:54:41 +02:00
Zebediah Figura 9a4bf42e4b advapi32: Move service functions into sechost.
Based on a patch by Micah N Gorrell.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-29 10:25:08 +02:00
Zebediah Figura d01f58a3f2 advapi32: Reimplement EnumServicesStatusW() on top of EnumServicesStatusExW().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 11:21:47 +02:00
Zebediah Figura 529b07ee11 advapi32: Make {Lock, Unlock}ServiceDatabase() into a no-op.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 11:21:42 +02:00
Micah N Gorrell 714b2219b8 advapi32: Replace SERV_dup() with strdupAW().
Signed-off-by: Micah N Gorrell <mgorrell@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 11:21:40 +02:00
Micah N Gorrell 2f2074a5a0 advapi32: Replace usage of internal SERV_ functions with exported functions.
Signed-off-by: Micah N Gorrell <mgorrell@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 11:21:38 +02:00
Zebediah Figura aa6e060172 advapi32: Move event tracing APIs to sechost.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:03:05 +02:00
Alexandre Julliard f8fb43aaba advapi32: Use WINEUSERNAME variable to implement GetUserNameA/W.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Dmitry Timoshkov 4ccb064355 advapi32: Properly skip not supported parts of the object ACE.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-08 12:36:19 +02:00
Serge Gautherie c7a12a851b advapi32/tests: Check RegGetValueA() RRF_SUBKEY_WOW64??KEY validation.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Jefferson Carpenter f070d040eb kernelbase: Zero out retkey in the ERROR_INVALID_HANDLE case in RegOpenKeyExW.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48798
Signed-off-by: Jefferson Carpenter <jeffersoncarpenter2@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:12 +01:00
Francois Gouget ad9fb96e5b advapi32/tests: The Everyone group name is sometimes translated.
This depends on SystemPreferredUILanguages, which does not always
match the language really used by the Windows interface
(UserDefaultUILanguage). Also the group name is not translated in all
languages. So just check the name that LsaLookupSids() returns in a
few known languages.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 11:37:11 +01:00
Francois Gouget 417814afcb advapi32/tests: On Windows 7 GetServiceKeyName() fails for all localized display names.
It's not just the service display names that contain a smart quote
that Windows 7 fails to handle, it's all localized names.

Signed-off-by: Francois Gouget <fgouget@icodeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 11:37:02 +01:00
Serge Gautherie 2df16753f0 advapi32: Fix 3 comments about pdwReserved and dwFlags.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-18 19:37:21 +01:00
Serge Gautherie 32b23dd114 advapi32/tests: Add more cases for CryptReleaseContext().
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 16:04:49 +01:00
Serge Gautherie 812c981886 advapi32/tests: Check all CryptReleaseContext() calls.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 16:00:32 +01:00
Serge Gautherie 8b9e3dae4f advapi32: Fix CryptReleaseContext() last error on NULL provider.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 16:00:22 +01:00
Serge Gautherie 62df03af96 advapi32: Use standard refcount in CRYPTPROV.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 16:00:07 +01:00
Serge Gautherie 9cc8b501ee advapi32: CryptReleaseContext() dwFlags parameter is DWORD, not ULONG_PTR.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 15:59:57 +01:00
Francois Gouget a909baeb4e tests: Report all errors when failing to wait for a child process.
Report the line number where the test failed to wait for the child so
one can identify which child process did not behave as expected.
Also wait_child_process() is meant for the general case so report
all non-crash error cases as test failures so they are accounted for.
Omit the "winetest_" prefix to match the other Wine test functions and
so the underlying winetest_wait_child_process() function can be wrapped
with the usual line-capturing macros.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48651
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 10:51:44 +01:00
Francois Gouget efb5050894 advapi32/tests: Simplify the name of the test unit for child processes.
The official name (shown by --list) has no path nor extension.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 00:55:44 +01:00
Rémi Bernon 56a83c585a advapi32/tests: Fix some format-overflow warnings.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 22:39:59 +01:00
Qian Hong 0024d18430 advapi32: Fix the name and use of DOMAIN_GROUP_RID_USERS.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-02 18:48:23 +01:00
Zebediah Figura ee01244434 advapi32: Return the string SID if LookupAccountSid() fails.
Based on a patch by Qian Hong.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-02 18:48:23 +01:00
Zebediah Figura e291fb4dc9 advapi32/tests: Clean up and expand tests for LsaLookupSids().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-02 18:48:23 +01:00
Francois Gouget 82aa066fcc advapi32/tests: Avoid failure when GetServiceKeyName() gets a smart quote.
For non-English languages the Spooler display name may contain non-ASCII
characters, typically a smart quote. On Windows 7 GetServiceKeyName()
fails when it gets such characters.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 22:44:11 +01:00
Nikolay Sivov 970d8d5d09 advapi32/tests: Remove some workarounds in Crypt* tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-10 18:41:48 +01:00
Nikolay Sivov a7e1e4f72e advapi32/tests: Use CreateWellKnownSid() directly.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-10 18:41:06 +01:00
Nikolay Sivov 10646ddb91 advapi32/tests: Remove some workarounds for older versions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-09 09:25:01 +01:00
André Hentschel 2114a4dd9b advapi32/tests: Don't test function directly when reporting GetLastError().
Found with Coccinelle.

Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-06 19:36:32 +01:00