https://git.reactos.org/?p=reactos.git;a=commitdiff;h=81a9ce44e9a1945c069e2…
commit 81a9ce44e9a1945c069e26cc7cd48c3dc91645c8
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Aug 18 16:41:30 2018 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Aug 18 16:41:30 2018 +0200
[FREELDR] Don't insert a driver into the BootDriver list twice (#755)
This happened for the livecd, where the cdfs driver was inserted twice - once since it is the …
[View More]driver for the boot device, and the 2nd time, because it was specified in the registry - which was then initialized twice by the kernel, leading to a name conflict when trying to create another device object, which resulted in the newly created device object to be dereferenced again and the driver unloaded. This can be seen from the debug message "(ntoskrnl\mm\ARM3\sysldr.c:955) Leaking drive [...]
---
boot/freeldr/freeldr/ntldr/wlregistry.c | 50 +++++++++++++++++++++++++++++++--
1 file changed, 48 insertions(+), 2 deletions(-)
diff --git a/boot/freeldr/freeldr/ntldr/wlregistry.c b/boot/freeldr/freeldr/ntldr/wlregistry.c
index b280250142..bf194027cf 100644
--- a/boot/freeldr/freeldr/ntldr/wlregistry.c
+++ b/boot/freeldr/freeldr/ntldr/wlregistry.c
@@ -684,6 +684,46 @@ WinLdrScanRegistry(IN OUT PLIST_ENTRY BootDriverListHead,
FrLdrHeapFree(GroupNameBuffer, TAG_WLDR_NAME);
}
+static
+BOOLEAN
+InsertInBootDriverList(
+ PLIST_ENTRY BootDriverListHead,
+ PBOOT_DRIVER_LIST_ENTRY BootDriverEntry)
+{
+ PBOOT_DRIVER_LIST_ENTRY DriverEntry;
+ PLIST_ENTRY ListEntry;
+
+ ASSERT(BootDriverEntry->FilePath.Buffer != NULL);
+ ASSERT(BootDriverEntry->RegistryPath.Buffer != NULL);
+
+ for (ListEntry = BootDriverListHead->Flink;
+ ListEntry != BootDriverListHead;
+ ListEntry = ListEntry->Flink)
+ {
+ DriverEntry = CONTAINING_RECORD(ListEntry,
+ BOOT_DRIVER_LIST_ENTRY,
+ Link);
+ if ((DriverEntry->FilePath.Buffer != NULL) &&
+ RtlEqualUnicodeString(&BootDriverEntry->FilePath,
+ &DriverEntry->FilePath,
+ TRUE))
+ {
+ return FALSE;
+ }
+
+ if ((DriverEntry->RegistryPath.Buffer != NULL) &&
+ RtlEqualUnicodeString(&BootDriverEntry->RegistryPath,
+ &DriverEntry->RegistryPath,
+ TRUE))
+ {
+ return FALSE;
+ }
+ }
+
+ InsertTailList(BootDriverListHead, &BootDriverEntry->Link);
+ return TRUE;
+}
+
BOOLEAN
WinLdrAddDriverToList(LIST_ENTRY *BootDriverListHead,
LPWSTR RegistryPath,
@@ -782,8 +822,14 @@ WinLdrAddDriverToList(LIST_ENTRY *BootDriverListHead,
if (!NT_SUCCESS(Status))
return FALSE;
- // Insert entry at top of the list
- InsertTailList(BootDriverListHead, &BootDriverEntry->Link);
+ // Insert entry into the list
+ if (!InsertInBootDriverList(BootDriverListHead, BootDriverEntry))
+ {
+ // It was already there, so delete our entry
+ if (BootDriverEntry->FilePath.Buffer) FrLdrHeapFree(BootDriverEntry->FilePath.Buffer, TAG_WLDR_NAME);
+ if (BootDriverEntry->RegistryPath.Buffer) FrLdrHeapFree(BootDriverEntry->RegistryPath.Buffer, TAG_WLDR_NAME);
+ FrLdrHeapFree(BootDriverEntry, TAG_WLDR_BDE);
+ }
return TRUE;
}
[View Less]
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0725098c74b0e4ddee927…
commit 0725098c74b0e4ddee927002169d394e0c024467
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sat Aug 18 11:11:31 2018 +0900
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sat Aug 18 13:18:03 2018 +0200
[NETSHELL] Fix the too long texts
---
dll/shellext/netshell/lang/en-US.rc | 4 ++--
dll/shellext/netshell/lang/ru-RU.rc | 2 +-
2 files changed, 3 …
[View More]insertions(+), 3 deletions(-)
diff --git a/dll/shellext/netshell/lang/en-US.rc b/dll/shellext/netshell/lang/en-US.rc
index 9f87a692d4..5274f06ca3 100644
--- a/dll/shellext/netshell/lang/en-US.rc
+++ b/dll/shellext/netshell/lang/en-US.rc
@@ -169,8 +169,8 @@ BEGIN
IDS_NETWORKSETTINGSSUBTITLE "Installs network software used to connect to other networks, computers, and the Internet."
IDS_NETWORKCOMPONENTTITLE "Network Components"
IDS_NETWORKCOMPONENTSUBTITLE "Determine which networking components are used on your computer. To add new components, click on Install."
- IDS_NETWORKDOMAINTITLE "Workgroup or Computer Domain"
- IDS_NETWORKDOMAINSUBTITLE "A domain is a group of computers defined by a network administrator. A workgroup is a group of computers sharing the same workgroup name."
+ IDS_NETWORKDOMAINTITLE "Workgroup or Network Domain"
+ IDS_NETWORKDOMAINSUBTITLE "Specify how the computer will be used - as part of a workgroup or as part of a network domain."
IDS_REACTOS_SETUP "ReactOS Setup"
IDS_WZD_DOMAIN_NAME "Setup cannot continue until you\nenter the name of your domain\nor workgroup."
END
diff --git a/dll/shellext/netshell/lang/ru-RU.rc b/dll/shellext/netshell/lang/ru-RU.rc
index 8d741bdf5f..55f564d0bc 100644
--- a/dll/shellext/netshell/lang/ru-RU.rc
+++ b/dll/shellext/netshell/lang/ru-RU.rc
@@ -170,7 +170,7 @@ BEGIN
IDS_NETWORKCOMPONENTTITLE "Сетевые компоненты"
IDS_NETWORKCOMPONENTSUBTITLE "Определяет, какие сетевые компоненты используются на вашем компьютере. Чтобы добавить новые, нажмите кнопку Установить."
IDS_NETWORKDOMAINTITLE "Рабочая группа или сетевой домен"
- IDS_NETWORKDOMAINSUBTITLE "Сетевой домен - это группа компьютеров, определенная сетевым администратором. Рабочая группа - это группа компьютеров, у которых одинаковое имя рабочей группы."
+ IDS_NETWORKDOMAINSUBTITLE "Укажите, как будет использоваться компьютер - в составе рабочей группы или как часть сетевого домена."
IDS_REACTOS_SETUP "Установка ReactOS"
IDS_WZD_DOMAIN_NAME "Невозможно продолжить установку, т.к. вы\nне ввели имя вашей рабочей группы или домена."
END
[View Less]
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=094a90ad4e7f14b67cc5e…
commit 094a90ad4e7f14b67cc5e532347e738b95189cec
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Feb 10 23:57:27 2018 +0100
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Fri Aug 17 22:08:37 2018 +0200
[NTOS:PS] Fix an issue with PROCESS_DEVICEMAP_INFORMATION size on 64 bit builds
The PROCESS_DEVICEMAP_INFORMATION union has 2 fields, one is a handle, …
[View More]the other one is a structure of 36 bytes (independent of architecture). The handle forces 64 bit alignment on 64 bit builds, making the structure 4 bytes bigger than on 32 bit builds. The site is checked in NtQueryInformationProcess (case ProcessDeviceMap). The expected size on x64 is the size of the Query structure without alignment. autocheck correctly passes the site of the Query union member, while smss passes [...]
---
base/system/smss/pagefile.c | 4 ++--
dll/win32/kernel32/client/file/disk.c | 11 ++++++-----
ntoskrnl/ps/query.c | 2 +-
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/base/system/smss/pagefile.c b/base/system/smss/pagefile.c
index bd4df1a5c9..6af9b21495 100644
--- a/base/system/smss/pagefile.c
+++ b/base/system/smss/pagefile.c
@@ -837,8 +837,8 @@ SmpCreateVolumeDescriptors(VOID)
/* Query the device map so we can get the drive letters */
Status = NtQueryInformationProcess(NtCurrentProcess(),
ProcessDeviceMap,
- &ProcessInformation,
- sizeof(ProcessInformation),
+ &ProcessInformation.Query,
+ sizeof(ProcessInformation.Query),
NULL);
if (!NT_SUCCESS(Status))
{
diff --git a/dll/win32/kernel32/client/file/disk.c b/dll/win32/kernel32/client/file/disk.c
index 7fe8061666..12751c6b1a 100644
--- a/dll/win32/kernel32/client/file/disk.c
+++ b/dll/win32/kernel32/client/file/disk.c
@@ -115,8 +115,8 @@ GetLogicalDrives(VOID)
/* Get the Device Map for this Process */
Status = NtQueryInformationProcess(NtCurrentProcess(),
ProcessDeviceMap,
- &ProcessDeviceMapInfo,
- sizeof(ProcessDeviceMapInfo),
+ &ProcessDeviceMapInfo.Query,
+ sizeof(ProcessDeviceMapInfo.Query),
NULL);
/* Return the Drive Map */
@@ -557,9 +557,10 @@ GetDriveTypeW(IN LPCWSTR lpRootPathName)
PROCESS_DEVICEMAP_INFORMATION DeviceMap;
/* Query the device map */
- Status = NtQueryInformationProcess(NtCurrentProcess(), ProcessDeviceMap,
- &DeviceMap,
- sizeof(PROCESS_DEVICEMAP_INFORMATION),
+ Status = NtQueryInformationProcess(NtCurrentProcess(),
+ ProcessDeviceMap,
+ &DeviceMap.Query,
+ sizeof(DeviceMap.Query),
NULL);
/* Zero output if we failed */
if (!NT_SUCCESS(Status))
diff --git a/ntoskrnl/ps/query.c b/ntoskrnl/ps/query.c
index 7a1767d54f..1f605be334 100644
--- a/ntoskrnl/ps/query.c
+++ b/ntoskrnl/ps/query.c
@@ -564,7 +564,7 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
/* DOS Device Map */
case ProcessDeviceMap:
- if (ProcessInformationLength != sizeof(PROCESS_DEVICEMAP_INFORMATION))
+ if (ProcessInformationLength != RTL_FIELD_SIZE(PROCESS_DEVICEMAP_INFORMATION, Query))
{
if (ProcessInformationLength == sizeof(PROCESS_DEVICEMAP_INFORMATION_EX))
{
[View Less]