Author: ion
Date: Thu Jul 25 18:32:52 2013
New Revision: 59584
URL:
http://svn.reactos.org/svn/reactos?rev=59584&view=rev
Log:
- Server 2003 and later return the remote PEB in the TIB->ArbitraryUserPointer. Do so
as well.
Modified:
trunk/reactos/ntoskrnl/ps/process.c
Modified: trunk/reactos/ntoskrnl/ps/process.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/process.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] Thu Jul 25 18:32:52 2013
@@ -838,6 +838,12 @@
/* Protect against bad user-mode pointer */
_SEH2_TRY
{
+ /* Hacky way of returning the PEB to the user-mode creator */
+ if ((Process->Peb) && (CurrentThread->Tcb.Teb))
+ {
+ CurrentThread->Tcb.Teb->NtTib.ArbitraryUserPointer = Process->Peb;
+ }
+
/* Save the process handle */
*ProcessHandle = hProcess;
}