mirror of
https://github.com/reactos/reactos.git
synced 2024-11-03 21:34:00 +00:00
Assign a security descriptor to the root directory object.
svn path=/trunk/; revision=10185
This commit is contained in:
parent
23dac2681b
commit
491fa2e1ef
1 changed files with 31 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: namespc.c,v 1.45 2004/07/16 17:19:15 ekohl Exp $
|
||||
/* $Id: namespc.c,v 1.46 2004/07/17 20:34:42 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -17,6 +17,7 @@
|
|||
#include <internal/ob.h>
|
||||
#include <internal/io.h>
|
||||
#include <internal/pool.h>
|
||||
#include <internal/se.h>
|
||||
#include <rosrtl/string.h>
|
||||
|
||||
#define NDEBUG
|
||||
|
@ -348,6 +349,7 @@ ObInit(VOID)
|
|||
{
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
UNICODE_STRING Name;
|
||||
SECURITY_DESCRIPTOR SecurityDescriptor;
|
||||
|
||||
/* Initialize the security descriptor cache */
|
||||
ObpInitSdCache();
|
||||
|
@ -402,10 +404,32 @@ ObInit(VOID)
|
|||
RtlRosInitUnicodeStringFromLiteral(&ObTypeObjectType->TypeName,
|
||||
L"ObjectType");
|
||||
|
||||
/* create root directory */
|
||||
/* Create security descriptor */
|
||||
RtlCreateSecurityDescriptor(&SecurityDescriptor,
|
||||
SECURITY_DESCRIPTOR_REVISION1);
|
||||
|
||||
RtlSetOwnerSecurityDescriptor(&SecurityDescriptor,
|
||||
SeAliasAdminsSid,
|
||||
FALSE);
|
||||
|
||||
RtlSetGroupSecurityDescriptor(&SecurityDescriptor,
|
||||
SeLocalSystemSid,
|
||||
FALSE);
|
||||
|
||||
RtlSetDaclSecurityDescriptor(&SecurityDescriptor,
|
||||
TRUE,
|
||||
SePublicDefaultDacl,
|
||||
FALSE);
|
||||
|
||||
/* Create root directory */
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
NULL,
|
||||
OBJ_PERMANENT,
|
||||
NULL,
|
||||
&SecurityDescriptor);
|
||||
ObCreateObject(KernelMode,
|
||||
ObDirectoryType,
|
||||
NULL,
|
||||
&ObjectAttributes,
|
||||
KernelMode,
|
||||
NULL,
|
||||
sizeof(DIRECTORY_OBJECT),
|
||||
|
@ -413,14 +437,14 @@ ObInit(VOID)
|
|||
0,
|
||||
(PVOID*)&NameSpaceRoot);
|
||||
|
||||
/* create '\ObjectTypes' directory */
|
||||
/* Create '\ObjectTypes' directory */
|
||||
RtlRosInitUnicodeStringFromLiteral(&Name,
|
||||
L"\\ObjectTypes");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&Name,
|
||||
OBJ_PERMANENT,
|
||||
NULL,
|
||||
NULL);
|
||||
&SecurityDescriptor);
|
||||
ObCreateObject(KernelMode,
|
||||
ObDirectoryType,
|
||||
&ObjectAttributes,
|
||||
|
|
Loading…
Reference in a new issue