mirror of
https://github.com/reactos/reactos.git
synced 2025-05-10 20:27:45 +00:00
[NTDLL/LDR]
- Fix acquiring image path from process parameters block (the if condition was inverted so that normalization didn't occur when it should). - Reenable the image options initialization code. svn path=/trunk/; revision=53327
This commit is contained in:
parent
a95d8d2213
commit
2cbe366a65
1 changed files with 6 additions and 7 deletions
|
@ -1311,16 +1311,15 @@ NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
LdrpInitializeExecutionOptions(PUNICODE_STRING ImagePathName, PPEB Peb, PHKEY OptionsKey)
|
LdrpInitializeExecutionOptions(PUNICODE_STRING ImagePathName, PPEB Peb, PHKEY OptionsKey)
|
||||||
{
|
{
|
||||||
//NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
//HKEY KeyHandle;
|
HKEY KeyHandle;
|
||||||
//ULONG ExecuteOptions, MinimumStackCommit = 0, GlobalFlag;
|
ULONG ExecuteOptions, MinimumStackCommit = 0, GlobalFlag;
|
||||||
|
|
||||||
/* Return error if we were not provided a pointer where to save the options key handle */
|
/* Return error if we were not provided a pointer where to save the options key handle */
|
||||||
if (!OptionsKey) return STATUS_INVALID_HANDLE;
|
if (!OptionsKey) return STATUS_INVALID_HANDLE;
|
||||||
|
|
||||||
/* Zero initialize the optinos key pointer */
|
/* Zero initialize the optinos key pointer */
|
||||||
*OptionsKey = NULL;
|
*OptionsKey = NULL;
|
||||||
#if 0
|
|
||||||
|
|
||||||
/* Open the options key */
|
/* Open the options key */
|
||||||
Status = LdrOpenImageFileOptionsKey(ImagePathName, 0, &KeyHandle);
|
Status = LdrOpenImageFileOptionsKey(ImagePathName, 0, &KeyHandle);
|
||||||
|
@ -1409,7 +1408,7 @@ LdrpInitializeExecutionOptions(PUNICODE_STRING ImagePathName, PPEB Peb, PHKEY Op
|
||||||
// Status = LdrpInitializeApplicationVerifierPackage(ImagePathName, Peb, 1, FALSE);
|
// Status = LdrpInitializeApplicationVerifierPackage(ImagePathName, Peb, 1, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1466,8 +1465,8 @@ LdrpInitializeProcess(IN PCONTEXT Context,
|
||||||
/* Get the image path */
|
/* Get the image path */
|
||||||
ImagePath = Peb->ProcessParameters->ImagePathName.Buffer;
|
ImagePath = Peb->ProcessParameters->ImagePathName.Buffer;
|
||||||
|
|
||||||
/* Check if it's normalized */
|
/* Check if it's not normalized */
|
||||||
if (Peb->ProcessParameters->Flags & RTL_USER_PROCESS_PARAMETERS_NORMALIZED)
|
if (!(Peb->ProcessParameters->Flags & RTL_USER_PROCESS_PARAMETERS_NORMALIZED))
|
||||||
{
|
{
|
||||||
/* Normalize it*/
|
/* Normalize it*/
|
||||||
ImagePath = (PWSTR)((ULONG_PTR)ImagePath + (ULONG_PTR)Peb->ProcessParameters);
|
ImagePath = (PWSTR)((ULONG_PTR)ImagePath + (ULONG_PTR)Peb->ProcessParameters);
|
||||||
|
|
Loading…
Reference in a new issue