Commit Graph

1858 Commits

Author SHA1 Message Date
Francois Gouget 187423060f advapi32/tests: Fix the spelling of a couple of ok() messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:41:50 +01:00
Paul Gofman 992117ac98 advapi32: Handle exceptions from dereferencing invalid crypt objects' handles.
Fixes crash on start in "Re:ZERO -Starting Life in Another World- The
Prophecy of the Throne".

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 22:30:31 +01:00
Paul Gofman 7d4eaa30a4 advapi32: Return ERROR_INVALID_PARAMETER for invalid crypt objects' handles.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-23 22:30:30 +01:00
Akihiro Sagawa 2f93be4bdd advapi32/tests: Add another key unloading test with NtUnloadKey.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 22:21:13 +01:00
Zebediah Figura 3c677c3f08 ntdll: Implement NtQueryInformationToken(TokenElevation).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 21:42:01 +01:00
Zebediah Figura ec9244f056 ntdll: Implement NtQueryInformationToken(TokenLinkedToken).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 21:41:59 +01:00
Zebediah Figura 133e061244 advapi32/tests: Add some tests for token elevation.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 16:27:58 +01:00
Zebediah Figura 16955db2aa advapi32/tests: Add a few tests for GetKernelObjectSecurity() parameter validation.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 16:27:58 +01:00
Zebediah Figura d6fed9c360 advapi32/tests: Skip test_token_label() if AddMandatoryAce() is not present.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 08:53:36 +01:00
Zebediah Figura f6a723f121 advapi32/tests: Explicitly test the ACL contents in test_AddMandatoryAce().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 08:53:31 +01:00
Zebediah Figura 50cf8ee9c0 advapi32/tests: Rename test_acls() to test_InitializeAcl().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 08:53:24 +01:00
Zebediah Figura b250831adc advapi32/tests: Get rid of the test_luid() helper.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 08:53:19 +01:00
Zebediah Figura 0c0a7b7be7 advapi32/tests: Rename test_sid() to test_ConvertStringSidToSid().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 08:53:13 +01:00
Zebediah Figura be98f67f10 ntdll: Check the output buffer length in NtAccessCheck().
Based on a patch by Qian Hong.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 11:09:25 +01:00
Zebediah Figura d14cf677b5 ntdll: Do not touch the privilege output buffers if access_check fails.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 11:09:23 +01:00
Zebediah Figura bdc10c65ca ntdll: Always return at least sizeof(PRIVILEGE_SET) in NtAccessCheck().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 11:09:21 +01:00
Zebediah Figura f9d2db9345 advapi32/tests: Add a couple tests for DuplicateTokenEx() access flags.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 11:07:33 +01:00
Alexandre Julliard d6ef9401b3 server: Use the object type information to implement access mapping.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 22:53:46 +01:00
Zebediah Figura e030234354 advapi32: Support GetSecurityInfo() with special root HKEY constants.
This fixes a message box with the ASCOM Platform installer.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:22 +01:00
Zebediah Figura e9ea436052 advapi32/tests: Add some tests for querying the security of pseudo-handles.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:22 +01:00
Francois Gouget 58ff2a0a88 advapi32/tests: Don't check the display name if not in an English locale.
Service display names are often translated.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 21:36:12 +01:00
Gerald Pfeifer 42c03ef03f advapi32/tests: Initialize luid in test_CreateRestrictedToken.
Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-25 21:39:19 +01:00
Dmitry Timoshkov b940c5e7c9 advapi32: Implement LsaGetUserName.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 20:31:58 +01:00
Dmitry Timoshkov 65cab573ab advapi32/tests: Fix compilation with PSDK compiler.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 20:31:55 +01:00
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