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 ***************************************************************/
21 ObAssignSecurity(IN PACCESS_STATE AccessState,
22 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
31 ObGetObjectSecurity(IN PVOID Object,
32 OUT PSECURITY_DESCRIPTOR *SecurityDescriptor,
33 OUT PBOOLEAN MemoryAllocated)
40 ObReleaseObjectSecurity(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
41 IN BOOLEAN MemoryAllocated)
48 NtQuerySecurityObject(IN HANDLE ObjectHandle,
49 IN CINT SecurityObjectInformationClass,
50 OUT PVOID SecurityObjectInformation,
52 OUT PULONG ReturnLength)
56 OBJECT_HANDLE_INFORMATION HandleInfo;
57 POBJECT_HEADER Header;
59 Status = ObReferenceObjectByHandle(ObjectHandle,
65 if (!NT_SUCCESS(Status))
70 Header = BODY_TO_HEADER(Object);
71 if (Header->ObjectType != NULL &&
72 Header->ObjectType->Security != NULL)
74 Status = Header->ObjectType->Security(Object,
75 SecurityObjectInformationClass,
76 SecurityObjectInformation,
78 *ReturnLength = Length;
82 Status = STATUS_NOT_IMPLEMENTED;
84 ObDereferenceObject(Object);
90 NtSetSecurityObject(IN HANDLE Handle,
91 IN SECURITY_INFORMATION SecurityInformation,
92 IN PSECURITY_DESCRIPTOR SecurityDescriptor)