mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Implemented ObQueryObjectAuditingByHandle().
svn path=/trunk/; revision=6399
This commit is contained in:
parent
b9d355dbb5
commit
4baf0a9002
3 changed files with 37 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
; $Id: ntoskrnl.def,v 1.167 2003/09/25 20:02:09 ekohl Exp $
|
||||
; $Id: ntoskrnl.def,v 1.168 2003/10/21 21:46:39 ekohl Exp $
|
||||
;
|
||||
; reactos/ntoskrnl/ntoskrnl.def
|
||||
;
|
||||
|
@ -619,7 +619,7 @@ ObMakeTemporaryObject@4
|
|||
ObOpenObjectByName@28
|
||||
ObOpenObjectByPointer@28
|
||||
ObQueryNameString@16
|
||||
;ObQueryObjectAuditingByHandle@8
|
||||
ObQueryObjectAuditingByHandle@8
|
||||
@ObfDereferenceObject@4
|
||||
@ObfReferenceObject@4
|
||||
ObReferenceObjectByHandle@24
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: ntoskrnl.edf,v 1.154 2003/09/25 20:02:09 ekohl Exp $
|
||||
; $Id: ntoskrnl.edf,v 1.155 2003/10/21 21:46:39 ekohl Exp $
|
||||
;
|
||||
; reactos/ntoskrnl/ntoskrnl.def
|
||||
;
|
||||
|
@ -620,7 +620,7 @@ ObMakeTemporaryObject=ObMakeTemporaryObject@4
|
|||
ObOpenObjectByName=ObOpenObjectByName@28
|
||||
ObOpenObjectByPointer=ObOpenObjectByPointer@28
|
||||
ObQueryNameString=ObQueryNameString@16
|
||||
;ObQueryObjectAuditingByHandle=ObQueryObjectAuditingByHandle@8
|
||||
ObQueryObjectAuditingByHandle=ObQueryObjectAuditingByHandle@8
|
||||
ObfDereferenceObject=@ObfDereferenceObject@4
|
||||
ObfReferenceObject=@ObfReferenceObject@4
|
||||
ObReferenceObjectByHandle=ObReferenceObjectByHandle@24
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: handle.c,v 1.53 2003/10/21 15:50:51 ekohl Exp $
|
||||
/* $Id: handle.c,v 1.54 2003/10/21 21:46:02 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -684,6 +684,38 @@ NTSTATUS ObCreateHandle(PEPROCESS Process,
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS STDCALL
|
||||
ObQueryObjectAuditingByHandle(IN HANDLE Handle,
|
||||
OUT PBOOLEAN GenerateOnClose)
|
||||
{
|
||||
PEPROCESS Process;
|
||||
KIRQL oldIrql;
|
||||
PHANDLE_REP HandleRep;
|
||||
|
||||
DPRINT("ObQueryObjectAuditingByHandle(Handle %x)\n", Handle);
|
||||
|
||||
Process = PsGetCurrentProcess();
|
||||
|
||||
KeAcquireSpinLock(&Process->HandleTable.ListLock, &oldIrql);
|
||||
HandleRep = ObpGetObjectByHandle(&Process->HandleTable,
|
||||
Handle);
|
||||
if (HandleRep == NULL)
|
||||
{
|
||||
KeReleaseSpinLock(&Process->HandleTable.ListLock, oldIrql);
|
||||
return STATUS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
*GenerateOnClose = (BOOLEAN)((ULONG_PTR)HandleRep->ObjectBody | OB_HANDLE_FLAG_AUDIT);
|
||||
|
||||
KeReleaseSpinLock(&Process->HandleTable.ListLock, oldIrql);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue