2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: Security manager
5 * FILE: ntoskrnl/ob/security.c
8 * 26/07/98: Added stubs for security functions
11 /* INCLUDES *****************************************************************/
13 #include <ddk/ntddk.h>
14 #include <internal/ob.h>
16 #include <internal/debug.h>
18 /* FUNCTIONS ***************************************************************/
24 ObAssignSecurity(IN PACCESS_STATE AccessState
,
25 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
30 return(STATUS_NOT_IMPLEMENTED
);
38 ObGetObjectSecurity(IN PVOID Object
,
39 OUT PSECURITY_DESCRIPTOR
*SecurityDescriptor
,
40 OUT PBOOLEAN MemoryAllocated
)
43 return(STATUS_NOT_IMPLEMENTED
);
51 ObReleaseObjectSecurity(IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
52 IN BOOLEAN MemoryAllocated
)
62 NtQuerySecurityObject(IN HANDLE Handle
,
63 IN SECURITY_INFORMATION SecurityInformation
,
64 OUT PSECURITY_DESCRIPTOR SecurityDescriptor
,
66 OUT PULONG ResultLength
)
68 POBJECT_HEADER Header
;
72 Status
= ObReferenceObjectByHandle(Handle
,
78 if (!NT_SUCCESS(Status
))
83 Header
= BODY_TO_HEADER(Object
);
84 if (Header
->ObjectType
!= NULL
&&
85 Header
->ObjectType
->Security
!= NULL
)
87 Status
= Header
->ObjectType
->Security(Object
,
88 QuerySecurityDescriptor
,
92 *ResultLength
= Length
;
96 Status
= STATUS_NOT_IMPLEMENTED
;
99 ObDereferenceObject(Object
);
109 NtSetSecurityObject(IN HANDLE Handle
,
110 IN SECURITY_INFORMATION SecurityInformation
,
111 IN PSECURITY_DESCRIPTOR SecurityDescriptor
)
113 POBJECT_HEADER Header
;
117 Status
= ObReferenceObjectByHandle(Handle
,
123 if (!NT_SUCCESS(Status
))
128 Header
= BODY_TO_HEADER(Object
);
129 if (Header
->ObjectType
!= NULL
&&
130 Header
->ObjectType
->Security
!= NULL
)
132 Status
= Header
->ObjectType
->Security(Object
,
133 SetSecurityDescriptor
,
140 Status
= STATUS_NOT_IMPLEMENTED
;
143 ObDereferenceObject(Object
);