hbelusca in reactos

[NTOS]: Improve a bit CmpDeepCopyKeyInternal():

- Normally getting the SrcNode and DestNode must succeed (checked with assert);

- Set the DestNode Flags member, in particular when this is the new root node of the saved registry hive;

- Copy the key class cell (OK), and the key security cell (currently done in a hackish way; proper way: call the CmpAssignSecurity* function);

- Add more clean-up on failure;

- Warn in code about the fact that CmpDeepCopyKeyInternal is recursive, and will easily exhaust kernel stack. This function will need to be reworked later...

CORE-10793 CORE-10796

    • -11
    • +81
    /trunk/reactos/ntoskrnl/config/cmapi.c
[WINTERNL.H]: Fix the value of OBJ_VALID_ATTRIBUTES, and add the definition for OBJ_FORCE_ACCESS_CHECK.
[SECUR32_APITEST]: Add the beginnings of an apitest for secur32, based on code by Samuel Serapion & MSDN. What needs to be fixed here, is the client/server code to communicate the results back to the main test app being running. Work in progress.
    • -0
    • +14
    /branches/sspi-bringup/rostests/apitests/secur32/CMakeLists.txt
    • -0
    • +520
    /branches/sspi-bringup/rostests/apitests/secur32/client2_msdn.c
    • -0
    • +552
    /branches/sspi-bringup/rostests/apitests/secur32/server2_msdn.c
    • -0
    • +93
    /branches/sspi-bringup/rostests/apitests/secur32/client_server.h
    • -0
    • +334
    /branches/sspi-bringup/rostests/apitests/secur32/client_server.c
[NTOS]: Drastically reduce the hackish function CmpGetRegistryPath() for the text-mode setup case (it should ultimately completely disappear).
[USETUP]: Experiment more with updating/repairing the registry.

Currently partly blocked by CORE-13448.

[USETUP]: Mark some variables as 'static'.
[CMLIB]: Use the generic allocator functions, and fix build.
    • -3
    • +5
    /trunk/reactos/sdk/lib/cmlib/hivecell.c
[CMLIB]: Implement the dynamic array of the hive cell reference tracker.
    • -15
    • +93
    /trunk/reactos/sdk/lib/cmlib/hivecell.c
Sync to trunk r75154.
  1. … 1440 more files in changeset.
[USER.EXE]: Addendum to r75126: add a (dummy) version resource to USER.EXE so as to fix error 1812 "ERROR_RESOURCE_DATA_NOT_FOUND" encountered when starting the DirectX 9.0 installer. From patch by Stas'M, thanks!

CORE-13462

    • -0
    • +5
    /trunk/reactos/subsystems/mvdm/wow16/user/user.rc
[FILESYSTEMS]: Fix printf-like counted string specifiers.
[NTOS:CM]: Simplify code by using suitable assertion macro.
    • -4
    • +2
    /trunk/reactos/ntoskrnl/config/cmdelay.c
[NTOS]: Addendum to r75142: Use strsafe printf functions (suggested by Thomas).
    • -18
    • +19
    /trunk/reactos/ntoskrnl/config/cmsysini.c
[CMLIB][NTOS]: Use correct parameter type for the 4th parameter of CmpGetValueData().

[CMLIB]: Fix debug.h inclusion.

[NTOS]: Use RtlCopyUnicodeString() to initialize the contents of FullName.

    • -1
    • +1
    /trunk/reactos/sdk/lib/cmlib/cmkeydel.c
    • -1
    • +1
    /trunk/reactos/ntoskrnl/config/cmparse.c
    • -1
    • +1
    /trunk/reactos/sdk/lib/cmlib/cmvalue.c
    • -1
    • +1
    /trunk/reactos/ntoskrnl/config/cminit.c
[NTOS]: Fixes & improvements:

- Fix a bug in CmpInitHiveFromFile(): correctly set the MaximumLength value of NewHive->FileFullPath;

- Code simplification: no need to use temporary ANSI string operations followed by UNICODE conversion, when one can do the same thing directly in UNICODE.

- Use NULL for NULL handles.

    • -37
    • +14
    /trunk/reactos/ntoskrnl/config/cmsysini.c
[NTOS]: Improve parameter namings in CmpLinkKeyToHive() and some of its DPRINTs; use UNICODE_NULL where needed.
    • -20
    • +22
    /trunk/reactos/ntoskrnl/config/cmsysini.c
[NTOS]: Improve some DPRINTs, and variables naming + buffer data type in CmpAddToHiveFileList().
    • -8
    • +8
    /trunk/reactos/ntoskrnl/config/cmhvlist.c
[NTDLL_APITEST]: Temporarily disable part of the NtLoad/UnloadKey test (related to force-unload a hive while some handles to subkeys are still opened), because this creates memory corruptions, due to the fact we currently don't perform force-unloads correctly.

CORE-13448

[NTOS]: Fix the ObpLookupObjectName() prototype in regard to r75133.
[NTOS]: Avoid initializing variables within if-conditions.
[NTOS]: Revert the pool tag change from r75128, and explain in comment why we cannot actually use it.
    • -2
    • +13
    /trunk/reactos/ntoskrnl/ob/oblife.c
[NTOS]: Fix typos.
[NTOS]: Minor fixes:

- Use NULL instead of 'zero' for setting a handle / pointer to NULL;

- Don't hardcode an array size; fix a comment;

- Use ExFreePoolWithTag();

- Whitespace fix.

[USER.EXE]: Add a *stub* user.exe to make the DirectX 9.0 installer happy (it searches user.exe for existence for no reason, and if it cannot find it, the installer bails out). (WARNING: This is in NO WAY our implementation of WoW16!!)

Reported on https://www.reactos.org/forum/viewtopic.php?f=4&t=15576 , http://reactos.org/forum/viewtopic.php?f=4&t=16498 .

This is not a ReactOS problem per se, because it also happens on Windows, as reported here:

https://xpetips.wordpress.com/2009/09/18/installing-directx-9-0c-on-xpe/ and http://www.xpembedded.info/DirectX_v9_0c_and_finding_missing_components_.html .

  1. /trunk/reactos/subsystems/mvdm/wow16/user
    • -0
    • +2
    /trunk/reactos/subsystems/mvdm/wow16/CMakeLists.txt
    • -0
    • +25
    /trunk/reactos/subsystems/mvdm/wow16/user/user.c
    • -0
    • +5
    /trunk/reactos/subsystems/mvdm/wow16/user/CMakeLists.txt
[NFS][RXCE]: Fix MSVC build (definitively?)
[NTOS]: Use SEH inside CmQueryKey(), as it can be called with user-mode parameter KeyInformation. Remove unused code in CmLoadKey().

I've noticed that in cmapi.c / ntapi.c we do not correctly check the validity of some OBJECT_ATTRIBUTES variables and user-mode vs. kernel-mode registry handles.

    • -57
    • +72
    /trunk/reactos/ntoskrnl/config/cmapi.c
[NTOS]: Improve a DPRINT.
    • -2
    • +3
    /trunk/reactos/ntoskrnl/config/cminit.c
Just use REG_FORCE_UNLOAD since we're at it.
[NTDLL_APITEST]: Add tests for NtLoadKey and NtUnloadKey.

CORE-13448

    • -0
    • +2
    /trunk/rostests/apitests/ntdll/testlist.c
    • -0
    • +633
    /trunk/rostests/apitests/ntdll/NtLoadUnloadKey.c
[NTOS]: Employ the simple CMP_ASSERT_KCB_LOCK() macro to perform these asserts.
    • -19
    • +12
    /trunk/reactos/ntoskrnl/config/cmkcbncb.c