Author: jjones
Date: Mon Jun 24 19:26:55 2013
New Revision: 59334
URL: http://svn.reactos.org/svn/reactos?rev=59334&view=rev
Log:
Edit contents of DUMMY.txt so that it becomes self-explanatory.
Modified:
branches/vs_jc/reactos/_IMAGES/DUMMY.txt
Modified: branches/vs_jc/reactos/_IMAGES/DUMMY.txt
URL: http://svn.reactos.org/svn/reactos/branches/vs_jc/reactos/_IMAGES/DUMMY.txt…
==============================================================================
--- branches/vs_jc/reactos/_IMAGES/DUMMY.txt [iso-8859-1] (original)
+++ branches/vs_jc/reactos/_IMAGES/DUMMY.txt [iso-8859-1] Mon Jun 24 19:26:55 2013
@@ -0,0 +1,22 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS _IMAGES
+ * FILE: _IMAGES/DUMMY.TXT
+ * PURPOSE: Give Visual Studio's build engine a source file from which it will try to generate a target file.
+ * PROGRAMMERS: J. C. Jones
+ */
+
+ /*
+ The sole purpose of this file is to stimulate Visual Studio's build engine. When deciding when to invoke a build
+ tool, such as a compiler, Visual Studio always has the intent of generating a target file from a source file. If
+ the specified target file is non-existent, or stale, relative to the source file, then the build tool will be
+ invoked. Therefore, if we create a dummy source file, such as this file, DUMMY.TXT, and specify a target file that will
+ never be actually generated, DUMMY.ZZZ, then each time Visual Studio examines whether to build DUMMY.ZZZ, it
+ will always conclude that the answer is "Yes. Try to build DUMMY.TXT." In this way, we can force an operation
+ to occur, always, for a project.
+
+ In this particular case, we use this technique to build ReactOS target images that can be booted, installed, etc.
+ The creation of a CD, for example, by copying and packing files, is ~always~ done, no matter what might have
+ occured previously. This same DUMMY.TXT file is used for several Visual Studio projects in the image directory.
+ That is why DUMMY.TXT is an immediate child of the directory _IMAGE.
+ */
Author: hbelusca
Date: Sun Jun 23 23:22:38 2013
New Revision: 59327
URL: http://svn.reactos.org/svn/reactos?rev=59327&view=rev
Log:
Revert an unwanted change committed by error.
Modified:
trunk/reactos/win32ss/user/consrv/condrv/console.c
Modified: trunk/reactos/win32ss/user/consrv/condrv/console.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/consrv/condrv…
==============================================================================
--- trunk/reactos/win32ss/user/consrv/condrv/console.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/consrv/condrv/console.c [iso-8859-1] Sun Jun 23 23:22:38 2013
@@ -549,7 +549,7 @@
Console->TermIFace.Console = Console;
/* Initialize the frontend AFTER having attached it to the console */
- DPRINT1("Finish initialization of frontend\n");
+ DPRINT("Finish initialization of frontend\n");
Status = Console->TermIFace.Vtbl->InitFrontEnd(&Console->TermIFace, Console);
if (!NT_SUCCESS(Status))
{
@@ -565,9 +565,9 @@
/* Copy buffer contents to screen */
// FrontEnd.Draw();
// ConioDrawConsole(Console);
- DPRINT1("Console drawn\n");
-
- DPRINT1("Terminal FrontEnd initialization done\n");
+ DPRINT("Console drawn\n");
+
+ DPRINT("Terminal FrontEnd initialization done\n");
return STATUS_SUCCESS;
}
@@ -584,7 +584,7 @@
/* Detach the frontend from the console */
RtlZeroMemory(&Console->TermIFace, sizeof(Console->TermIFace));
- DPRINT1("Terminal FrontEnd unregistered\n");
+ DPRINT("Terminal FrontEnd unregistered\n");
return STATUS_SUCCESS;
}
@@ -597,28 +597,26 @@
* Forbid validation of any console by other threads
* during the deletion of this console.
*/
- // ConDrvLockConsoleListExclusive();
-
- // /* Check the existence of the console, and if it's ok, continue */
- // if (!ConDrvValidateConsolePointer(Console))
- // {
- // /* Unlock the console list and return */
- // ConDrvUnlockConsoleList();
- // return;
- // }
-
- // /*
- // * If the console is already being destroyed
- // * (thus not running), just return.
- // */
- // if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE))
- // {
- // /* Unlock the console list and return */
- // ConDrvUnlockConsoleList();
- // return;
- // }
-
- if (!ConDrvValidateConsole(Console, CONSOLE_RUNNING, TRUE)) return;
+ ConDrvLockConsoleListExclusive();
+
+ /* Check the existence of the console, and if it's ok, continue */
+ if (!ConDrvValidateConsolePointer(Console))
+ {
+ /* Unlock the console list and return */
+ ConDrvUnlockConsoleList();
+ return;
+ }
+
+ /*
+ * If the console is already being destroyed
+ * (thus not running), just return.
+ */
+ if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE))
+ {
+ /* Unlock the console list and return */
+ ConDrvUnlockConsoleList();
+ return;
+ }
/*
* We are about to be destroyed. Signal it to other people
@@ -626,9 +624,6 @@
* they cannot longer validate the console.
*/
Console->State = CONSOLE_TERMINATING;
-
- /* We really delete the console. Reset the count to be sure. */
- Console->ReferenceCount = 0;
/*
* Allow other threads to finish their job: basically, unlock
@@ -639,25 +634,14 @@
* can see that we are in fact already deleting the console.
*/
LeaveCriticalSection(&Console->Lock);
- // ConDrvUnlockConsoleList();
+ ConDrvUnlockConsoleList();
/* FIXME: Send a terminate message to all the processes owning this console */
- /* Close all the applications which are linked to this console */
- /*
- * FIXME: Windows will wait up to 5 seconds for the thread to exit.
- * We shouldn't wait here, though, since the console lock is entered.
- * A copy of the thread list probably needs to be made.
- */
- // ConDrvConsoleProcessCtrlEvent(Console, 0, CTRL_CLOSE_EVENT);
- // DPRINT1("Apps closed\n");
- // FIXME: Be sure that, starting from here, there is NO app running
- // on this console anymore !!!!!
-
/* Cleanup the UI-oriented part */
- DPRINT1("Deregister console\n");
+ DPRINT("Deregister console\n");
ConDrvDeregisterFrontEnd(Console);
- DPRINT1("Console deregistered\n");
+ DPRINT("Console deregistered\n");
/***
* Check that the console is in terminating state before continuing
@@ -665,36 +649,30 @@
* ...unless to cancel console deletion ?).
***/
- // ConDrvLockConsoleListExclusive();
-
- // /* Re-check the existence of the console, and if it's ok, continue */
- // if (!ConDrvValidateConsolePointer(Console))
- // {
- // /* Unlock the console list and return */
- // ConDrvUnlockConsoleList();
- // return;
- // }
-
- // if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_TERMINATING, TRUE))
- // {
- // ConDrvUnlockConsoleList();
- // return;
- // }
-
- if (!ConDrvValidateConsole(Console, CONSOLE_TERMINATING, TRUE)) return;
+ ConDrvLockConsoleListExclusive();
+
+ /* Re-check the existence of the console, and if it's ok, continue */
+ if (!ConDrvValidateConsolePointer(Console))
+ {
+ /* Unlock the console list and return */
+ ConDrvUnlockConsoleList();
+ return;
+ }
+
+ if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_TERMINATING, TRUE))
+ {
+ ConDrvUnlockConsoleList();
+ return;
+ }
/* We are now in destruction */
Console->State = CONSOLE_IN_DESTRUCTION;
- /////////////////////
- ConDrvLockConsoleListExclusive();
- /////////////////////
-
/* Remove the console from the list */
RemoveEntryList(&Console->Entry);
- /* Unlock the console list */
- ConDrvUnlockConsoleList();
+ /* We really delete the console. Reset the count to be sure. */
+ Console->ReferenceCount = 0;
/* Discard all entries in the input event queue */
PurgeInputBuffer(Console);
@@ -726,8 +704,8 @@
ConsoleFreeHeap(Console);
DPRINT("ConDrvDeleteConsole - Console destroyed\n");
- // /* Unlock the console list and return */
- // ConDrvUnlockConsoleList();
+ /* Unlock the console list and return */
+ ConDrvUnlockConsoleList();
}
Author: tfaber
Date: Sun Jun 23 22:10:47 2013
New Revision: 59325
URL: http://svn.reactos.org/svn/reactos?rev=59325&view=rev
Log:
[NTOS:SE]
- Fix pool corruption of the nastiest sort. Big thanks to Amine. Also thanks to MS for idiotic unsafe typedefs.
Modified:
trunk/reactos/ntoskrnl/se/token.c
Modified: trunk/reactos/ntoskrnl/se/token.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/token.c?rev=59…
==============================================================================
--- trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] Sun Jun 23 22:10:47 2013
@@ -657,7 +657,7 @@
*/
uLength = sizeof(SID_AND_ATTRIBUTES) * AccessToken->UserAndGroupCount;
- uLength += RtlLengthSid(User);
+ uLength += RtlLengthSid(User->Sid);
for (i = 0; i < GroupCount; i++)
uLength += RtlLengthSid(Groups[i].Sid);