Commit Graph

905 Commits (master)

Author SHA1 Message Date
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
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
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 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
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
Alexandre Julliard 4429b9f803 advapi32/tests: Use debug.h functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:16 +01:00
Zebediah Figura 8313551d26 advapi32/tests: Remove a todo_wine.
This seems to have been fixed by recent changes to CreateProcess() implementation.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 09:33:44 +01:00
Dmitry Timoshkov fde235da03 kernelbase: Implement EqualDomainSid.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Andrew Eikum 9e817f8f8b ntdll: Add missing spec file entry for EtwEventWriteString.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 17:44:06 +01:00
Andrew Eikum 364d654ba3 advapi32: Add EventRegister and EventUnregister tests.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 17:43:58 +01:00
Zebediah Figura e80d84eb52 advapi32/tests: Clean up double NotifyServiceStatusChange() tests.
Simplify different paths, explicitly test data2.was_called, and test
that the correct notification is produced for Windows 8+ (previously
an intermittent failure was observed due to this uninitialized field).

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:25:20 +01:00
Zebediah Figura a39d0c7a39 advapi32/tests: Accept another value for the default service pre-shutdown timeout.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:25:17 +01:00
Zebediah Figura 4eee305bb8 advapi32/tests: Clean up tests for duplicate service names.
Use our own services instead of relying on a system service, and
account for differing Windows 10 behaviour.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:25:15 +01:00
Zebediah Figura 7d35a261ba advapi32/tests: Use unique names for each created service.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 17:11:43 +02:00
Gijs Vermeulen 70bb655155 advapi32/tests: Fix test_process_security with non-English locale.
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 21:04:45 +02:00
Sven Baars 1f2c17d2bc advapi32/tests: Remove a superfluous CloseServiceHandle call (Coverity).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 23:54:07 +02:00
Zebediah Figura fec26c87ff advapi32/tests: Use unique service names in test_wow64().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47891
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 09:59:24 +02:00
Francois Gouget 171f24eba2 advapi32/tests: Spelling tweaks in ok() messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:46:52 +02:00
Francois Gouget 432cb69178 advapi32/tests: Spelling fixes in a couple of comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:46:48 +02:00
Zebediah Figura 2430c17202 services: Don't redirect the image file path for kernel drivers.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47623
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 11:29:28 +02:00
Daniel Lehman 023ad350e2 advapi32: Implement EnumDynamicTimeZoneInformation.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-29 11:45:37 +02:00
Akihiro Sagawa 62f5210364 advapi32: Fix the error code on load failure.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:42:03 +02:00
Akihiro Sagawa cb555215a9 advapi32: Fix the error code on parse failure.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:42:01 +02:00
Akihiro Sagawa e798d25f25 advapi32: Expand environment variables even if REG_SZ type is used.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:41:59 +02:00
Akihiro Sagawa 1ed4c150a2 advapi32: RegLoadMUIString doesn't accept a string without '@' prefix.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:41:57 +02:00
Akihiro Sagawa 90f79099a4 advapi32/tests: Add more RegLoadMUIString tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:41:53 +02:00
Akihiro Sagawa 3c1359af10 advapi32: Implement REG_MUI_STRING_TRUNCATE flag.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 21:56:00 +02:00
Akihiro Sagawa 1ca4ecadec advapi32/tests: Add RegLoadMUIString tests with REG_MUI_STRING_TRUNCATE flag.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 21:55:56 +02:00
Akihiro Sagawa 4fe6460a30 advapi32: Return required buffer size in RegLoadMUIString.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-13 13:27:33 +02:00
Akihiro Sagawa 2d9a7cd39d advapi32: Remove useless RegLoadMUIStringA implementation.
This commit avoids brokeness in advance.
Otherwise, it will be broken when we support ERROR_MORE_DATA in
RegLoadMUIStringW.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-13 13:26:59 +02:00
Akihiro Sagawa bfdfe85229 advapi32: Improve load_string to return error code.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-13 13:26:47 +02:00
Akihiro Sagawa ec716f74d7 advapi32: Improve parameter sanity checks in RegLoadMUIString.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-13 13:26:18 +02:00
Akihiro Sagawa 1b7f3698f0 advapi32: Support the base directory parameter in RegLoadMUIString.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-13 13:25:19 +02:00
Akihiro Sagawa c29a5560a6 advapi32/tests: Add basic RegLoadMUIString tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-13 13:24:53 +02:00
Qian Hong 1058647e14 server: Create primary group using DOMAIN_GROUP_RID_USERS.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 11:15:29 +02:00
Vijay Kiran Kamuju a7b8e84567 advapi32/tests: Add additional tests for NtAccessCheck.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-26 21:36:25 +02:00