Commit graph

83919 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto cdba812252
[TASKMGR] Simplify status-bar display when menus are shown (#5578)
CORE-19061

Following PR #5571 (commit 2d53e953c), it became apparent that the
management of the status-bar when showing the menu hints could be
simplified further.

Use "simple-text" status-bar display mode when showing menu hints.
The original status-bar panes state is "remembered" and are automatically
restored when the "simple-text" mode is disabled.
2023-08-24 16:47:32 +02:00
Egor Ananyin 3ae0ccdccb [NTUSER] Set correct lParam for WM_(UN)INITMENUPOPUP (#5573)
This is needed to allow apps to detect whether the opened menu is
a system menu or a user menu. CORE-19061
2023-08-24 16:33:03 +02:00
Egor Ananyin 26ffe2f826 [USER32_APITEST] Add a test for system menu messages (#5573)
Based on msg.c Wine test. CORE-19061
2023-08-24 16:33:03 +02:00
Timo Kreuzer ce848e5c11 [CPPRT][CRT][MSVCRT] Move __CxxFrameHandler3 to crt and export it on NT6
Previously it was in cpprt, which is a support library for C++, containing functions that are not exported by msvcrt. But since Vista __CxxFrameHandler3 is exported by msvcrt. Therefore move it to crt, and to satisfy pre-Vista configurations, also add it to msvcrtex.
2023-08-23 20:43:53 +03:00
unknown 310563aece
[NTOS:SE] Let SepGetSidFromAce figure out the ACE type
As the commit title says. Instead of having the caller figuring out what
the ACE type should be of the ACE.
2023-08-23 17:54:47 +02:00
Oleg Dubinskiy a4b0899ca1
[DXGTHK] Fix EngCreateBitmap exported parameters (#5606)
Use two longs instead of one for the first parameter of EngCreateBitmap export. Make it same as win32k export.
MSDN documentation says that 1st parameter is SIZEL (SIZE) structure, which actually contains 2 longs inside. Sice it is passed by value, it needs to take enough memory when export in dxgthk and redirect to win32k (since it's actually a win32k function).
Fixes the compilation of our dxg.sys when calling dxgthk!EngCreateBitmap from it.
Found during my DirectX investigations.
2023-08-23 17:53:22 +02:00
William Kent 4e3bf252d8
[MKISOFS] Silence prototype warnings (#5603)
mkisofs and its components uses K&R-style function definitions
to support very old compilers. Modern compilers consider K&R syntax
to be deprecated. Clang therefore emits a large number of warnings
over this.
2023-08-23 14:37:15 +02:00
Katayama Hirofumi MZ 21925d935c
[SHLWAPI][SDK] Implement SHGetViewStatePropertyBag Part 1 (#5605)
Follow-up to #5590.
- Add CViewStatePropertyBag class.
- Add SHGetViewStatePropertyBag definition.
- Add FreeViewStatePropertyBagCache function and
  use it in DllMain to free the cache.
CORE-9283
2023-08-23 15:00:07 +09:00
Andrei Miloiu 8d35887c02
[DISKPART][MC] Update Romanian (ro-RO) translation for message table (#5485) 2023-08-22 21:37:14 +02:00
George Bișoc 8a61e1c33c
[NTDLL_APITEST] Write tests for NtAccessCheckByTypeResultList 2023-08-22 17:54:19 +02:00
George Bișoc fd2e4437a8
[NTDLL_APITEST] Write tests for NtAccessCheckByType 2023-08-22 17:54:19 +02:00
George Bișoc cad780e17c
[SDK:RTL] Fix the ACE revision check in RtlpAddKnownObjectAce
Object ACEs are supported starting from Revision 4, the current code checks
if the revision is above Revision 4. An Object ACE has to be strictly set on that revision,
whereas Object ACLs can be of any revision starting from ACL_REVISION4.
2023-08-22 17:54:18 +02:00
George Bișoc c175c4f47d
[SDK:RTL] Implement object type ACE validation checks
Write the necessary ACL validation code for ACEs whose types are ACCESS_ALLOWED_OBJECT_ACE_TYPE
or ACCESS_DENIED_OBJECT_ACE_TYPE. This ensures each created object type ACL has valid ACE
contents.
2023-08-22 17:54:18 +02:00
George Bișoc 8289de6ef7
[NTOS:SE] Cast the ACE to known ACE type variants on SepGetSidFromAce
ACCESS_DENIED_ACE_TYPE, ACCESS_ALLOWED_ACE_TYPE, SYSTEM_AUDIT_ACE_TYPE and
SYSTEM_ALARM_ACE_TYPE belong to the same commonly internal ACE type, aka KNOWN_ACE,
as each of these ACEs have the same structure field offsets.

The only difference are ACCESS_DENIED_OBJECT_ACE_TYPE and ACCESS_ALLOWED_OBJECT_ACE_TYPE
as they have their own internal ACE type variant, the KNOWN_OBJECT_ACE structure.

The general guideline is that public ACE structure variants have to be used elsehwere
such as in UM whilst the kernel has to use the internal known ACE type variants when possible.
2023-08-22 17:54:18 +02:00
George Bișoc a42f642ea1
[NTOS:SE] Implement access security checks by type
- Implement SepDenyAccessObjectTypeResultList, SepAllowAccessObjectTypeResultList,
SepDenyAccessObjectTypeList and SepAllowAccessObjectTypeList. These routines will
be used to grant or deny access to sub-objects of an object in the list.

- Refactor SepAnalyzeAcesFromDacl and SepAccessCheck to accomodate the newly
implemented access check by type mechanism.

- SepAccessCheck will now be SepAccessCheckWorker, a worker helper function that further
abstracts the access check mechanism in the kernel. Whereas the SepAccessCheck name will be
used as a centralized function used by the access check NT system calls.

- Deprecate SepGetSDOwner and SepGetSDGroup in favor of SepGetOwnerFromDescriptor and
SepGetGroupFromDescriptor. The former functions were buggy as they might potentially
return garbage data if either the owner or group were passed as NULL to a security
descriptor, hence a second chance exception fault. This was caught when writing tests
for NtAccessCheckByType.

- Shorten the debug prints by removing the name of the functions, the person who reads
the debugger output has to look at the source code anyway.
2023-08-22 17:54:17 +02:00
George Bișoc e38f4c2b36
[NTOS:SE] Implement object type list utilities
This implements various private kernel routines for object type list management
needed for access check code infrastructure. In addition, update the code documentation
and add missing comments.
2023-08-22 17:54:17 +02:00
George Bișoc 5f3fab72a9
[NTOS:SE] Implement SepDumpAccessAndStatusList
This function will dump all the access status and granted access rights
of each object list of a list whenever an access check by type (or by type
result list) fails. This is for debugging purposes.
2023-08-22 17:54:17 +02:00
George Bișoc 5654ce7b9a
[NTOS:SE] Declare function prototypes & add OBJECT_TYPE_LIST_INTERNAL
OBJECT_TYPE_LIST_INTERNAL will serve as an internal kernel data structure
to hold validated object type contents that are copied from UM.

The difference between the public and the internal one is that the internal structure has
an additional member for access check rights that have been granted on each
object element in the list.
2023-08-22 17:54:17 +02:00
George Bișoc edcf3f5363
[NTOS:SE] Update the NT access check syscalls SAL2 annotations
The newly updated SAL2 annotations reflect those from Process Hacker.
Also these syscalls must have their function's status code checked, as
most of other Native syscalls have them checked.
2023-08-22 17:53:45 +02:00
Timo Kreuzer 08629037ea [KERNEL32] Improve a few NT6 stubs 2023-08-22 18:46:31 +03:00
Katayama Hirofumi MZ fec935ec24
[COM_APITEST] shdocvw: Add CLSID_MruPidlList (#5602)
CORE-9283
2023-08-22 23:07:46 +09:00
Andriy Shevchenko 2ea03b5b22
[REACTOS] Fix typos in comments (#5591)
Fixing typos in code comments enhances code readability and comprehension for developers and collaborators.
2023-08-22 16:20:29 +03:00
Katayama Hirofumi MZ a2d8e464c8
[SHLWAPI][SDK][SHELL32_APITEST][SHLWAPI_WINETEST] Property Bag on Desktop Upgrade (#5590)
- Add CDesktopUpgradePropertyBag class.
- Implement SHGetDesktopUpgradePropertyBag
  function.
CORE-9283
2023-08-22 12:01:20 +09:00
Timo Kreuzer e7cb6f4920
[KMTEST:TcpIp] Use 10 second timeout value instead of INFINITE (#5586)
* [KMTEST:TcpIp] Use 10 second timeout value instead of INFINITE

On x64 the test sometimes fails to connect and then times out on the testbot, causing the system to be rebooted.

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2023-08-21 21:46:20 +03:00
Timo Kreuzer 3a0b53386c [KERNEL32] Add CompareStringOrdinal from wine-3.21 2023-08-20 15:17:41 +03:00
Stanislav Motylkov dafa00b554 [MSPAINT] Sync translations between the main and popup menus
Also some minor corrections and fixes for mnemonic keys.
2023-08-20 12:06:08 +03:00
Katayama Hirofumi MZ 455c1fe1b9
[MSPAINT] Speed up for black and white (#5563)
Follow-up to #5554.
- Speed up ImageModel::PushBlackAndWhite
  by using GetDIBits and SetDIBits.
CORE-19094
2023-08-20 16:46:18 +09:00
Joachim Henze 49dbc8fbbb [NTUSER] Whitspace-fixes winpos.c
I just can't stand that whitespace-diff at those 2 if-conditions any longer,
which was introduced into co_WinPosSetWindowPos() by
0.4.13-dev-8-g cfdf36e442
Everytime I port something back, I don't know where to put that diff temporarily.
And I don't want to make the older branches worse as well.
So finally squeeze it out at right-hand-side in master head.
2023-08-20 01:41:28 +02:00
Timo Kreuzer d00d883a21 [RTL][NTDLL] Implement and export RtlCompareUnicodeStrings 2023-08-19 23:52:21 +03:00
Timo Kreuzer c332b917dc [CRT] Reduce diff to wine-5.0 2023-08-19 23:50:52 +03:00
Timo Kreuzer e04b796534 [WINESYNC]: crt is now in sync with wine-staging wine-5.0 2023-08-19 23:50:52 +03:00
winesync 1f8eda7853 [WINESYNC] msvcrt: Fix handling tryblocks inside current catch block on nested exception.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48335
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 6babdb5508bd2f1b659218483f5df76859898712 by Piotr Caban <piotr@codeweavers.com>
2023-08-19 23:50:52 +03:00
winesync 4df4baa391 [WINESYNC] msvcrt: Pass catch_func_nested_frame struct to call_catch_block.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 48a447c5eb238d673ce5db4eeacf3ba4c1a9da90 by Piotr Caban <piotr@codeweavers.com>
2023-08-19 23:50:52 +03:00
winesync 6c7dc46702 [WINESYNC] msvcrt: Pass catch_func_nested_frame struct to cxx_frame_handler.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id ea20974cdd7457715bf4d758818d03bff664f62b by Piotr Caban <piotr@codeweavers.com>
2023-08-19 23:50:52 +03:00
Timo Kreuzer 4b5a555161 [WINESYNC] Allow directories to be None 2023-08-19 23:50:52 +03:00
Hermès Bélusca-Maïto 5472c3e853
[NTOS:MM] MiResolveImageReferences: Use boolean values for GdiLink and NormalLink. 2023-08-19 19:06:20 +02:00
Hermès Bélusca-Maïto df0349b49f
[NTDLL] .spec file: First parameter in RtlImageDirectoryEntryToData should be 'ptr'. 2023-08-19 19:01:00 +02:00
Katayama Hirofumi MZ 56d95154ee
[SHLWAPI][SHLWAPI_APITEST][SDK] INI file property bag (#5546)
- Add SHGetIniStringUTF7W and SHSetIniStringUTF7W functions.
- Add CIniPropertyBag class.
- Implement SHCreatePropertyBagOnProfileSection function.
CORE-9283
2023-08-19 11:22:55 +09:00
Whindmar Saksit c0e443058e
[CONSRV] Only call CoUninitialize if initialized (#5582) 2023-08-18 19:06:20 +02:00
Katayama Hirofumi MZ 80153fc686
[ATL_APITEST][SDK] Fix failures of CImage testcase (#5567)
- Improve compatibility of CImage.
- Improve CImage testcase of atl_apitest.
- Improve CImage::BuildCodecFilterString.
CORE-19008
2023-08-18 20:34:33 +09:00
Andrei Miloiu 9293388c61
[MSPAINT] Update Romanian (ro-RO) translation (#5564) 2023-08-18 13:04:31 +03:00
Andrei Miloiu e711232042
[EXPLORER] Update Romanian (ro-RO) translation (#5558) 2023-08-18 13:04:03 +03:00
Serge Gautherie aa2d2139be [FREELDR] Convert ntfs.c to UTF-8 without BOM
Addendum to f0d73e0 (and ab3bd82).
2023-08-18 00:51:36 +02:00
Julio Carchi 442f5dfab5
[MSAFD] Fix non-blocking sockets support for recv() (#5575) CORE-14486
Currently ReactOS' winsock2 implementation lacks of non-blocking sockets support for recv() apicall, this causes that applications that make use of this feature can lead to unexpected behaviors, one of them is Nginx web server, which uses non-blocking sockets when serving pages through Https protocol.
CORE-14486

It also brings us significantly closer in master head to running Firefox 52, Mypal 29.3.0 and New Moon 28 browser, where the latter allows to connect to mattermost from within ReactOS.
In master head an additional reg file is needed to stop us from exporting specific NT6+ APIs, but in older releases all that should work out of the box with this brilliant patch.


Co-authored-by: Julio Carchi Ruiz <julcar@informaticos.com>
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2023-08-17 23:13:13 +02:00
Hermès Bélusca-Maïto ab3bd82928
[FREELDR] Convert source files to UTF-8 without BOM 2023-08-17 15:36:54 +02:00
Sylvain Deverre f0d73e0f7f
[BOOTSECT][FREELDR] Support booting from NTFS partitions (#3416)
Implement NTFS boot sector that loads FreeLdr from a NTFS partition.

CORE-17474

- Able to find/parse root directory;
- Handle fixups in FILE MFT record;
- Implement directory tree search;
- Implement loading found file from disk;
- Handle fixups in INDX records;
- Fail if compressed or sparse;
- Attempt to support 64-bit disks.

Some TO-DOs for later:
- Handle "weird" NTFS partition with uncommon sector sizes / sectors per cluster / sectors per index record;
- Better implementation for file loading;
- 64-bit LCN support.
2023-08-17 15:07:59 +02:00
Mustafa Ateş Uzun 7d2f6b65b3
[CMD][TESTS] Fix typo in "height" word (#5580) 2023-08-17 14:30:26 +03:00
Carl J. Bialorucki 43b3dc2034
[BROWSEUI] Refactor settings and sync them between windows (#5496)
This works similarly to how our shell stores its settings from a software design standpoint.

- Add settings.cpp file and ShellSettings structure to load and save settings.
- Add a registry value to hivedef.inf for the locked toolbar state.
  This prevents a bug where the associated registry key cannot be opened or saved to.
- Add new BWM_SETTINGCHANGE window message to refresh the UI on setting changes
  and send it to every open window when saving settings to the registry.
- Add new BWM_GETSETTINGSPTR window message to share the shellbrowser settings
  structure pointer with child windows and toolbars.
2023-08-17 12:14:41 +03:00
Serge Gautherie 8888311452 [KERNEL32] CreateProcessInternalW(): Always use Peb variable
Trivial consistency/optimization.

Addendum to d81cd01 (r59637).
2023-08-17 02:51:09 +02:00
Timo Kreuzer 5645f7cf8f [KERNEL32] Fix startup context of initial thread
When creating a new process the monster function CreateProcessInternalW calls BaseInitializeContext to set up the context for the initial thread. One of the parameters is the PEB pointer. Instead of passing the pointer to the newly created process' PEB, the function was passing it's own PEB address, leading to test failures. How this is not an issue otherwise is a mystery to be resolved by someone else.
Also remove ros_skip_flaky marks in kernel32_winetest:process (yes, flaky, because sometimes the PEB addresses actually match)
2023-08-16 22:03:05 +03:00