Author: fireball
Date: Tue May 10 16:05:59 2011
New Revision: 51668
URL: http://svn.reactos.org/svn/reactos?rev=51668&view=rev
Log:
[NTDLL]
- Result of LdrQueryImageFileExecutionOptions() shouldn't be used as a return status. Always reset it to STATUS_SUCCESS whatever the function returns.
See bug #6231 for more details.
Modified:
trunk/reactos/dll/ntdll/ldr/ldrinit.c
Modified: trunk/reactos/dll/ntdll/ldr/ldrinit.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/ldrinit.c?re…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/ldrinit.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/ldr/ldrinit.c [iso-8859-1] Tue May 10 16:05:59 2011
@@ -591,6 +591,9 @@
sizeof(ULONG),
NULL);
if (!NT_SUCCESS(Status)) BreakOnDllLoad = 0;
+
+ /* Reset status back to STATUS_SUCCESS */
+ Status = STATUS_SUCCESS;
}
/* Break if aksed */
Author: fireball
Date: Tue May 10 15:48:54 2011
New Revision: 51667
URL: http://svn.reactos.org/svn/reactos?rev=51667&view=rev
Log:
Sam Arun Raj Seeniraj:
[WIN32CSR.DLL]
- Removed previous hack in CsrDefineDosDevice() that was stripping off extra trailing path separators.
[SUBST.EXE]
- The help message was not show aligned properly, fixing that.
See issue #993 for more details.
Modified:
trunk/reactos/base/system/subst/lang/en-US.rc
trunk/reactos/base/system/subst/lang/es-ES.rc
trunk/reactos/base/system/subst/lang/it-IT.rc
trunk/reactos/subsystems/win32/csrss/win32csr/file.c
Modified: trunk/reactos/base/system/subst/lang/en-US.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/en-…
==============================================================================
--- trunk/reactos/base/system/subst/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/system/subst/lang/en-US.rc [iso-8859-1] Tue May 10 15:48:54 2011
@@ -8,9 +8,11 @@
IDS_INVALID_PARAMETER2 "Invalid parameter - %s\n"
IDS_DRIVE_ALREAD_SUBSTED "Drive already SUBSTed\n"
IDS_FAILED_WITH_ERROCODE "Failed with error code 0x%x: %s\n"
- IDS_USAGE "Associates a path with a drive letter.\n\nSUBST [drive1: [drive2:]path]\nSUBST drive1: /D\n\n drive1: \
- Specifies a virtual drive to which you want to assign a path.\n \
- [drive2:]path Specifies a physical drive and path you want to assign to\n \
- a virtual drive.\n /D \
- Deletes a substituted (virtual) drive.\n\nType SUBST with no parameters to display a list of current virtual drives.\n"
+ IDS_USAGE "Associates a path with a drive letter.\n\n\
+SUBST [drive1: [drive2:]path]\n\
+SUBST drive1: /D\n\n\
+ drive1: Specifies a virtual drive to which you want to assign a path.\n\
+ [drive2:]path Specifies a physical drive and path you want to assign to\n a virtual drive.\n\
+ /D Deletes a substituted (virtual) drive.\n\n\
+Type SUBST with no parameters to display a list of current virtual drives.\n"
END
Modified: trunk/reactos/base/system/subst/lang/es-ES.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/es-…
==============================================================================
--- trunk/reactos/base/system/subst/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/system/subst/lang/es-ES.rc [iso-8859-1] Tue May 10 15:48:54 2011
@@ -8,9 +8,11 @@
IDS_INVALID_PARAMETER2 "Parámetro incorrecto - %s\n"
IDS_DRIVE_ALREAD_SUBSTED "Unidad ya sustituida\n"
IDS_FAILED_WITH_ERROCODE "Falla con código de error 0x%x: %s\n"
- IDS_USAGE "Asocia una ruta con una letra de unidad.\n\nSUBST [unidad1: [unidad2:]ruta]\nSUBST unidad1: /D\n\n unidad1: \
- Especifica una unidad virtual a la cual se quiere asignar una ruta.\n \
- [unidad2:]ruta Especifica una unidad física y una ruta a la cual asignar\n \
- una unidad virtual.\n /D \
- Elimina una unidad (virtual) substituida.\n\nEscribir SUBST sin parámetros para mostrar una lista de las unidades virtuales actuales.\n"
+ IDS_USAGE "Asocia una ruta con una letra de unidad.\n\n\
+SUBST [unidad1: [unidad2:]ruta]\n\
+SUBST unidad1: /D\n\n\
+ unidad1: Especifica una unidad virtual a la cual se quiere asignar una ruta.\n\
+ [unidad2:]ruta Especifica una unidad física y una ruta a la cual asignar\n una unidad virtual.\n\
+ /D Elimina una unidad (virtual) substituida.\n\n\
+Escribir SUBST sin parámetros para mostrar una lista de las unidades virtuales actuales.\n"
END
Modified: trunk/reactos/base/system/subst/lang/it-IT.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/lang/it-…
==============================================================================
--- trunk/reactos/base/system/subst/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/system/subst/lang/it-IT.rc [iso-8859-1] Tue May 10 15:48:54 2011
@@ -8,9 +8,11 @@
IDS_INVALID_PARAMETER2 "Parametro errato - %s\n"
IDS_DRIVE_ALREAD_SUBSTED "Unità già sostituita\n"
IDS_FAILED_WITH_ERROCODE "Interruzione con codice di errore 0x%x: %s\n"
- IDS_USAGE "Associa un percorso ad una lettera di unità.\n\nSUBST [unità1: [unità2:]percorso]\nSUBST unità1: /D\n\n unità1: \
- Specifica un'unità virtuale alla quale assegnare un percorso.\n \
- [unità2:]percorso Specifica un'unità fisica e un percorso da assegnare ad una\n \
- unità virtuale.\n /D \
- Elimina un'unità (virtuale) sostituita.\n\nDigitare SUBST senza parametri per mostrare un elenco delle unità virtuali attuali.\n"
+ IDS_USAGE "Associa un percorso ad una lettera di unità.\n\n\
+SUBST [unità1: [unità2:]percorso]\n\
+SUBST unità1: /D\n\n\
+ unità1: Specifica un'unità virtuale alla quale assegnare un percorso.\n\
+ [unità2:]percorso Specifica un'unità fisica e un percorso da assegnare ad una\n unità virtuale.\n\
+ /D Elimina un'unità (virtuale) sostituita.\n\n\
+Digitare SUBST senza parametri per mostrare un elenco delle unità virtuali attuali.\n"
END
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/file.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/file.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/file.c [iso-8859-1] Tue May 10 15:48:54 2011
@@ -98,17 +98,6 @@
RequestLinkTarget =
&Request->Data.DefineDosDeviceRequest.TargetName;
- /*
- * Strip off any trailing '\', if we leave a trailing slash the drive remains non-accessible.
- * So working around it for now.
- * FIXME: Need to fix this in the object manager ObpLookupObjectName()??, and remove this when the its fixed.
- */
- while (RequestLinkTarget->Length >= sizeof(WCHAR) &&
- RequestLinkTarget->Buffer[(RequestLinkTarget->Length/sizeof(WCHAR)) - 1] == L'\\')
- {
- RequestLinkTarget->Length -= sizeof(WCHAR);
- }
-
lpBuffer = (PWSTR) RtlAllocateHeap(Win32CsrApiHeap,
HEAP_ZERO_MEMORY,
RequestDeviceName.MaximumLength + 5 * sizeof(WCHAR));
Author: fireball
Date: Tue May 10 15:43:55 2011
New Revision: 51666
URL: http://svn.reactos.org/svn/reactos?rev=51666&view=rev
Log:
[NTOSKRNL]
- Sam Arun Raj Seeniraj: ObpLookupObjectName() used to reparse endlessly when a symlink points to itself, preventing this by limiting number of reparse attemtps.
See issue #993 for more details.
Modified:
trunk/reactos/ntoskrnl/ob/obname.c
Modified: trunk/reactos/ntoskrnl/ob/obname.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=5…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obname.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/obname.c [iso-8859-1] Tue May 10 15:43:55 2011
@@ -544,7 +544,7 @@
}
/* Reparse */
- while (Reparse)
+ while (Reparse && MaxReparse)
{
/* Get the name */
RemainingName = *ObjectName;
@@ -795,6 +795,7 @@
{
/* Reparse again */
Reparse = TRUE;
+ --MaxReparse;
/* Start over from root if we got sent back there */
if ((Status == STATUS_REPARSE_OBJECT) ||
Author: fireball
Date: Tue May 10 15:09:36 2011
New Revision: 51665
URL: http://svn.reactos.org/svn/reactos?rev=51665&view=rev
Log:
[NTOSKRNL]
- Make ObpParseSymbolicLink properly handle the case when target path has a trailing path separator. Based on findings by Samarunraj.
See issue #993 for more details.
Modified:
trunk/reactos/ntoskrnl/ob/oblink.c
Modified: trunk/reactos/ntoskrnl/ob/oblink.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblink.c?rev=5…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/oblink.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/oblink.c [iso-8859-1] Tue May 10 15:09:36 2011
@@ -374,7 +374,7 @@
POBJECT_SYMBOLIC_LINK SymlinkObject = (POBJECT_SYMBOLIC_LINK)ParsedObject;
PUNICODE_STRING TargetPath;
PWSTR NewTargetPath;
- ULONG LengthUsed, MaximumLength;
+ ULONG LengthUsed, MaximumLength, TempLength;
NTSTATUS Status;
PAGED_CODE();
@@ -411,9 +411,39 @@
return STATUS_OBJECT_TYPE_MISMATCH;
}
+ /* Check if this symlink is bound to a specific object */
+ if (SymlinkObject->LinkTargetObject)
+ {
+ UNIMPLEMENTED;
+ }
+
/* Set the target path and length */
TargetPath = &SymlinkObject->LinkTarget;
- LengthUsed = TargetPath->Length + RemainingName->Length;
+ TempLength = TargetPath->Length;
+
+ /*
+ * Strip off the extra trailing '\', if we don't do this we will end up
+ * adding a extra '\' between TargetPath and RemainingName
+ * causing caller's like ObpLookupObjectName() to fail.
+ */
+ if (TempLength && RemainingName->Length)
+ {
+ /* The target and remaining names aren't empty, so check for slashes */
+ if ((TargetPath->Buffer[TempLength / sizeof(WCHAR) - 1] ==
+ OBJ_NAME_PATH_SEPARATOR) &&
+ (RemainingName->Buffer[0] == OBJ_NAME_PATH_SEPARATOR))
+ {
+ /* Reduce the length by one to cut off the extra '\' */
+ TempLength -= sizeof(OBJ_NAME_PATH_SEPARATOR);
+ }
+ }
+
+ /* Calculate the new length */
+ LengthUsed = TempLength + RemainingName->Length;
+
+ /* Check if it's not too much */
+ if (LengthUsed > 0xFFF0)
+ return STATUS_NAME_TOO_LONG;
/* Optimization: check if the new name is shorter */
if (FullPath->MaximumLength <= LengthUsed)
@@ -436,13 +466,13 @@
if (RemainingName->Length)
{
/* Copy the new path */
- RtlMoveMemory((PVOID)((ULONG_PTR)NewTargetPath + TargetPath->Length),
+ RtlMoveMemory((PVOID)((ULONG_PTR)NewTargetPath + TempLength),
RemainingName->Buffer,
RemainingName->Length);
}
/* Copy the target path and null-terminate it */
- RtlCopyMemory(NewTargetPath, TargetPath->Buffer, TargetPath->Length);
+ RtlCopyMemory(NewTargetPath, TargetPath->Buffer, TempLength);
NewTargetPath[LengthUsed / sizeof(WCHAR)] = UNICODE_NULL;
/* If the optimization didn't work, free the old buffer */