ReactOS 0.4.16-dev-329-g9223134
|
#include "ntoskrnl.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | NDEBUG |
NTSTATUS NTAPI CmpBuildHashStackAndLookupCache | ( | _In_ PCM_KEY_BODY | ParseObject, |
_Inout_ PCM_KEY_CONTROL_BLOCK * | Kcb, | ||
_In_ PUNICODE_STRING | Current, | ||
_Out_ PHHIVE * | Hive, | ||
_Out_ PHCELL_INDEX | Cell, | ||
_Out_ PULONG | TotalRemainingSubkeys, | ||
_Out_ PULONG | MatchRemainSubkeyLevel, | ||
_Out_ PULONG | TotalSubkeys, | ||
_Inout_ PULONG | OuterStackArray, | ||
_Out_ PULONG * | LockedKcbs | ||
) |
Builds a hash stack cache and looks up in the pool cache for a matching key pathname.
[in] | ParseObject | A pointer to a parse object, acting as a key body. This parameter is unused. |
[in,out] | Kcb | A pointer to a KCB. This KCB is used by the registry parser after hash stack and cache lookup are done. This KCB might change if the key is found to be cached in the cache pool. |
[in] | Current | The current remaining key pathname. |
[out] | Hive | A pointer to a registry hive, returned by the caller. |
[out] | Cell | A pointer to a hive cell, returned by the caller. |
[out] | TotalRemainingSubkeys | A pointer to a number of total remaining subkey levels, returned by the caller. This can be 0 if no subkey levels have been found. |
[out] | MatchRemainSubkeyLevel | A pointer to a number of remaining subkey levels that match, returned by the caller. This can be 0 if no matching levels are found. |
[out] | TotalSubkeys | A pointer to a number of total subkeys. This can be 0 if no subkey levels are found. By definition, both MatchRemainSubkeyLevel and TotalRemainingSubkeys are 0 as well. |
[in,out] | OuterStackArray | A pointer to an array that lives on the caller's stack. The expected size of the array is up to 32 elements, which is the imposed limit by CMP_HASH_STACK_LIMIT. This limit also corresponds to the maximum depth of subkey levels. |
[out] | LockedKcbs | A pointer to an array of locked KCBs, returned by the caller. |
Definition at line 1696 of file cmparse.c.
Referenced by CmpParseKey().
|
static |
Compares each subkey's hash and name with those captured in the hash cache stack.
[in] | HashCacheStack | A pointer to a hash cache stack array filled with subkey hashes and names for comparison. |
[in] | CurrentKcb | A pointer to the currently given KCB. |
[in] | RemainingSubkeys | The remaining subkey levels to be supplied. |
[out] | ParentKcb | A pointer to the parent KCB returned to the caller. This parameter points to the parent of the current KCB if all the subkeys match, otherwise it points to the actual current KCB. |
Definition at line 1284 of file cmparse.c.
Referenced by CmpLookInCache().
|
static |
Computes the hashes of each subkey in key path name and stores them in a hash stack for cache lookup.
[in] | RemainingName | A Unicode string structure consisting of the remaining registry key path name. |
[in] | ConvKey | The hash convkey of the current KCB to be supplied. |
[in,out] | HashCacheStack | An array stack. This function uses this array to store all the computed hashes of a key pathname. |
[out] | TotalSubKeys | The number of total subkeys that have been found, returned by this function to the caller. If no subkey levels are found the function returns 0. |
Definition at line 1141 of file cmparse.c.
Referenced by CmpBuildHashStackAndLookupCache().
NTSTATUS NTAPI CmpCreateLinkNode | ( | IN PHHIVE | Hive, |
IN HCELL_INDEX | Cell, | ||
IN PACCESS_STATE | AccessState, | ||
IN UNICODE_STRING | Name, | ||
IN KPROCESSOR_MODE | AccessMode, | ||
IN ULONG | CreateOptions, | ||
IN PCM_PARSE_CONTEXT | Context, | ||
IN PCM_KEY_CONTROL_BLOCK | ParentKcb, | ||
IN PULONG | KcbsLocked, | ||
OUT PVOID * | Object | ||
) |
Definition at line 830 of file cmparse.c.
Referenced by CmpParseKey().
NTSTATUS NTAPI CmpDoCreate | ( | IN PHHIVE | Hive, |
IN HCELL_INDEX | Cell, | ||
IN PACCESS_STATE | AccessState, | ||
IN PUNICODE_STRING | Name, | ||
IN KPROCESSOR_MODE | AccessMode, | ||
IN PCM_PARSE_CONTEXT | ParseContext, | ||
IN PCM_KEY_CONTROL_BLOCK | ParentKcb, | ||
OUT PVOID * | Object | ||
) |
Definition at line 404 of file cmparse.c.
Referenced by CmpParseKey().
NTSTATUS NTAPI CmpDoCreateChild | ( | IN PHHIVE | Hive, |
IN HCELL_INDEX | ParentCell, | ||
IN PSECURITY_DESCRIPTOR ParentDescriptor | OPTIONAL, | ||
IN PACCESS_STATE | AccessState, | ||
IN PUNICODE_STRING | Name, | ||
IN KPROCESSOR_MODE | AccessMode, | ||
IN PCM_PARSE_CONTEXT | ParseContext, | ||
IN PCM_KEY_CONTROL_BLOCK | ParentKcb, | ||
IN ULONG | Flags, | ||
OUT PHCELL_INDEX | KeyCell, | ||
OUT PVOID * | Object | ||
) |
Definition at line 204 of file cmparse.c.
Referenced by CmpCreateLinkNode(), and CmpDoCreate().
NTSTATUS NTAPI CmpDoOpen | ( | IN PHHIVE | Hive, |
IN HCELL_INDEX | Cell, | ||
IN PCM_KEY_NODE | Node, | ||
IN PACCESS_STATE | AccessState, | ||
IN KPROCESSOR_MODE | AccessMode, | ||
IN ULONG | Attributes, | ||
IN PCM_PARSE_CONTEXT Context | OPTIONAL, | ||
IN ULONG | ControlFlags, | ||
IN OUT PCM_KEY_CONTROL_BLOCK * | CachedKcb, | ||
IN PULONG | KcbsLocked, | ||
IN PUNICODE_STRING | KeyName, | ||
OUT PVOID * | Object | ||
) |
Definition at line 601 of file cmparse.c.
Referenced by CmpCreateLinkNode(), and CmpParseKey().
BOOLEAN NTAPI CmpGetNextName | ( | IN OUT PUNICODE_STRING | RemainingName, |
OUT PUNICODE_STRING | NextName, | ||
OUT PBOOLEAN | LastName | ||
) |
Definition at line 21 of file cmparse.c.
Referenced by CmpParseKey(), and CmpWalkPath().
BOOLEAN NTAPI CmpGetSymbolicLink | ( | IN PHHIVE | Hive, |
IN OUT PUNICODE_STRING | ObjectName, | ||
IN OUT PCM_KEY_CONTROL_BLOCK | SymbolicKcb, | ||
IN PUNICODE_STRING RemainingName | OPTIONAL | ||
) |
Definition at line 75 of file cmparse.c.
Referenced by CmpParseKey().
VOID NTAPI CmpHandleExitNode | ( | IN OUT PHHIVE * | Hive, |
IN OUT HCELL_INDEX * | Cell, | ||
IN OUT PCM_KEY_NODE * | KeyNode, | ||
IN OUT PHHIVE * | ReleaseHive, | ||
IN OUT HCELL_INDEX * | ReleaseCell | ||
) |
Definition at line 1080 of file cmparse.c.
Referenced by CmpParseKey().
|
static |
Looks up in the pool cache for key pathname that matches with one in the said cache and returns a KCB pointing to that name. This function performs locking of KCBs during cache lookup.
[in] | HashCacheStack | A pointer to a hash cache stack array filled with subkey hashes and names. |
[in] | LockKcbsExclusive | If set to TRUE, the KCBs are locked exclusively by the calling thread, otherwise they are locked in shared mode. See Remarks for further information. |
[in] | TotalRemainingSubkeys | The total remaining subkey levels to be supplied. |
[in,out] | RemainingName | A Unicode string structure consisting of the remaining registry key path name. The remaining name is updated by the function if a key pathname is found in cache. |
[in,out] | OuterStackArray | A pointer to an array that lives on the caller's stack. The expected size of the array is up to 32 elements, which is the imposed limit by CMP_HASH_STACK_LIMIT. This limit also corresponds to the maximum depth of subkey levels. |
[in,out] | Kcb | A pointer to a KCB, this KCB is changed if the key pathname is found in cache. |
[out] | Hive | A pointer to a hive, this hive is changed if the key pathname is found in cache. |
[out] | Cell | A pointer to a cell, this cell is changed if the key pathname is found in cache. |
[out] | MatchRemainSubkeyLevel | A pointer to match subkey levels returned by the function. If no match levels are found, this is 0. |
Definition at line 1460 of file cmparse.c.
Referenced by CmpBuildHashStackAndLookupCache().
NTSTATUS NTAPI CmpParseKey | ( | IN PVOID | ParseObject, |
IN PVOID | ObjectType, | ||
IN OUT PACCESS_STATE | AccessState, | ||
IN KPROCESSOR_MODE | AccessMode, | ||
IN ULONG | Attributes, | ||
IN OUT PUNICODE_STRING | CompleteName, | ||
IN OUT PUNICODE_STRING | RemainingName, | ||
IN OUT PVOID Context | OPTIONAL, | ||
IN PSECURITY_QUALITY_OF_SERVICE SecurityQos | OPTIONAL, | ||
OUT PVOID * | Object | ||
) |
Definition at line 1848 of file cmparse.c.
Referenced by CmpCreateObjectTypes().
|
static |
Removes the subkeys on a remaining key pathname.
[in] | HashCacheStack | A pointer to a hash cache stack array filled with subkey hashes and names. |
[in] | RemainingSubkeys | The remaining subkey levels to be supplied. |
[in,out] | RemainingName | A Unicode string structure consisting of the remaining registry key path name, where the subkeys of such path are to be removed. |
Definition at line 1361 of file cmparse.c.
Referenced by CmpLookInCache().