ReactOS 0.4.15-dev-7942-gd23573b
obinit.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for obinit.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID NTAPI PsInitializeQuotaSystem (VOID)
 Initializes the quota system during boot phase of the system, which sets up the default quota block that is used across several processes.
 
static NTSTATUS NTAPI ObpCreateKernelObjectsSD (OUT PSECURITY_DESCRIPTOR *SecurityDescriptor)
 
BOOLEAN NTAPI ObInit2 (VOID)
 
BOOLEAN NTAPI ObInitSystem (VOID)
 

Variables

GENERIC_MAPPING ObpTypeMapping
 
GENERIC_MAPPING ObpDirectoryMapping
 
GENERIC_MAPPING ObpSymbolicLinkMapping
 
PDEVICE_MAP ObSystemDeviceMap = NULL
 
ULONG ObpTraceLevel = 0
 
ULONG ObpInitializationPhase
 
ULONG ObpObjectSecurityMode = 0
 
ULONG ObpProtectionMode = 0
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 14 of file obinit.c.

Function Documentation

◆ ObInit2()

BOOLEAN NTAPI ObInit2 ( VOID  )

Definition at line 136 of file obinit.c.

137{
138 CCHAR i;
139 PKPRCB Prcb;
140 PGENERAL_LOOKASIDE CurrentList = NULL;
141
142 /* Now allocate the per-processor lists */
143 for (i = 0; i < KeNumberProcessors; i++)
144 {
145 /* Get the PRCB for this CPU */
146 Prcb = KiProcessorBlock[(int)i];
147
148 /* Set the OBJECT_CREATE_INFORMATION List */
151 sizeof(GENERAL_LOOKASIDE),
152 'ICbO');
153 if (CurrentList)
154 {
155 /* Initialize it */
159 'ICbO',
160 32,
162 }
163 else
164 {
165 /* No list, use the static buffer */
166 CurrentList = &ObpCreateInfoLookasideList;
167 }
168
169 /* Link it */
170 Prcb->PPLookasideList[LookasideCreateInfoList].P = CurrentList;
171
172 /* Set the captured UNICODE_STRING Object Name List */
175 sizeof(GENERAL_LOOKASIDE),
176 'MNbO');
177 if (CurrentList)
178 {
179 /* Initialize it */
181 PagedPool,
182 248,
183 'MNbO',
184 16,
186 }
187 else
188 {
189 /* No list, use the static buffer */
190 CurrentList = &ObpNameBufferLookasideList;
191 }
192
193 /* Link it */
194 Prcb->PPLookasideList[LookasideNameBufferList].P = CurrentList;
195 }
196
197 return TRUE;
198}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define NonPagedPool
Definition: env_spec_w32.h:307
#define PagedPool
Definition: env_spec_w32.h:308
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
CCHAR KeNumberProcessors
Definition: krnlinit.c:35
VOID NTAPI ExInitializeSystemLookasideList(IN PGENERAL_LOOKASIDE List, IN POOL_TYPE Type, IN ULONG Size, IN ULONG Tag, IN USHORT MaximumDepth, IN PLIST_ENTRY ListHead)
Definition: lookas.c:31
LIST_ENTRY ExSystemLookasideListHead
Definition: lookas.c:21
@ LookasideCreateInfoList
Definition: mmtypes.h:171
@ LookasideNameBufferList
Definition: mmtypes.h:172
PKPRCB KiProcessorBlock[]
Definition: krnlinit.c:32
GENERAL_LOOKASIDE ObpNameBufferLookasideList
Definition: oblife.c:26
GENERAL_LOOKASIDE ObpCreateInfoLookasideList
Definition: ob.h:644
PP_LOOKASIDE_LIST PPLookasideList[16]
Definition: ketypes.h:708
struct _GENERAL_LOOKASIDE * P
Definition: ketypes.h:871
struct _GENERAL_LOOKASIDE * L
Definition: ketypes.h:872
char CCHAR
Definition: typedefs.h:51
struct LOOKASIDE_ALIGN _GENERAL_LOOKASIDE GENERAL_LOOKASIDE
struct LOOKASIDE_ALIGN _GENERAL_LOOKASIDE * PGENERAL_LOOKASIDE

