Author: jmorlan
Date: Fri Aug 1 11:54:14 2008
New Revision: 35013
URL:
http://svn.reactos.org/svn/reactos?rev=35013&view=rev
Log:
- PspSetPrimaryToken: Fix some incorrect object dereferencing.
- WlxStartApplication: Fix handle leaks.
- Make userinit.exe exit when it's done everything. No need to wait for explorer to
exit first.
Modified:
trunk/reactos/base/system/userinit/userinit.c
trunk/reactos/dll/win32/msgina/msgina.c
trunk/reactos/ntoskrnl/ps/security.c
Modified: trunk/reactos/base/system/userinit/userinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/userinit/useri…
==============================================================================
--- trunk/reactos/base/system/userinit/userinit.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/userinit/userinit.c [iso-8859-1] Fri Aug 1 11:54:14 2008
@@ -263,7 +263,6 @@
StartAutoApplications(CSIDL_STARTUP);
StartAutoApplications(CSIDL_COMMON_STARTUP);
- WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
return TRUE;
Modified: trunk/reactos/dll/win32/msgina/msgina.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.c?…
==============================================================================
--- trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] Fri Aug 1 11:54:14 2008
@@ -247,6 +247,8 @@
CurrentDirectory,
&StartupInfo,
&ProcessInformation);
+ CloseHandle(ProcessInformation.hProcess);
+ CloseHandle(ProcessInformation.hThread);
CloseHandle(hAppToken);
if (!ret)
WARN("CreateProcessAsUserW() failed with error %lu\n", GetLastError());
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 [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/security.c [iso-8859-1] Fri Aug 1 11:54:14 2008
@@ -255,7 +255,7 @@
PreviousMode))
{
/* Failed, dereference */
- if (TokenHandle) ObDereferenceObject(Token);
+ if (TokenHandle) ObDereferenceObject(NewToken);
return STATUS_PRIVILEGE_NOT_HELD;
}
}
@@ -311,13 +311,10 @@
STANDARD_RIGHTS_ALL |
PROCESS_SET_QUOTA);
}
-
- /* Dereference the process */
- ObDereferenceObject(Process);
}
/* Dereference the token */
- if (Token) ObDereferenceObject(NewToken);
+ if (TokenHandle) ObDereferenceObject(NewToken);
return Status;
}