Commit Graph

322 Commits

Author SHA1 Message Date
Joachim Henze
09dde2cff9
[REACTOS] "http://www.reactos" -> "https://reactos" (#5043)
To harmonize, to save some bytes, and last but not least for security reasons.
This can be understood as an addendum to (#2619).
2023-02-06 17:01:52 +03:00
Cătălin Gabriel Drăghiță
911162a1c7
[TRANSLATIONS] Email update (#4974) 2023-01-03 19:47:55 +01:00
Joachim Henze
e54c7fa740 [WINLOGON] Update german translation de-DE.rc
Addendum to 0.4.15-dev-2358-g 5f03339239
to avoid regressing the german translation compared to releases/0.4.14
2022-12-14 23:27:37 +01:00
Joachim Henze
bcb9abc133 [SYSDM][SMSS] Addendum to (#4843) (#4844) CORE-18574
[SYSDM] Prevent my german-teacher from getting a heart-attack by that misplaced comma.

[SMSS] Prevent myself from getting a heart-attack by that superfluous dot.

Furthermore this addendum serves the purpose of actually linking both PRs
and their 4 previous commits to the actual JIRA ticket CORE-18754, which wasn't
the case before:
0.4.15-dev-5392-g 04b2d35f5b
0.4.15-dev-5391-g a8e06d92e8

0.4.15-dev-5390-g a4274ad548
0.4.15-dev-5389-g 5dc43c0f32
2022-11-16 23:08:52 +01:00
Hermès Bélusca-Maïto
a4274ad548
[SMSS][NTOS:MM] Implement the architecture-specific pagefile size limits + code review. (#4843)
What we have:
- Maximum number of pagefiles: 16
- Minimum pagefile size: 256 pages (1 MB when page size = 4096 bytes)
- Maximum pagefile size:
  * 32-bit platforms: (1024 * 1024 - 1) pages (~ 4095 MB)
  * x86 with PAE support: same size as for AMD x64
  * x64 platform:  (4 * 1024 * 1024 * 1024 - 1) pages (~ 16 TB)
  * IA64 platform: (8 * 1024 * 1024 * 1024 - 1) pages (~ 32 TB)

Those are the values as supported and verified by the NT kernel.
Now,  user-mode programs (including SMSS.EXE)  have different opinions
on these, namely, they consider estimates directly in MB, respectively:
4095 MB, (16 * 1024 * 1024) MB, and (32 * 1024 * 1024) MB
(verified on Win2k3 and Win7 32 and 64 bits).
Also here, the minimum pagefile size is set to 2 MB.

Starting Windows 8+ (and 10), those values change slightly, and are
still not fully synchronized between NTOS:MM and SMSS. Finally, while
(x86 PAE and) AMD64 and ARM64 seem to share the maximum pagefile
size limit, 32-bit ARMv7 appears to use different limits than regular
x86 (2 GB instead of 4).

Please keep those values as they are for NT compatibility!

See the following references:
https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/mm/modwrite/create.htm
https://techcommunity.microsoft.com/t5/ask-the-performance-team/what-is-the-page-file-for-anyway/ba-p/372608
+ Manual extraction of the values from different NT 6.2,6.3,10 builds.

[SMSS] Fill out in particular the x86-specific case for PAE.

[NTOS:MM] Some cleanup in the NtCreatePagingFile() code, namely:
- Clarify some comments;
- Validate the lower and upper bounds of the Minimum and Maximum sizes
  (based on Windows behaviour as explained by Geoff + manual tests).
- Open the pagefile in case-insensitive;
- Simplify the loop that finds an existing matching pagefile;
- Simplify some failure exit paths;
- Add a "Missing validation steps TODO" comment block explaining the
  existing code-hole.
2022-11-16 21:54:31 +01:00
Hermès Bélusca-Maïto
5dc43c0f32
[SMSS] Improve some comments. 2022-11-16 21:54:21 +01:00
Hermès Bélusca-Maïto
2dddbd5c54
[SMSS] Fix three SmpLoadSubSystem bugs related to the SB_CREATE_SESSION callback.
This fixes starting the Windows 2000 POSIX subsystem in ReactOS.

- The CreateSession pointer was initialized against the SbApiMsg variable, but
  it was the other SbApiMsg2 that was being initialized and sent through LPC.

- Do not overwrite the MuSessionId (Terminal Services session ID) variable with
  the generated environment subsystem session ID from SmpAllocateSessionId().

- Actually initialize the SbApiMsg ApiNumber for the CreateSession LPC call.

(dll\win32\kernel32\client\proc.c:3690) Retrying with: POSIX /P C:\ReactOS\system32\posix\ls.exe /C ls
Breakpoint 1 hit
csrsrv!CsrSbApiRequestThread+0x64:
001b:1000ac34 837dfc00        cmp     dword ptr [ebp-4],0
kd> ??ReceiveMsg
struct _SB_API_MSG
   +0x000 h                : _PORT_MESSAGE
   +0x018 ConnectionInfo   : _SB_CONNECTION_INFO
   +0x018 ApiNumber        : 0xcccccccc (No matching name)
   +0x01c ReturnValue      : 0n0
   +0x020 u                : <unnamed-tag>
kd> p
...
(base\system\smss\smsubsys.c:393) SMSS: SmpLoadSubSystem - NtRequestWaitReplyPort Failed with  Status c0000002 for sessionid 2
...
<Retrying>
...
(base\system\smss\smsubsys.c:393) SMSS: SmpLoadSubSystem - NtRequestWaitReplyPort Failed with  Status c0000002 for sessionid 3

All those bugs could have been avoided *IF*, rather than (badly) duplicating
its code, the existing SmpSbCreateSession() function had been used instead.

- "Not sure these field mean what I think they do -- but clear them" ... ◔_◔
  Those fields are related to the debug client interface (DbgUi) and session
  in case the subsystem being started is going to be debugged. These have
  nothing to do with the MuSessionId. Clarify this in the SB_CREATE_SESSION_MSG
  structure and in the SmpSbCreateSession() function.
2022-11-14 00:10:35 +01:00
Hermès Bélusca-Maïto
f43ce46566
[SMSS] Improve comments/code/some DPRINTs. Reorganize smss.h header. 2022-11-14 00:10:35 +01:00
Hermès Bélusca-Maïto
06a0451415
[SMSS][CSRSRV] Undefine CreateProcess symbol. Name the union inside SB_API_MSG.
Undefine CreateProcess because it can be #define'd (to CreateProcessA/W)
if winbase.h is included prior (as it is in SMSS).
2022-11-14 00:10:32 +01:00
Marcin Jabłoński
6a3a79bb72
[DISKPART] Fix help for multi-word command crashing. (#4873)
* [DISKPART] Fix help for multi-word command crashing.

When the HELP command is executed for a multi-word command,
for example "HELP CREATE PARTITION PRIMARY", diskpart crashes.
This happens because before the desired form of the command
is encountered, its single word form is found - since the first word
of the command matches the one HELP is looking for, it tries to
compare the second word of the input command with the second
(nonexistent) word of the encountered single word command,
which is NULL. This results in diskpart crashing.
The fix makes HELP check if the to-be-compared word is not NULL,
before calling wcsicmp.
2022-11-12 13:02:33 +01:00
Hermès Bélusca-Maïto
f1908c8959
[SMSS] Fix build. 2022-11-09 00:05:13 +01:00
Hermès Bélusca-Maïto
b076800dd8
[SMSS] Fix the displayed subsystem name in the failure path of SmpSbCreateSession().
The SubSystemNames array didn't correlate with the possible values of
SubSystemType (e.g. index 4 was "Posix" whereas Posix is type 7; Posix
and OS/2 entries were inverted; Windows CUI subsystem (type 3) was
mapped to "Posix"), and the array dereferencing was out of bounds if the
SubSystemType of the image happened to be larger than 8.

I know (strings extraction from debug build of Windows' SMSS.EXE) that
they use that same old'n'broken array. Perhaps a leftover from very old
times (NT 3.1 betas) where the PE format was under work and the
subsystem numbers didn't have their definitive values... (This has
already happened with the NT PDK v1.196 from September 1991.)
2022-11-08 23:47:02 +01:00
Hermès Bélusca-Maïto
9f48c69231
[SMLIB][SMSS] Implement SmLoadDeferedSubsystem() client and server-side. (#4821)
Loosely based on the deprecated ReactOS-specific SmExecuteProgram().
On server-side, we lookup into the list of deferred subsystems that
has been initialized at init time.

Dedicated to Justin Miller (The_DarkFire) work on reviving the
POSIX subsystem!
2022-11-08 17:41:02 +01:00
Hermès Bélusca-Maïto
8fea507d9b
[SMSS] Logically group the LIST_ENTRY-ies. 2022-11-08 17:41:01 +01:00
Hermès Bélusca-Maïto
c48ca5b022
[SMSS] Fix some x64 warnings C4267 "conversion from 'size_t' to 'ULONG', possible loss of data" 2022-11-06 16:58:45 +01:00
Hermès Bélusca-Maïto
258caa85d1
[SMSS] Call SmpConfigureEnvironment() twice in order to resolve forward environment variables references.
Example: environment variable EnvVar1 that refers to a later-defined
variable EnvVar2.
2022-11-03 02:55:51 +01:00
Hermès Bélusca-Maïto
cb8c8693e0
[SMSS] Initial SmpInit() call initializes the *first handle* (index 0) in the array. 2022-10-26 00:44:41 +02:00
Hermès Bélusca-Maïto
0997e9023c
[SMSS][NTOS:MM] Get rid of the remaining sprintf_nt hacks. (#4799) 2022-10-26 00:41:23 +02:00
Piotr Hetnarowicz
126afdaa6f
[DISKPART] Update Polish translation for message table (#4548)
Reviewed-by: Adam Stachowicz <saibamenppl@gmail.com>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-10-24 17:08:35 +03:00
Piotr Hetnarowicz
bb406c4c18
[DISKPART] Update Polish (pl-PL) translation v2 (#4547)
Reviewed-by: Adam Stachowicz <saibamenppl@gmail.com>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-10-23 14:00:51 +03:00
Mark Jansen
8e16f28789
[RUNDLL32] Try to resolve the manifest file manually
This fixes f.e. Ctrl+A not working in the Create Shortcut wizard
CORE-16669
2022-10-19 19:39:29 +02:00
Katayama Hirofumi MZ
9a3a11d26b [USERINIT] Improve Japanese translation (ja-JP) 2022-10-10 14:58:22 +09:00
Mas Ahmad Muhammad
0753202cf1
[TRANSLATION] Update Indonesian (id-ID) translation (#4585)
- [WRITE] Add Indonesian (id-ID) translation
- [WINLOGON] Update Indonesian (id-ID) translation
2022-10-06 22:44:46 +03:00
Hermès Bélusca-Maïto
967f5b9898
[WINLOGON] Protect function calls to '3rd-party' DLLs by SEH. (#4743)
This includes:
- Notification dll calling in CallNotificationDll().
- winmm.dll API calling (e.g. PlaySound) in PlaySoundRoutine().

Also:
- Fix dwKeyName usage in RegEnumKeyExW() specifying a number of *characters*.
2022-10-04 23:14:35 +02:00
Vitaly Orekhov
3647f6a5eb
[LOGONUI] Make Logon UI compilable again (#4684)
Logon UI was excluded from CMake build, probably for not being compliant
with 'warnings are errors' standard introduced at some point.
In the future, I would probably try to make Logon UI usable
alongside with the classic msgina interface.

- Add logonui back to CMakeLists
- Replace 'wcscpy_s' Vista+ function with StringCchCopyW
- Exclude some unused functions

Signed-off-by: Vitaly Orekhov <crce2000@mail.ru>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2022-09-14 15:10:37 +03:00
Kyle Katarn
22f0c3a84a
[TRANSLATION] French translation update (#4638)
Update of various French translation files for several modules:
CALC, LABEL, DXDIAG, MPLAY32, RAPPS, SHUTDOWN, SNDVOL32, EXPLORER, WINLOGON;
CONSOLE.CPL, MMSYS.CPL; NETCFGX.DLL, SHELL32.DLL, SHLWAPI.DLL, SYSSETUP.DLL
2022-09-03 23:12:29 +02:00
Chan Chilung
ac87259fa2
[TRANSLATION] Update Traditional Chinese (zh-TW) translation - Jun 2022 (#4570)
- [REG] Update zh-TW translation
- [DISKPART] Update zh-TW translation
- [HHCTRL.OCX] Update zh-TW translation
2022-08-16 13:00:11 +03:00
Eric Kohl
57c84dd658 [DISKPART] Fix magic values in CreateLogicalPartition() and CreatePrimaryPartition() 2022-07-03 14:10:02 +02:00
Eric Kohl
d4a398fb13 [DISKPART] Support quoted command options in script files 2022-06-25 15:20:40 +02:00
Eric Kohl
f79ec61bdc [DISKPART] Print proper file system information for the FILESYSTEMS command 2022-06-19 16:12:10 +02:00
Eric Kohl
4a66cbb224 [DISKPART] Add help text for the FORMAT command 2022-06-19 08:28:53 +02:00
Eric Kohl
3ca37d6eaf [DISKPART] Support quoted options in commands 2022-06-18 13:27:56 +02:00
Eric Kohl
4a305266e6 [DISKPART] Add help text for the CREATE PARTITION EXTENDED command 2022-06-18 10:15:04 +02:00
Eric Kohl
cba4ffbb5d [DISKPART] Add help text for the CREATE PARTITION LOGICAL command 2022-06-18 01:05:27 +02:00
Eric Kohl
2be7af18fe [DISKPART] Implement the clean command 2022-06-17 01:37:26 +02:00
Eric Kohl
74870c1ae1 [DISKPART] Add help text for the CREATE PARTITION PRIMARY command 2022-06-16 15:20:46 +02:00
Eric Kohl
966d674de1 [DISKPART] Add help text for the REM command 2022-06-16 11:55:39 +02:00
Eric Kohl
82a2c5903e [DISKPART] Add help text for the DETAIL VOLUME command 2022-06-16 10:50:40 +02:00
Eric Kohl
9b10dcba15 [DISKPART] Add help text for the DETAIL PARTITION command 2022-06-16 00:33:10 +02:00
Eric Kohl
66f6c1ab88 [DISKPART] Add help text for the HELP command 2022-06-14 19:43:38 +02:00
Eric Kohl
6f1c7edaa5 [DISKPART] Add help text for the LIST VOLUME command 2022-06-13 21:18:35 +02:00
Eric Kohl
124fe7504e [DISKPART] Add help text for the LIST PARTITION command 2022-06-12 23:26:53 +02:00
Eric Kohl
7c90ea83ef [DISKPART] Add help text for the LIST DISK command 2022-06-12 16:15:18 +02:00
Eric Kohl
ad9b930354 [DISKPART] Add help text for the SELECT VOLUME command 2022-06-12 09:32:40 +02:00
Eric Kohl
7bea98592f [DISKPART] Add help text for the SELECT PARTITION command 2022-06-11 22:34:07 +02:00
Eric Kohl
7dec75ff67 [DISKPART] Implement the SETID command 2022-06-11 14:31:55 +02:00
Eric Kohl
f06066dc6e [DISKPART] Add help text for the SELECT DISK command 2022-06-11 13:13:27 +02:00
Eric Kohl
84512b7abd [DISKPART] Add help text for the SETID command 2022-06-10 22:02:07 +02:00
Eric Kohl
dd2c7ea3ce [DISKPART] Add help text for the UNIQUEID DISK command 2022-06-07 23:08:05 +02:00
Eric Kohl
da0bff2a50 [DISKPART] Implement the UNIQUEID command 2022-06-07 19:42:09 +02:00