diff --git a/reactos/include/ddk/psfuncs.h b/reactos/include/ddk/psfuncs.h index f339957da44..e4bea83ec96 100644 --- a/reactos/include/ddk/psfuncs.h +++ b/reactos/include/ddk/psfuncs.h @@ -1,4 +1,4 @@ -/* $Id: psfuncs.h,v 1.14 2001/08/21 20:13:05 chorns Exp $ +/* $Id: psfuncs.h,v 1.15 2001/11/21 18:44:09 ekohl Exp $ */ #ifndef _INCLUDE_DDK_PSFUNCS_H #define _INCLUDE_DDK_PSFUNCS_H @@ -54,7 +54,7 @@ VOID STDCALL PsImpersonateClient(struct _ETHREAD* Thread, UCHAR b, UCHAR c, SECURITY_IMPERSONATION_LEVEL Level); -VOID STDCALL PsRevertToSelf(struct _ETHREAD* Thread); +VOID STDCALL PsRevertToSelf(VOID); BOOLEAN STDCALL PsGetVersion (PULONG MajorVersion OPTIONAL, PULONG MinorVersion OPTIONAL, diff --git a/reactos/ntoskrnl/ntoskrnl.def b/reactos/ntoskrnl/ntoskrnl.def index 36ed8b246bc..ec2cb72dbe5 100644 --- a/reactos/ntoskrnl/ntoskrnl.def +++ b/reactos/ntoskrnl/ntoskrnl.def @@ -1,4 +1,4 @@ -; $Id: ntoskrnl.def,v 1.118 2001/11/04 00:16:13 ekohl Exp $ +; $Id: ntoskrnl.def,v 1.119 2001/11/21 18:44:50 ekohl Exp $ ; ; reactos/ntoskrnl/ntoskrnl.def ; @@ -608,8 +608,7 @@ PsProcessType DATA PsReferenceImpersonationToken@16 PsReferencePrimaryToken@4 ;PsReturnPoolQuota@12 -;PsRevertToSelf@0 <-- This is the original size -PsRevertToSelf@4 +PsRevertToSelf@0 ;PsSetCreateProcessNotifyRoutine@8 ;PsSetCreateThreadNotifyRoutine@4 ;PsSetLegoNotifyRoutine@4 diff --git a/reactos/ntoskrnl/ntoskrnl.edf b/reactos/ntoskrnl/ntoskrnl.edf index 18f4fdd9820..233a86d479e 100644 --- a/reactos/ntoskrnl/ntoskrnl.edf +++ b/reactos/ntoskrnl/ntoskrnl.edf @@ -1,4 +1,4 @@ -; $Id: ntoskrnl.edf,v 1.104 2001/11/04 00:16:13 ekohl Exp $ +; $Id: ntoskrnl.edf,v 1.105 2001/11/21 18:44:50 ekohl Exp $ ; ; reactos/ntoskrnl/ntoskrnl.def ; @@ -608,7 +608,7 @@ PsProcessType DATA PsReferenceImpersonationToken=PsReferenceImpersonationToken@16 PsReferencePrimaryToken=PsReferencePrimaryToken@4 ;PsReturnPoolQuota -PsRevertToSelf=PsRevertToSelf@4 +PsRevertToSelf=PsRevertToSelf@0 ;PsSetCreateProcessNotifyRoutine ;PsSetCreateThreadNotifyRoutine ;PsSetLegoNotifyRoutine diff --git a/reactos/ntoskrnl/ps/create.c b/reactos/ntoskrnl/ps/create.c index decb9ffd2b7..9ca613785ec 100644 --- a/reactos/ntoskrnl/ps/create.c +++ b/reactos/ntoskrnl/ps/create.c @@ -1,4 +1,4 @@ -/* $Id: create.c,v 1.40 2001/08/27 01:22:21 ekohl Exp $ +/* $Id: create.c,v 1.41 2001/11/21 18:44:25 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -82,17 +82,21 @@ PsAssignImpersonationToken(PETHREAD Thread, return(STATUS_SUCCESS); } -VOID STDCALL -PsRevertToSelf(PETHREAD Thread) +VOID STDCALL +PsRevertToSelf(VOID) { + PETHREAD Thread; + + Thread = PsGetCurrentThread(); + if (Thread->ActiveImpersonationInfo != 0) { - Thread->ActiveImpersonationInfo = 0; ObDereferenceObject(Thread->ImpersonationInfo->Token); + Thread->ActiveImpersonationInfo = 0; } } -VOID STDCALL +VOID STDCALL PsImpersonateClient(PETHREAD Thread, PACCESS_TOKEN Token, UCHAR b, @@ -128,7 +132,7 @@ PsImpersonateClient(PETHREAD Thread, Thread->ActiveImpersonationInfo = 1; } -PACCESS_TOKEN +PACCESS_TOKEN PsReferenceEffectiveToken(PETHREAD Thread, PTOKEN_TYPE TokenType, PUCHAR b,