Commit graph

18 commits

Author SHA1 Message Date
Serge Gautherie f7d612f3e3
[BASESRV][CSRLIB][NTVDM] Add missing \n to DPRINT() calls (#5951)
and promote 1 DPRINT().
2023-12-16 23:57:35 +01:00
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
George Bișoc 5696e4ba4d
[KERNEL32][BASESRV] Implement NLS section security
Implement code that deals with the security side of NLS, more specifically, create two security descriptors for NLS directory and NLS section names and let the server use such code.
2022-05-06 10:09:49 +02:00
Hermès Bélusca-Maïto 731eddfe40
[BASESRV] Re-enable and actually fix the CsrValidateMessageBuffer() checks in BaseSrvDefineDosDevice(). (#3304)
Addendum to commit 0a392b18.

The actual problem that existed all along was that the buffers being
validated with CsrValidateMessageBuffer() were not the correct ones!

What had to be checked is the string buffer **INSIDE** the UNICODE_STRING
structures! Indeed, it is these buffers that we are allocating on client side,
see https://github.com/reactos/reactos/blob/9b421af1/dll/win32/kernel32/client/dosdev.c#L324-L336

Dedicated to Pierre Schweitzer.
2020-10-30 01:58:16 +01:00
Hermès Bélusca-Maïto c7c0b09eb6
[BASESRV] Use the correct value for the last parameter of a CsrValidateMessageBuffer() call. 2020-10-17 16:55:56 +02:00
Timo Kreuzer 08c6d21e1f [REACTOS] Fix warning C4146: unary minus operator applied to unsigned type, result still unsigned 2019-07-27 11:21:28 +02:00
Pierre Schweitzer 222ace7c6c [BASESRV] Implement LUID mapped drive arrival/removal notification
CORE-16114
2019-06-30 23:07:54 +02:00
Pierre Schweitzer f3c71baa0c
[BASESRV] Handle failures instead of asserting 2019-05-18 13:37:55 +02:00
Pierre Schweitzer 8159b205b6
[BASESRV] Take ObjectSecurityMode and ProtectionMode into account when creating DACLs 2019-05-18 11:05:30 +02:00
Pierre Schweitzer e1e6cfd312
[BASESRV] Misc fixes: use BaseSrvHeap and silent a DPRINT 2019-05-09 08:57:43 +02:00
Pierre Schweitzer bd7b0c96c6
[BASESRV] Make Buffer MAX_PATH big again 2019-05-08 20:39:57 +02:00
Pierre Schweitzer 20f5797386
[BASESVR] Take SessionId into account while creating BNO directory 2019-05-08 20:35:31 +02:00
Pierre Schweitzer a802726577
[BASESRV] Fix the BNO string buffer usage
This avoids reinitializing it before use.
2019-05-08 20:08:13 +02:00
Pierre Schweitzer 0a392b188a
[BASESRV] Rewrite DOS devices management
This will notably bring support for DOS mapping with LUID devices
(not yet supported in the kernel, though).
This also reduces complexity (and thus memory usage) with the "history"
thing. Multiple targets are stored in the link target as MULTI_SZ string.

This fixes regressions introduced with kernel32 fixes/rewrites.
2019-05-08 18:34:28 +02:00
Pierre Schweitzer eea0beca35
[BASESRV] Enable the ProtectionMode query code
And make it global
2019-05-08 18:34:28 +02:00
Pierre Schweitzer 6e4f0365e3
[BASESRV] Make SessionId global 2019-05-08 18:34:28 +02:00
Jérôme Gardou 23373acbb9 [CMAKE] Use modules instead of shared libraries
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.

On my system, this reduces the configure-time by a factor of two.
2019-04-06 17:43:38 +02:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00