Referenced by ObInitSystem().

◆ ObInitSystem()

BOOLEAN NTAPI ObInitSystem ( VOID  )

Definition at line 203 of file obinit.c.

204{
207 OBJECT_TYPE_INITIALIZER ObjectTypeInitializer;
210 PKPRCB Prcb = KeGetCurrentPrcb();
211 PLIST_ENTRY ListHead, NextEntry;
213 POBJECT_HEADER_CREATOR_INFO CreatorInfo;
215 PSECURITY_DESCRIPTOR KernelObjectsSD = NULL;
217
218 /* Check if this is actually Phase 1 initialization */
219 if (ObpInitializationPhase != 0) goto ObPostPhase0;
220
221 /* Initialize the OBJECT_CREATE_INFORMATION List */
225 'ICbO',
226 32,
228
229 /* Set the captured UNICODE_STRING Object Name List */
231 PagedPool,
232 248,
233 'MNbO',
234 16,
236
237 /* Temporarily setup both pointers to the shared list */
242
243 /* Initialize the security descriptor cache */
245
246 /* Initialize the Default Event */
248
249 /* Initialize the Dos Device Map mutex */
251
252 /* Setup default access for the system process */
253 PsGetCurrentProcess()->GrantedAccess = PROCESS_ALL_ACCESS;
254 PsGetCurrentThread()->GrantedAccess = THREAD_ALL_ACCESS;
255
256 /* Setup the Object Reaper */
258
259 /* Initialize default Quota block */
261
262 /* Create kernel handle table */
265
266 /* Create the Type Type */
267 RtlZeroMemory(&ObjectTypeInitializer, sizeof(ObjectTypeInitializer));
268 RtlInitUnicodeString(&Name, L"Type");
269 ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer);
270 ObjectTypeInitializer.ValidAccessMask = OBJECT_TYPE_ALL_ACCESS;
271 ObjectTypeInitializer.UseDefaultObject = TRUE;
272 ObjectTypeInitializer.MaintainTypeList = TRUE;
273 ObjectTypeInitializer.PoolType = NonPagedPool;
274 ObjectTypeInitializer.GenericMapping = ObpTypeMapping;
275 ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(OBJECT_TYPE);
276 ObjectTypeInitializer.InvalidAttributes = OBJ_OPENLINK;
277 ObjectTypeInitializer.DeleteProcedure = ObpDeleteObjectType;
278 ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &ObpTypeObjectType);
279
280 /* Create the Directory Type */
281 RtlInitUnicodeString(&Name, L"Directory");
282 ObjectTypeInitializer.PoolType = PagedPool;
283 ObjectTypeInitializer.ValidAccessMask = DIRECTORY_ALL_ACCESS;
284 ObjectTypeInitializer.CaseInsensitive = TRUE;
285 ObjectTypeInitializer.MaintainTypeList = FALSE;
286 ObjectTypeInitializer.GenericMapping = ObpDirectoryMapping;
287 ObjectTypeInitializer.DeleteProcedure = NULL;
288 ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(OBJECT_DIRECTORY);
289 ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &ObpDirectoryObjectType);
290 ObpDirectoryObjectType->TypeInfo.ValidAccessMask &= ~SYNCHRONIZE;
291
292 /* Create 'symbolic link' object type */
293 RtlInitUnicodeString(&Name, L"SymbolicLink");
294 ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(OBJECT_SYMBOLIC_LINK);
295 ObjectTypeInitializer.GenericMapping = ObpSymbolicLinkMapping;
296 ObjectTypeInitializer.ValidAccessMask = SYMBOLIC_LINK_ALL_ACCESS;
297 ObjectTypeInitializer.ParseProcedure = ObpParseSymbolicLink;
298 ObjectTypeInitializer.DeleteProcedure = ObpDeleteSymbolicLink;
299 ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &ObpSymbolicLinkObjectType);
300 ObpSymbolicLinkObjectType->TypeInfo.ValidAccessMask &= ~SYNCHRONIZE;
301
302 /* Phase 0 initialization complete */
304 return TRUE;
305
306ObPostPhase0:
307
308 /* Re-initialize lookaside lists */
309 ObInit2();
310
311 /* Initialize Object Types directory attributes */
314 &Name,
316 NULL,
318
319 /* Create the directory */
323 if (!NT_SUCCESS(Status)) return FALSE;
324
325 /* Get a handle to it */
327 0,
331 NULL);
332 if (!NT_SUCCESS(Status)) return FALSE;
333
334 /* Close the extra handle */
336 if (!NT_SUCCESS(Status)) return FALSE;
337
338 /* Create a custom security descriptor for the KernelObjects directory */
339 Status = ObpCreateKernelObjectsSD(&KernelObjectsSD);
340 if (!NT_SUCCESS(Status))
341 return FALSE;
342
343 /* Initialize the KernelObjects directory attributes */
344 RtlInitUnicodeString(&Name, L"\\KernelObjects");
346 &Name,
348 NULL,
349 KernelObjectsSD);
350
351 /* Create the directory */
355 ExFreePoolWithTag(KernelObjectsSD, TAG_SD);
356 if (!NT_SUCCESS(Status)) return FALSE;
357
358 /* Close the extra handle */
360 if (!NT_SUCCESS(Status)) return FALSE;
361
362 /* Initialize ObjectTypes directory attributes */
363 RtlInitUnicodeString(&Name, L"\\ObjectTypes");
365 &Name,
367 NULL,
368 NULL);
369
370 /* Create the directory */
374 if (!NT_SUCCESS(Status)) return FALSE;
375
376 /* Get a handle to it */
378 0,
382 NULL);
383 if (!NT_SUCCESS(Status)) return FALSE;
384
385 /* Close the extra handle */
387 if (!NT_SUCCESS(Status)) return FALSE;
388
389 /* Initialize the lookup context and lock it */
392
393 /* Loop the object types */
394 ListHead = &ObpTypeObjectType->TypeList;
395 NextEntry = ListHead->Flink;
396 while (ListHead != NextEntry)
397 {
398 /* Get the creator info from the list */
399 CreatorInfo = CONTAINING_RECORD(NextEntry,
401 TypeList);
402
403 /* Recover the header and the name header from the creator info */
404 Header = (POBJECT_HEADER)(CreatorInfo + 1);
406
407 /* Make sure we have a name, and aren't inserted yet */
408 if ((NameInfo) && !(NameInfo->Directory))
409 {
410 /* Do the initial lookup to setup the context */
412 &NameInfo->Name,
414 FALSE,
415 &Context))
416 {
417 /* Insert this object type */
419 &Context,
420 Header);
421 }
422 }
423
424 /* Move to the next entry */
425 NextEntry = NextEntry->Flink;
426 }
427
428 /* Cleanup after lookup */
430
431 /* Initialize DOS Devices Directory and related Symbolic Links */
433 if (!NT_SUCCESS(Status)) return FALSE;
434 return TRUE;
435}
#define ObpDirectoryObjectType
Definition: ObTypes.c:118
static POBJECT_TYPE ObpDefaultObject
Definition: ObTypes.c:133
static POBJECT_TYPE ObpTypeObjectType
Definition: ObTypes.c:117
#define ObpSymbolicLinkObjectType
Definition: ObTypes.c:119
struct NameRec_ * Name
Definition: cdprocs.h:460
LONG NTSTATUS
Definition: precomp.h:26
Definition: Header.h:9
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define PsGetCurrentThread()
Definition: env_spec_w32.h:81
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
ULONG Handle
Definition: gdb_input.c:15
Status
Definition: gdiplustypes.h:25
VOID FASTCALL KeInitializeGuardedMutex(OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:31
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define OBJ_OPENLINK
Definition: winternl.h:230
#define OBJ_PERMANENT
Definition: winternl.h:226
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
#define KernelMode
Definition: asm.h:34
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
Definition: ketypes.h:1161
struct _OBJECT_SYMBOLIC_LINK OBJECT_SYMBOLIC_LINK
#define OBJECT_HEADER_TO_NAME_INFO(h)
Definition: obtypes.h:114
struct _OBJECT_HEADER * POBJECT_HEADER
struct _OBJECT_DIRECTORY OBJECT_DIRECTORY
#define SYMBOLIC_LINK_ALL_ACCESS
Definition: nt_native.h:1267
#define THREAD_ALL_ACCESS
Definition: nt_native.h:1339
#define PROCESS_ALL_ACCESS
Definition: nt_native.h:1324
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define OBJECT_TYPE_ALL_ACCESS
Definition: nt_native.h:1248
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3402
#define DIRECTORY_ALL_ACCESS
Definition: nt_native.h:1259
@ NotificationEvent
OBJECT_TYPE
Definition: ntobjenum.h:13
PHANDLE_TABLE NTAPI ExCreateHandleTable(IN PEPROCESS Process OPTIONAL)
Definition: handle.c:801
PSECURITY_DESCRIPTOR SePublicDefaultUnrestrictedSd
Definition: sd.c:17
#define L(x)
Definition: ntvdm.h:50
VOID NTAPI ObpReapObject(IN PVOID Unused)
Definition: oblife.c:220
POBJECT_DIRECTORY ObpTypeDirectoryObject
Definition: obname.c:20
VOID NTAPI ObpDeleteObjectType(IN PVOID Object)
Definition: oblife.c:1417
PHANDLE_TABLE ObpKernelHandleTable
Definition: obhandle.c:20
NTSTATUS NTAPI ObpCreateDosDevicesDirectory(VOID)
Definition: obname.c:177
PVOID NTAPI ObpLookupEntryDirectory(IN POBJECT_DIRECTORY Directory, IN PUNICODE_STRING Name, IN ULONG Attributes, IN UCHAR SearchShadow, IN POBP_LOOKUP_CONTEXT Context)
Definition: obdir.c:158
KGUARDED_MUTEX ObpDeviceMapLock
Definition: oblife.c:24
BOOLEAN NTAPI ObpInsertEntryDirectory(IN POBJECT_DIRECTORY Parent, IN POBP_LOOKUP_CONTEXT Context, IN POBJECT_HEADER ObjectHeader)
Definition: obdir.c:45
WORK_QUEUE_ITEM ObpReaperWorkItem
Definition: oblife.c:28
POBJECT_DIRECTORY ObpRootDirectoryObject
Definition: obname.c:19
NTSTATUS NTAPI ObpParseSymbolicLink(IN PVOID ParsedObject, IN PVOID ObjectType, IN OUT PACCESS_STATE AccessState, IN KPROCESSOR_MODE AccessMode, IN ULONG Attributes, IN OUT PUNICODE_STRING FullPath, IN OUT PUNICODE_STRING RemainingName, IN OUT PVOID Context OPTIONAL, IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL, OUT PVOID *NextObject)
Definition: oblink.c:431
VOID NTAPI ObpDeleteSymbolicLink(IN PVOID ObjectBody)
NTSTATUS NTAPI ObpInitSdCache(VOID)
Definition: obsdcach.c:61
FORCEINLINE VOID ObpAcquireLookupContextLock(IN POBP_LOOKUP_CONTEXT Context, IN POBJECT_DIRECTORY Directory)
Locks an object directory lookup context for performing lookup operations (insertions/deletions) in a...
Definition: ob_x.h:281
FORCEINLINE VOID ObpInitializeLookupContext(IN POBP_LOOKUP_CONTEXT Context)
Initializes a new object directory lookup context. Used for lookup operations (insertions/deletions) ...
Definition: ob_x.h:258
FORCEINLINE VOID ObpReleaseLookupContext(IN POBP_LOOKUP_CONTEXT Context)
Releases an initialized object directory lookup context. Unlocks it if necessary, and dereferences th...
Definition: ob_x.h:323
NTSTATUS NTAPI NtCreateDirectoryObject(OUT PHANDLE DirectoryHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
Definition: obdir.c:765
VOID NTAPI PsInitializeQuotaSystem(VOID)
Initializes the quota system during boot phase of the system, which sets up the default quota block t...
Definition: quota.c:443
BOOLEAN NTAPI ObInit2(VOID)
Definition: obinit.c:136
ULONG ObpInitializationPhase
Definition: obinit.c:54
GENERIC_MAPPING ObpSymbolicLinkMapping
Definition: obinit.c:38
static NTSTATUS NTAPI ObpCreateKernelObjectsSD(OUT PSECURITY_DESCRIPTOR *SecurityDescriptor)
Definition: obinit.c:65
GENERIC_MAPPING ObpTypeMapping
Definition: obinit.c:19
GENERIC_MAPPING ObpDirectoryMapping
Definition: obinit.c:27
NTSTATUS NTAPI ObCreateObjectType(IN PUNICODE_STRING TypeName, IN POBJECT_TYPE_INITIALIZER ObjectTypeInitializer, IN PVOID Reserved, OUT POBJECT_TYPE *ObjectType)
Definition: oblife.c:1136
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
Definition: obref.c:494
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
POBJECT_DIRECTORY Directory
Definition: obtypes.h:432
UNICODE_STRING Name
Definition: obtypes.h:433
GENERIC_MAPPING GenericMapping
Definition: obtypes.h:358
OB_DELETE_METHOD DeleteProcedure
Definition: obtypes.h:369
OB_PARSE_METHOD ParseProcedure
Definition: obtypes.h:370
ULONG DefaultNonPagedPoolCharge
Definition: obtypes.h:365
LIST_ENTRY TypeList
Definition: obtypes.h:382
#define TAG_SD
Definition: tag.h:153
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
#define ExInitializeWorkItem(Item, Routine, Context)
Definition: exfuncs.h:265
#define PsGetCurrentProcess
Definition: psfuncs.h:17

Referenced by ExpInitializeExecutive(), and Phase1InitializationDiscard().

◆ ObpCreateKernelObjectsSD()

static NTSTATUS NTAPI ObpCreateKernelObjectsSD ( OUT PSECURITY_DESCRIPTOR SecurityDescriptor)
static

Definition at line 65 of file obinit.c.

66{
68 PACL Dacl;
69 ULONG AclSize, SdSize;
71
72 AclSize = sizeof(ACL) +
73 sizeof(ACE) + RtlLengthSid(SeWorldSid) +
76
77 SdSize = sizeof(SECURITY_DESCRIPTOR) + AclSize;
78
79 /* Allocate the SD and ACL */
81 if (Sd == NULL)
82 {
84 }
85
86 /* Initialize the SD */
89 if (!NT_SUCCESS(Status))
90 goto done;
91
92 Dacl = (PACL)((INT_PTR)Sd + sizeof(SECURITY_DESCRIPTOR));
93
94 /* Initialize the DACL */
96
97 /* Add the ACEs */
101 SeWorldSid);
102
107
112
113 /* Attach the DACL to the SD */
115 TRUE,
116 Dacl,
117 FALSE);
118 if (!NT_SUCCESS(Status))
119 goto done;
120
121 *SecurityDescriptor = Sd;
122
123done:
124 if (!NT_SUCCESS(Status))
125 {
126 if (Sd != NULL)
128 }
129
130 return Status;
131}
#define GENERIC_READ
Definition: compat.h:135
NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL, DWORD, DWORD, PSID)
NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR, BOOLEAN, PACL, BOOLEAN)
struct _ACL ACL
struct _SECURITY_DESCRIPTOR SECURITY_DESCRIPTOR
struct _ACL * PACL
Definition: security.c:105
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
Definition: rtlfuncs.h:1593
NTSYSAPI NTSTATUS NTAPI RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision)
NTSYSAPI ULONG NTAPI RtlLengthSid(IN PSID Sid)
Definition: sid.c:150
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Revision)
struct _ACE ACE
#define GENERIC_ALL
Definition: nt_native.h:92
PSID SeLocalSystemSid
Definition: sid.c:38
PSID SeAliasAdminsSid
Definition: sid.c:41
PSID SeWorldSid
Definition: sid.c:25
Definition: rtltypes.h:993
int32_t INT_PTR
Definition: typedefs.h:64
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:191
#define SECURITY_DESCRIPTOR_REVISION
Definition: setypes.h:58
#define ACL_REVISION
Definition: setypes.h:39

