reactos/dll/win32/kernel32
Hermès Bélusca-Maïto d8cc88ca80
[KERNEL32][BASESRV] Fix interoperability with Win2k3 regarding NLS section security. (#4828)
Partially revert some aspects of commits 5696e4ba4 and bf40c7a31.
(See PR #4340.)

In order for Win2k3 kernel32.dll to operate with our basesrv.dll (or our
kernel32.dll to operate with Win2k3 basesrv.dll), we need in particular
to have the CreateNlsSecurityDescriptor() helper to exactly take the
expected parameters. Namely, a pointer to a **user-allocated**
SECURITY_DESCRIPTOR buffer, its size (and an access mask).

The function expects its caller to provide all this, and the caller expects
the function to initialize the security descriptor buffer. Note that the
function does *NOT* allocate a new descriptor buffer to be returned!

Indeed, with the way it currently is in master, using Win2k3 kernel32
with our basesrv is now failing with the errors:
```
NLSAPI: Could NOT Create ACL - c0000023.
(subsystems/win/basesrv/nls.c:279) NLS: CreateNlsSecurityDescriptor FAILED!: c0000023
NLSAPI: Could NOT initialize Server - c0000023.
(dll/ntdll/ldr/ldrinit.c:867) LDR: DLL_PROCESS_ATTACH for dll "kernel32.dll" (InitRoutine: 77E40D95) failed
```
(and, if we ever attempted to increase the so-claimed "dummy parameter"
descriptor size in the basesrv call, we would end up with its stack
corrupted and a crash).
Conversely, using our kernel32 with Win2k3 basesrv, would end up with
basesrv receiving a wrongly-initialized descriptor that would not work
(the buffer not being initialized with the contents of a descriptor, but
instead receiving some address to a descriptor allocated somewhere else).
2022-11-01 02:34:04 +01:00
..
client [KERNEL32] Minor code style changes + add documentation for BasepMoveFileDelayed(). 2022-11-01 02:29:24 +01:00
include [KERNEL32] Improve annotation of BaseProcess/ThreadStartup(); remove useless cast; fix PPROCESS_START_ROUTINE return type. 2022-04-18 02:40:32 +02:00
kernel32_vista [KERNEL32] Add missing NTOS_MODE_USER when including the NDK. 2022-01-11 22:45:15 +01:00
wine
winnls [KERNEL32][BASESRV] Fix interoperability with Win2k3 regarding NLS section security. (#4828) 2022-11-01 02:34:04 +01:00
CMakeLists.txt
k32.h [KERNEL32] Add missing NTOS_MODE_USER when including the NDK. 2022-01-11 22:45:15 +01:00
kernel32.rc [KERNEL32] Fix kernel32.rc for UTF-8 codepage (#4648) 2022-08-31 12:04:21 +09:00
kernel32.spec [KERNEL32] Fix DisableThreadLibraryCalls function argument type in spec file. 2022-10-06 16:16:46 +02:00