[NDK/NTOSKRNK]

- Finally make EPROCESS::Session  PVOID, as it's supposed to be
- add missing Wow64Process member

svn path=/trunk/; revision=56263
This commit is contained in:
Timo Kreuzer 2012-03-28 18:46:30 +00:00
parent 5491e8fbde
commit 549c33f2ff
2 changed files with 16 additions and 12 deletions

View file

@ -1112,13 +1112,17 @@ typedef struct _EPROCESS
HARDWARE_PTE PageDirectoryPte; HARDWARE_PTE PageDirectoryPte;
ULONGLONG Filler; ULONGLONG Filler;
}; };
ULONG Session; // FIXME: PVOID PVOID Session;
CHAR ImageFileName[16]; CHAR ImageFileName[16];
LIST_ENTRY JobLinks; LIST_ENTRY JobLinks;
PVOID LockedPagesList; PVOID LockedPagesList;
LIST_ENTRY ThreadListHead; LIST_ENTRY ThreadListHead;
PVOID SecurityPort; PVOID SecurityPort;
#ifdef _M_AMD64
struct _WOW64_PROCESS *Wow64Process;
#else
PVOID PaeTop; PVOID PaeTop;
#endif
ULONG ActiveThreads; ULONG ActiveThreads;
#if (NTDDI_VERSION >= NTDDI_LONGHORN) #if (NTDDI_VERSION >= NTDDI_LONGHORN)
ULONG ImagePathHash; ULONG ImagePathHash;

View file

@ -880,10 +880,10 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
Status = STATUS_INFO_LENGTH_MISMATCH; Status = STATUS_INFO_LENGTH_MISMATCH;
break; break;
} }
/* Indicate success */ /* Indicate success */
Status = STATUS_SUCCESS; Status = STATUS_SUCCESS;
/* Protect write in SEH */ /* Protect write in SEH */
_SEH2_TRY _SEH2_TRY
{ {
@ -958,14 +958,14 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
{ {
/* Get the WOW64 process structure */ /* Get the WOW64 process structure */
#ifdef _WIN64 #ifdef _WIN64
Wow64 = Process->Wow64Process; Wow64 = (ULONG_PTR)Process->Wow64Process;
#else #else
Wow64 = 0; Wow64 = 0;
#endif #endif
/* Release the lock */ /* Release the lock */
ExReleaseRundownProtection(&Process->RundownProtect); ExReleaseRundownProtection(&Process->RundownProtect);
} }
/* Protect write with SEH */ /* Protect write with SEH */
_SEH2_TRY _SEH2_TRY
{ {
@ -982,9 +982,9 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
/* Dereference the process */ /* Dereference the process */
ObDereferenceObject(Process); ObDereferenceObject(Process);
break; break;
case ProcessExecuteFlags: case ProcessExecuteFlags:
/* Set return length */ /* Set return length */
Length = sizeof(ULONG); Length = sizeof(ULONG);
if (ProcessInformationLength != Length) if (ProcessInformationLength != Length)
@ -1322,7 +1322,7 @@ NtSetInformationProcess(IN HANDLE ProcessHandle,
if (!NT_SUCCESS(Status)) break; if (!NT_SUCCESS(Status)) break;
/* Write the session ID in the EPROCESS */ /* Write the session ID in the EPROCESS */
Process->Session = SessionInfo.SessionId; Process->Session = UlongToPtr(SessionInfo.SessionId); // HACK!!!
/* Check if the process also has a PEB */ /* Check if the process also has a PEB */
if (Process->Peb) if (Process->Peb)
@ -1811,11 +1811,11 @@ NtSetInformationProcess(IN HANDLE ProcessHandle,
KeSetAutoAlignmentProcess(&Process->Pcb, FALSE); KeSetAutoAlignmentProcess(&Process->Pcb, FALSE);
Status = STATUS_SUCCESS; Status = STATUS_SUCCESS;
break; break;
case ProcessUserModeIOPL: case ProcessUserModeIOPL:
/* Only TCB can do this */ /* Only TCB can do this */
if (!SeSinglePrivilegeCheck(SeTcbPrivilege, PreviousMode)) if (!SeSinglePrivilegeCheck(SeTcbPrivilege, PreviousMode))
{ {
/* Fail */ /* Fail */
DPRINT1("Need TCB to set IOPL\n"); DPRINT1("Need TCB to set IOPL\n");
@ -1863,7 +1863,7 @@ NtSetInformationProcess(IN HANDLE ProcessHandle,
/* Call Mm for the update */ /* Call Mm for the update */
Status = MmSetExecuteOptions(NoExecute); Status = MmSetExecuteOptions(NoExecute);
break; break;
/* We currently don't implement any of these */ /* We currently don't implement any of these */
case ProcessLdtInformation: case ProcessLdtInformation:
case ProcessLdtSize: case ProcessLdtSize:
@ -2319,7 +2319,7 @@ NtSetInformationThread(IN HANDLE ThreadHandle,
/* All done */ /* All done */
break; break;
case ThreadBreakOnTermination: case ThreadBreakOnTermination:
/* Check buffer length */ /* Check buffer length */