Referenced by ObInitSystem().

◆ PsInitializeQuotaSystem()

VOID NTAPI PsInitializeQuotaSystem ( VOID  )

Initializes the quota system during boot phase of the system, which sets up the default quota block that is used across several processes.

Returns
Nothing.

Definition at line 443 of file quota.c.

444{
445 /* Initialize the default block */
447
448 /* Assign the default quota limits */
452
453 /*
454 * Set up the count references as the
455 * default block will going to be used.
456 */
459
460 /* Assign that block to initial process */
462}
@ PsNonPagedPool
Definition: pstypes.h:1021
@ PsPageFile
Definition: pstypes.h:1023
@ PsPagedPool
Definition: pstypes.h:1022
EPROCESS_QUOTA_BLOCK PspDefaultQuotaBlock
Definition: quota.c:16
EPROCESS_QUOTA_ENTRY QuotaEntry[PsQuotaTypes]
Definition: pstypes.h:1046
SIZE_T Limit
Definition: pstypes.h:1039
ULONG_PTR SIZE_T
Definition: typedefs.h:80

Referenced by ObInitSystem().

Variable Documentation

◆ ObpDirectoryMapping

GENERIC_MAPPING ObpDirectoryMapping
Initial value:
=
{
}
#define DIRECTORY_CREATE_OBJECT
Definition: nt_native.h:1256
#define DIRECTORY_QUERY
Definition: nt_native.h:1254
#define DIRECTORY_TRAVERSE
Definition: nt_native.h:1255
#define STANDARD_RIGHTS_READ
Definition: nt_native.h:65
#define STANDARD_RIGHTS_WRITE
Definition: nt_native.h:66
#define STANDARD_RIGHTS_EXECUTE
Definition: nt_native.h:67
#define DIRECTORY_CREATE_SUBDIRECTORY
Definition: nt_native.h:1257

Definition at line 27 of file obinit.c.

Referenced by ObInitSystem().

◆ ObpInitializationPhase

ULONG ObpInitializationPhase

Definition at line 54 of file obinit.c.

Referenced by ObInitSystem().

◆ ObpObjectSecurityMode

ULONG ObpObjectSecurityMode = 0

Definition at line 56 of file obinit.c.

Referenced by QSI_DEF().

◆ ObpProtectionMode

ULONG ObpProtectionMode = 0

Definition at line 57 of file obinit.c.

Referenced by ObpCreateDosDevicesDirectory(), and ObpGetDosDevicesProtection().

◆ ObpSymbolicLinkMapping

GENERIC_MAPPING ObpSymbolicLinkMapping

◆ ObpTraceLevel

ULONG ObpTraceLevel = 0

Definition at line 47 of file obinit.c.

◆ ObpTypeMapping

GENERIC_MAPPING ObpTypeMapping
Initial value:

Definition at line 19 of file obinit.c.

Referenced by ObInitSystem().

◆ ObSystemDeviceMap