Commit graph

25 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 83fdb9a6d9
[NTOS:CM] Set and reset the CMHIVE HiveIsLoading flag adequately. Fix an assertion in CmFlushKey() and reset the CMHIVE ViewLockOwner when releasing the view lock. 2019-02-17 01:21:35 +01:00
Timo Kreuzer 71fefa32db
[NDK][NTOS] Add global definition of INIT_FUNCTION/INIT_SECTION (#779)
* Add an NDK header to define INIT_FUNCTION/INIT_SECTION globally
* Use _declspec(allocate(x)) and _declspec(code_seg(x)) on MSVC versions that support it
* Use INIT_FUNCTION on functions only and INIT_SECTION on data only (required by MSVC)
* Place INIT_FUNCTION before the return type (required by MSVC)
* Make sure declarations and implementations share the same modifiers (required by MSVC)
* Add a global linker option to suppress warnings about defined but unused INIT section
* Merge INIT section into .text in freeldr
2018-12-30 12:19:11 +01:00
Eric Kohl 167bffd80f [NTOSKRNL] Add and call the CmpSaveBootControlSet() stub. 2018-12-16 12:49:59 +01:00
Pierre Schweitzer b9423f07d9
[NTOSKRNL] Add support for the ObUnsecureGlobalNames registry key 2018-10-27 12:01:38 +02:00
Pierre Schweitzer 8e51bb6510
[NTOSKRNL] Reduce noise 2018-10-27 10:04:22 +02:00
Hermès Bélusca-Maïto 83d5c711b3
[NTOS] Drastically reduce the hackish function CmpGetRegistryPath() for the text-mode setup case (it should ultimately completely disappear).
svn path=/branches/setup_improvements/; revision=75163
2018-10-25 00:40:03 +02:00
Hermès Bélusca-Maïto 2ed65d1555
[NTOS] Configuration Manager fixes.
- Rework CmpSetSystemValues() and remove its 1st-stage text-mode setup hack, since a real registry hive will be used for 1st-stage either.
- Lock, then unlock the registry in NtInitializeRegistry when initializing the hives & flusher.
- Call CmpInitializeHiveList() (i.e., initialize the other hives like \Software, \User, \.Default) only when we are not in setup-mode.

svn path=/branches/setup_improvements/; revision=74747
2018-10-25 00:40:02 +02:00
Hermès Bélusca-Maïto e2cb7b50b4
[NTOS] Remove some hacks that are not needed anymore, since a real registry hive will be used in 1st-stage as well.
This reverts a7c26408 (r53255) and ff75ae1b (r53694), and a hack from 6075ae9a (r46690).

svn path=/branches/setup_improvements/; revision=74745
svn path=/branches/setup_improvements/; revision=74746
2018-10-25 00:40:00 +02:00
Hermès Bélusca-Maïto 0e6bc236a1
[NTOS:CM] CmpCmdHiveOpen(): Resolve FileAttributes->RootDirectory when a hive file name is provided relative to it.
Fixes registry hive loading. CORE-13448
2018-10-22 00:39:50 +02:00
Hermès Bélusca-Maïto d61c00c252
[NTOS:CM] Implement more support for force-unloading registry hives.
CORE-13448 CORE-10705
2018-10-22 00:05:13 +02:00
Hermès Bélusca-Maïto 16752875db
[NTOS:CM] Add extra validation for the information class parameter in NtEnumerateValueKey(). 2018-10-21 18:12:08 +02:00
Hermès Bélusca-Maïto 49e08b23ce
[NTOS:CM] Improve the capture of user-mode parameters.
- Improve the capture of OBJECT_ATTRIBUTES parameters that are passed
  (by pointer) to the Cm* helper functions, and the capture of
  UNICODE_STRINGs.

- Correctly differentiate user-mode vs. kernel-mode root directory handles
  (in OBJECT_ATTRIBUTES): note that most of the Cm* APIs expect their
  parameters to be kernel-mode (pointers, handles...).

CORE-13448
2018-10-21 17:11:50 +02:00
Hermès Bélusca-Maïto 29b2fdcc4d
[NTOS:CM] Minor fixes.
- Validate the information class parameter in NtQueryValueKey().
- Call the post-callback in NtSetValueKey() only if the callback
  has been registered and the CmSetValueKey() call is executed.
2018-10-20 19:52:34 +02:00
Hermès Bélusca-Maïto 5322969186
[NTOS:CM] Reuse the saved previous-mode from the ExGetPreviousMode() calls. 2018-10-20 19:52:32 +02:00
Hermès Bélusca-Maïto 4caf391324
[NTOS][MKHIVE] Minor code formatting. 2018-10-14 15:59:34 +02:00
Serge Gautherie 7d6bda16c6
[REACTOS] Improve how some ASSERTMSG() message values are printed: enforce ending "\n".
NB: Not touching calls in "third-party" code: class and classpnp.
2018-08-08 22:03:45 +02:00
Hermès Bélusca-Maïto de87a936ce
[NTOS] Demote an ASSERT to a mere DPRINT since we only support registry hives with cluster size == 1 in any case so far (other sizes are UNIMPLEMENTED!) 2018-05-19 22:07:06 +02:00
Thomas Faber 6e750d189a
[NTOS:CM] Correctly interpret RtlCreateUnicodeString return value. CORE-14271 2018-01-31 10:37:56 +01:00
Mark Jansen 7b398514f1 [NTOS] Limit the spam from NtNotifyChangeMultipleKeys.
CORE-13125
2018-01-08 22:24:54 +01:00
Colin Finck f5d366b200
[NTOS:CM] Improve code in cmsysini.c (#216)
Based on an original patch by Timo Kreuzer, with modifications by me to adapt it to latest HEAD and use a single exit path through the Cleanup label. This reliably frees all allocated handles.

The original code returns STATUS_SUCCESS for many cases. This has been preserved.
In the future, it should be checked though whether returning success is appropriate for all these cases.

CORE-6844
2018-01-06 13:27:41 +01:00
Hermès Bélusca-Maïto 0b2bbd1125
[NTOS] Addendum to da81345: Fix checks when a hive is opened in shared mode. 2017-11-13 00:27:41 +01:00
Hermès Bélusca-Maïto da8134527b
[NTOS] Do not perform hive write operations when we are not supposed to.
- When we are in LiveCD mode (more generally, when hives are shared), load
  the system hives as volatile.
- Ignore hive write operations when everything operates in read-only mode
  and just return success instead.
- Just return success on hive file I/O if no file is associated with a
  given hive. This happens when e.g. a CM hive has a primary but no log.
2017-11-12 22:02:45 +01:00
Serge Gautherie abb6ad90f5 [MOUNTMGR][NTOSKRNL] ZwWriteFile() calls: Use explicit NULL instead of ambiguous 0. CORE-13910 2017-10-29 10:04:40 +01:00
Serge Gautherie 11baa0d723 [NTOSKRNL][ROSSYM] ZwReadFile() calls: Use explicit NULL instead of ambiguous 0. CORE-13910 2017-10-27 13:38:02 +02:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00