- Move NtCreateKey to regobj.c, delete ntfunc.c, now all those routines exist solely for creating keys. - Move NtOpenKey to ntapi.c and rewrite it to use the new parse routine. It's now 6 lines of code instead of 80. - Fix a bug in CmpDereferenceNameCnotrolBlockWithLock. - Fix bugs during reference and dereference of KCB. - Fix KCB structure. - CmpDelayDerefKCBWorker is now called, don't make it assert anymore, just print out that it's not completed. - Remove debug output from new parse routine, since it's now called for each key open. - Add one more case to handle: opening the root \REGISTRY node. - Don't dereference KCBs in the parse routine anymore: we have some bugs related to this and it would make ReactOS crash. svn path=/trunk/; revision=31094
- Replace KEY_OBJECT by real CM_KEY_BODY NT type. svn path=/trunk/; revision=31052
- Rewrite CmiScanKeyList to use the NCB. - Disable private KCB allocator and allocate separate pool entries for each KCB -- should fix issues some people have been experiencing until the real bug is found - Remove all code that builds the name for the PKEY_OBJECT. This reduces non-paged pool allocation usage since the name is now stored compressed in the NCB, in paged pool. svn path=/trunk/; revision=31047
- Remove CmiAddKeyToList. - Use ParseContext in CmpDoCreate, removing OriginatingHive parameter since ReactOS doesn't use this. - Sending the create options as key node flags is wrong -- identify this in the code (fixing this however will break the boot -- need to investigate). svn path=/trunk/; revision=31046
- Save hive flags instead of ignoring them (but ignore no lazy flush for now). - Get rid of CmiKeyObjectListHead and code that was adding/removing entries into it, it wasn't used for anything. - Change the stupid subkey array (which caused pool fragmentation and slow-downs) with a linked-list version, since we never used the array for random indexing (the point of an array vs a linked list). - Link key object children to parent key control blocks so that KCBs now own PKEY_OBJECTs (will help with parsing later). - Get rid of CmiAddKeyToList since this is just an InsertTailList now. - Remove ReactOS hacks in flush code. - Do full parallel hive loading code in normal boot too, not just in cd-rom boot: CmpSetFileSize was causing the problem to happen so it's been disabled for now; this allowed removal of multiple ReactOS hacks. - Use the "Allocate" flag during linking instead of hard-coding FALSE, since this also works now. - Set HIVE_NOLAZYFLUSH to newly create hives since this is required for later. - Remove CmiConnectedHiveList since it's not used for anything. svn path=/trunk/; revision=31030
Do a full clean rebuild after this commit! - Begin fixing CM_KEY_NODE. - More proper use of registry lock in create operations. - Use ObOpenObjectByName (as a test only, ignore the results) in CmpLinkHiveToMaster. - Implement routines to acquire/release two KCB locks atomically. - Implement KCB dereference without lock. - Fix locking in CmpCreateKeyControlBlock so that it now properly locks KCBs when requested. - Implement rudimentary new-style parse routine that only walks the registry path until it's time to create the link node (since this is the only scenario where it's called from). Prints out the status of the operation but doesn't actually do anything. svn path=/trunk/; revision=31004
- Implement NtInitalizeRegistry with proper boot flags instead of TRUE/FALSE (our winlogon doesn't yet call the function with the CM_BOOT_FLAG_ACCEPTED_X flag-- this is needed to support setting the last known good boot/current control set). - Always set last mode to kernel-mode when calling this function. svn path=/trunk/; revision=30966
- Cleanup NtCreateKey and NtOpenKey to make it simpler for the final steps of the rewirte. - Remove SEH and callbacks (yes this is "bad", but won't break anything, and it will be added back). - Try to make the code as similar as possible to isolate broken-Ob calls from proper Cm behavior. svn path=/trunk/; revision=30705
- Remove CmiInitHives. - Enable parallel hive loading, this speeds up boot by loading the registry in 6 threads instead of just one (once we start having large registries and MP support this will be more evident). - Added some little hacks to make this work for now. - Fix a memory leak in CmInit1. - Add hardware hive to machine hive list so it can be properly loaded after. svn path=/trunk/; revision=30703
- Fix prototype of NtLoadKeyEx. - Refactor CmiLoadHives using new config routines instead of deprecated cm routines. - Stop using deprecated CmiScanKeyForValue (delete regfile.c as a result). - Add code for parallel hive loading to speed up boot process, but don't yet fully use it due to changes required in linking hives. - Add code for new hive linking process (CmpCreateLinkNode/CmpDoOpen). Not yet used to avoid too many changes in one patch. - Add new code in CmiLoadHives to deal with updated linking process when it becomes used. - Implement NtLoadKey2 to cal NtLoadKeyEx. - Implement NtLoadKeyEx as a new config routine, using CmLoadKey, move out of Cm. - Add some more code in CmpInitializeSystemHive to deal with SYSTEM hive creation during setup, once hive linking is refactored. - Implement a new command except for flushing -- open: CmpCmdHiveOpen. Used by CmLoadKey. - Add support for impersonating the SYSTEM account if the hive can't be open in the current client security context. - Fill out CmpMachineHiveList, to be used in parallel hive loading. svn path=/trunk/; revision=30680
- Get rid of ReactOS Hive Flags. - Get rid of some cruft from headers. - Switch to new lazy flush code and get rid of older one. - Update NtFlushKey to use CmFlushKey. svn path=/trunk/; revision=30207
- Fix a typo (compare a WCHAR with a WCHAR, not CHAR). svn path=/trunk/; revision=30197
Fix key parsing by copying the unicode string struct we get from CmFindObject for us to modify, and free the original. We needn't make any assumptions about the string being null terminated. Parse names with duplicated \ characters. Since we assert downstream for a null key, bail early here with an error if we really get a degenerate key name. With the work that others have done on the registry code, this is the last piece needed for the firefox installer. svn path=/trunk/; revision=30104
- Move Nt* APIs converted to new CM into config/cmapi.c - Start removing usage of ReactOS Hive Flags and use NT Hive Flags instead. - Add CmpLockRegsitry based on CmpLockRegistryExclusive. - Add new lazy flush implementation based on the old one, but with parallel work support. Not yet in use. - Don't delete a key that's already being deleted. - Update KcbMaxNameLen after a deletion. - Set the DELETE flag in the KCB during a deletion. - Remove the KCB Key hash during a delete. - Implement CmFlushKey (not yet used). svn path=/trunk/; revision=30079
- Get rid of parent key member in PKEY_OBJECT, and use ParentKcb instead. - Modify more functions to use KCB instead of PKEY_OBJECT. svn path=/trunk/; revision=30026
- Start using members inside the KCB instead of the PKEY_OBJECT. - Remove DummyKcb hacks since we now have a real, valid KCB. - Get rid of the cm worker thread and related code, this should fix a couple of random registry bugchecks and corruption. - This is a slow transition to using CM_KEY_BODY and KCB. svn path=/trunk/; revision=29986
- Include config/cm.h for cm based code, and remove all duplicated types and prototypes. - Get rid of EREGISTRY_HIVE, and use CMHIVE instead. Although the current ReactOS code doesn't make use of any of the functionality it offers, it's compatible with EREGISTRY_HIVE (our version was a subset) and allows us to get rid of another ros-specifc type, as well as being able to merge code from the cm-branch much more easily. - Merge cmwraprs.c from the cm-branch, since the only differences were the filehandle fields in EREGISTRY_HIVE vs CMHIVE. - Enable the #if'ed out code in cminit.c since it now applies to CMHIVE. svn path=/trunk/; revision=29944
- Move registry shareable types (not internal to ntoskrnl's configuration manager) to cmdata.h, so that freeldr/mkhive can access them too. - Remove all the ReactOS-specific versions of those types. - Change all code referencing the ReactOS-specific versions to use the real NT versions, and fix any related code to properly use the new fields. svn path=/trunk/; revision=29943
- Define LIST_ENTRY functions as part of host headers, instead of mkhive-specific defines. - Use CM_KEY_CONTROL_BLOCK when communicating with new CM implementation ("config"). CM now builds a dummy KCB so that the functions in "config" can go around their business with KCB without needing to know what a ros-specific PKEY_OBJECT is. svn path=/trunk/; revision=29902
Delete all Trailing spaces in code. svn path=/trunk/; revision=29690