51 if (!HiveCount) HiveCount = 1;
86 DPRINT1(
"Failed to flush %wZ on handle %p (status 0x%08lx)\n",
106 NextEntry = NextEntry->
Flink;
178 ULONG DirtyCount = 0;
184 DPRINT1(
"Lazy flush held. Bye bye.\n");
193 DPRINT(
"Forcing flush.\n");
199 DPRINT(
"Not forcing flush.\n");
221 DPRINT(
"Lazy flush done. More work to be done: %s. Entries still dirty: %u.\n",
222 MoreWork ?
"Yes" :
"No", DirtyCount);
249 CmpEnableLazyFlushDpcRoutine,
308 sizeof(DummyNameInfo),
312 DPRINT1(
"CmpCmdHiveOpen(): Root directory handle object name size query failed, Status = 0x%08lx\n",
Status);
319 if (FileNameInfo ==
NULL)
321 DPRINT1(
"CmpCmdHiveOpen(): Unable to allocate memory\n");
334 DPRINT1(
"CmpCmdHiveOpen(): Root directory handle object name query failed, Status = 0x%08lx\n",
Status);
360 DPRINT1(
"CmpCmdHiveOpen(): Unable to allocate memory\n");
386 DPRINT1(
"CmpCmdHiveOpen(): RtlAppendUnicodeStringToString() failed, Status = 0x%08lx\n",
Status);
408 ImpersonationContext)
#define OBJ_NAME_PATH_SEPARATOR
#define InterlockedIncrement
#define InterlockedDecrement
EX_PUSH_LOCK CmpHiveListHeadLock
BOOLEAN CmpShareSystemHives
VOID NTAPI CmpLazyFlush(VOID)
KDPC CmpEnableLazyFlushDpc
static ULONG CmpLazyFlushHiveCount
LONG CmpFlushStarveWriters
ULONG CmpLazyFlushIntervalInSeconds
VOID NTAPI CmpCmdInit(IN BOOLEAN SetupBoot)
BOOLEAN NTAPI CmpDoFlushNextHive(_In_ BOOLEAN ForceFlush, _Out_ PBOOLEAN Error, _Out_ PULONG DirtyCount)
VOID NTAPI CmpShutdownWorkers(VOID)
KTIMER CmpEnableLazyFlushTimer
WORK_QUEUE_ITEM CmpLazyWorkItem
NTSTATUS NTAPI CmpCmdHiveOpen(IN POBJECT_ATTRIBUTES FileAttributes, IN PSECURITY_CLIENT_CONTEXT ImpersonationContext, IN OUT PBOOLEAN Allocate, OUT PCMHIVE *NewHive, IN ULONG CheckFlags)
VOID NTAPI CmSetLazyFlushState(IN BOOLEAN Enable)
BOOLEAN CmpForceForceFlush
BOOLEAN CmpLazyFlushPending
BOOLEAN CMAPI HvSyncHive(PHHIVE RegistryHive)
VOID NTAPI CmpLockRegistryExclusive(VOID)
VOID NTAPI CmpUnlockRegistry(VOID)
VOID NTAPI CmpLockRegistry(VOID)
VOID NTAPI CmpInitializeHiveList(VOID)
LIST_ENTRY CmpHiveListHead
NTSTATUS NTAPI CmpInitHiveFromFile(IN PCUNICODE_STRING HiveName, IN ULONG HiveFlags, OUT PCMHIVE *Hive, IN OUT PBOOLEAN New, IN ULONG CheckFlags)
#define NT_SUCCESS(StatCode)
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
#define ExAllocatePoolWithTag(hernya, size, tag)
FORCEINLINE VOID ExReleasePushLock(PEX_PUSH_LOCK PushLock)
FORCEINLINE VOID ExAcquirePushLockShared(PEX_PUSH_LOCK PushLock)
struct _FileName FileName
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE _In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG FileAttributes
#define HFILE_TYPE_PRIMARY
#define ExFreePoolWithTag(_P, _T)
NTKERNELAPI VOID NTAPI PsRevertToSelf(VOID)
#define _Function_class_(x)
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
struct _OBJECT_NAME_INFORMATION OBJECT_NAME_INFORMATION
#define Int32x32To64(a, b)
_In_ ULONG _In_ ULONG _In_ ULONG Length
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
NTSTATUS NTAPI SeImpersonateClientEx(_In_ PSECURITY_CLIENT_CONTEXT ClientContext, _In_opt_ PETHREAD ServerThread)
Extended function that impersonates a client.
#define STATUS_WRONG_PASSWORD
#define STATUS_ACCOUNT_DISABLED
#define STATUS_OBJECT_PATH_SYNTAX_BAD
#define STATUS_NO_SUCH_USER
#define STATUS_ACCOUNT_EXPIRED
#define STATUS_OBJECT_PATH_INVALID
#define STATUS_ACCOUNT_RESTRICTION
#define STATUS_BUFFER_OVERFLOW
HANDLE FileHandles[HFILE_TYPE_MAX]
UNICODE_STRING FileFullPath
struct _LIST_ENTRY * Flink
BOOLEAN NTAPI KeSetTimer(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN PKDPC Dpc OPTIONAL)
BOOLEAN NTAPI KeCancelTimer(IN OUT PKTIMER Timer)
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_ACCESS_DENIED
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
_In_ WDFTIMER _In_ LONGLONG DueTime
VOID NTAPI ExQueueWorkItem(IN PWORK_QUEUE_ITEM WorkItem, IN WORK_QUEUE_TYPE QueueType)
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
#define ExInitializeWorkItem(Item, Routine, Context)
_In_opt_ PALLOCATE_FUNCTION Allocate
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
_In_opt_ PVOID DeferredContext
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
_Inout_opt_ PVOID Parameter