Author: greatlrd
Date: Sun Jul 23 23:14:19 2006
New Revision: 23253
URL:
http://svn.reactos.org/svn/reactos?rev=23253&view=rev
Log:
Patch from w3seek
Modified:
trunk/reactos/ntoskrnl/ps/kill.c
trunk/reactos/ntoskrnl/ps/process.c
trunk/reactos/ntoskrnl/ps/query.c
trunk/reactos/ntoskrnl/ps/security.c
trunk/reactos/ntoskrnl/ps/thread.c
Modified: trunk/reactos/ntoskrnl/ps/kill.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/kill.c?rev=232…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/kill.c (original)
+++ trunk/reactos/ntoskrnl/ps/kill.c Sun Jul 23 23:14:19 2006
@@ -27,7 +27,7 @@
IN PVOID ProcessOrThread,
IN PCHAR ImageName)
{
- UCHAR Action[2];
+ CHAR Action[2];
BOOLEAN Handled = FALSE;
PAGED_CODE();
@@ -121,7 +121,7 @@
PEPROCESS Process = NULL;
/* Loop every process */
- Process == PsGetNextProcess(Process);
+ Process = PsGetNextProcess(Process);
while (Process)
{
/* Make sure this isn't the idle or initial process */
@@ -132,7 +132,7 @@
}
/* Get the next process */
- Process == PsGetNextProcess(Process);
+ Process = PsGetNextProcess(Process);
}
}
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 (original)
+++ trunk/reactos/ntoskrnl/ps/process.c Sun Jul 23 23:14:19 2006
@@ -190,7 +190,7 @@
NTAPI
PspComputeQuantumAndPriority(IN PEPROCESS Process,
IN PSPROCESSPRIORITYMODE Mode,
- OUT PCHAR Quantum)
+ OUT PUCHAR Quantum)
{
ULONG i;
UCHAR LocalQuantum, MemoryPriority;
@@ -303,7 +303,7 @@
if (Immediate)
{
/* We are...loop every process */
- Process == PsGetNextProcess(Process);
+ Process = PsGetNextProcess(Process);
while (Process)
{
/*
@@ -339,7 +339,7 @@
KeSetQuantumProcess(&Process->Pcb, Quantum);
/* Get the next process */
- Process == PsGetNextProcess(Process);
+ Process = PsGetNextProcess(Process);
}
}
}
Modified: trunk/reactos/ntoskrnl/ps/query.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=23…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/query.c (original)
+++ trunk/reactos/ntoskrnl/ps/query.c Sun Jul 23 23:14:19 2006
@@ -483,7 +483,7 @@
NTSTATUS Status;
HANDLE PortHandle = NULL;
HANDLE TokenHandle = NULL;
- PROCESS_SESSION_INFORMATION SessionInfo;
+ PROCESS_SESSION_INFORMATION SessionInfo = {0};
PEPORT ExceptionPort;
PAGED_CODE();
Modified: trunk/reactos/ntoskrnl/ps/security.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/security.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/security.c (original)
+++ trunk/reactos/ntoskrnl/ps/security.c Sun Jul 23 23:14:19 2006
@@ -51,7 +51,7 @@
{
/* Free it */
ExFreePool(Thread->ImpersonationInfo);
- InterlockedAnd(&Thread->CrossThreadFlags,
+ InterlockedAnd((PLONG)&Thread->CrossThreadFlags,
~CT_ACTIVE_IMPERSONATION_INFO_BIT);
Thread->ImpersonationInfo = NULL;
}
@@ -537,7 +537,7 @@
if (Thread->ActiveImpersonationInfo)
{
/* Disable impersonation */
- InterlockedAnd(&Thread->CrossThreadFlags,
+ InterlockedAnd((PLONG)&Thread->CrossThreadFlags,
~CT_ACTIVE_IMPERSONATION_INFO_BIT);
/* Get the token */
@@ -584,7 +584,7 @@
if (Thread->ActiveImpersonationInfo)
{
/* Disable impersonation */
- InterlockedAnd(&Thread->CrossThreadFlags,
+ InterlockedAnd((PLONG)&Thread->CrossThreadFlags,
~CT_ACTIVE_IMPERSONATION_INFO_BIT);
/* Get the token */
@@ -632,7 +632,7 @@
else
{
/* Otherwise, enable impersonation */
- InterlockedOr(&Thread->CrossThreadFlags,
+ InterlockedOr((PLONG)&Thread->CrossThreadFlags,
CT_ACTIVE_IMPERSONATION_INFO_BIT);
}
@@ -811,7 +811,7 @@
{
/* Attempt to change the flag */
NewValue =
- InterlockedCompareExchange(&Thread->CrossThreadFlags,
+ InterlockedCompareExchange((PLONG)&Thread->CrossThreadFlags,
OldValue &~
CT_ACTIVE_IMPERSONATION_INFO_BIT,
OldValue);
@@ -880,13 +880,13 @@
Impersonation->Token = ImpersonationState->Token;
/* Enable impersonation */
- InterlockedOr(&Thread->CrossThreadFlags,
+ InterlockedOr((PLONG)&Thread->CrossThreadFlags,
CT_ACTIVE_IMPERSONATION_INFO_BIT);
}
else
{
/* Disable impersonation */
- InterlockedAnd(&Thread->CrossThreadFlags,
+ InterlockedAnd((PLONG)&Thread->CrossThreadFlags,
~CT_ACTIVE_IMPERSONATION_INFO_BIT);
}
Modified: trunk/reactos/ntoskrnl/ps/thread.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/thread.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/thread.c (original)
+++ trunk/reactos/ntoskrnl/ps/thread.c Sun Jul 23 23:14:19 2006
@@ -366,7 +366,7 @@
if (!NT_SUCCESS(Status))
{
/* Access state failed, thread is dead */
- InterlockedOr(&Thread->CrossThreadFlags, CT_DEAD_THREAD_BIT);
+ InterlockedOr((PLONG)&Thread->CrossThreadFlags, CT_DEAD_THREAD_BIT);
/* If we were suspended, wake it up */
if (CreateSuspended) KeResumeThread(&Thread->Tcb);
@@ -407,7 +407,7 @@
Status = _SEH_GetExceptionCode();
/* Thread insertion failed, thread is dead */
- InterlockedOr(&Thread->CrossThreadFlags, CT_DEAD_THREAD_BIT);
+ InterlockedOr((PLONG)&Thread->CrossThreadFlags, CT_DEAD_THREAD_BIT);
/* If we were suspended, wake it up */
if (CreateSuspended) KeResumeThread(&Thread->Tcb);
@@ -429,7 +429,7 @@
else
{
/* Thread insertion failed, thread is dead */
- InterlockedOr(&Thread->CrossThreadFlags, CT_DEAD_THREAD_BIT);
+ InterlockedOr((PLONG)&Thread->CrossThreadFlags, CT_DEAD_THREAD_BIT);
/* If we were suspended, wake it up */
if (CreateSuspended) KeResumeThread(&Thread->Tcb);
@@ -449,7 +449,7 @@
if (!NT_SUCCESS(Status))
{
/* Thread insertion failed, thread is dead */
- InterlockedOr(&Thread->CrossThreadFlags, CT_DEAD_THREAD_BIT);
+ InterlockedOr((PLONG)&Thread->CrossThreadFlags, CT_DEAD_THREAD_BIT);
/* If we were suspended, wake it up */
if (CreateSuspended) KeResumeThread(&Thread->Tcb);