Removing WINED3D_RS entries from state tables and moving stubs to wined3d_device_apply_stateblock.
--
v3: wined3d: Move the WINED3D_RS_ENABLEADAPTIVETESSELLATION stub to wined3d_device_apply_stateblock.
wined3d: Move the WINED3D_RS_ADAPTIVETESS_W stub to wined3d_device_apply_stateblock.
wined3d: Move the WINED3D_RS_ADAPTIVETESS_Z stub to wined3d_device_apply_stateblock.
wined3d: Move the WINED3D_RS_ADAPTIVETESS_Y stub to wined3d_device_apply_stateblock.
wined3d: Move the WINED3D_RS_ADAPTIVETESS_X stub to wined3d_device_apply_stateblock.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2469
On Thu Mar 23 19:32:06 2023 +0000, Brendan Shanks wrote:
> I suggested the drop-down, a future third option would be to use the
> host system's light/dark mode setting
Yeah, a check mark was what I initially went with, but there's concern about the translations. Some of them can be quite long and would likely overflow into other elements.
The text has to be explicit enough to not confuse the user, something like `Enable WinRT app dark theme`, which is quite long as it is. But in other languages, it can be even longer.
For instance, in French, this can translate to `Activer le thème sombre de l'application WinRT`. In Greek, `Ενεργοποιήστε το σκοτεινό θέμα της εφαρμογής WinRT`. The Greek translation would most likely overflow.
The check mark would need to be on its own row to prevent this issue, but there doesn't seem to be enough space to add one.
I'm open to suggestions. However, a drop-down eliminates the overflow issue altogether.
Also, some people want an option to use the host system's mode, but I don't know if this is something that Wine would support.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2183#note_27659
On Thu Mar 23 19:32:06 2023 +0000, Alexandre Julliard wrote:
> > How's this?
> >
> > Thanks for the review! :smiley:
> Actually thinking some more about this, a simple check mark may be
> better than a drop-down. It's not like there would be other possible options.
I suggested the drop-down, a future third option would be to use the host system's light/dark mode setting
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2183#note_27658
### Merge request
This fixes a vulnerability by incorrect parsing of command line arguments.
The way how a triple quote chars (or double quote chars inside a quoted string) will be currently parsed in `CommandLineToArgvW` of wine is wrong, therefore opens an attack vector (using artificially created command line validated with different rules matching default parsing mechanism of Windows), so could be even considered as a vulnerability.
## Proposed changes
`CommandLineToArgvW` will parse command line arguments correct and more similar to Windows.
Here is the diff illustrating wrong behavior:
```diff
## # test is an alias for
## # python.exe -c "from sys import argv; del argv[0]; print(str(len(argv)) + ' | ' + ' | '.join(argv))"
- # Wine
+ # Windows (and fixed variant)
## double in quoted string:
> test "abc""def" ghi" xxx
- 2 | abc"def ghi | xxx
+ 2 | abc"def | ghi xxx
> test "abc"""def" ghi" xxx
- 3 | abc"def | ghi" xxx
+ 2 | abc"def ghi | xxx
## triple in unquoted string:
> test abc"""def" ghi" xxx
- 2 | abc"def ghi | xxx
+ 2 | abc"def | ghi xxx
> test abc""""def" ghi" xxx
- 2 | abc"def | ghi xxx
+ 2 | abc"def ghi | xxx
```
As a consequence:
- the arguments can be parsed incorrectly (compared to default behavior of Windows parser) in the way that parts of quoted arguments may become unquoted and vice versa, as well as swim between different args;
- an attacker may create artificial command line that pass validation rules of nominal condition of Windows, but vulnerable here (inject, data steal, etc), because the arguments would deviate between validation and execution phase
- special tokens like pipe `|`, ampersand `&` or redirecting tokens like `>` that normally included in quoted string (and validated as a string) could abrupt get different meaning and used for piping, redirecting etc, that beside the injection possibility opens still worse attacking vector that can even cause RCE or used to create persistent exploits.
<details><summary>Here is the nominal condition how arguments will be parsed in Windows...</summary>
cmd line|arg1|arg2
---|---|---
abc" "def|abc def|
abc\\" \\"def|abc"|"def
"abc\\" \\"def"|abc" "def|
"abc"" ""def"|abc" "def|
abc"" ""def|abc|def
abc""" """def|abc" "def|
abc\\""" \\"""def|abc"|"def
abc\\\\""" \\\\"""def|abc\\" \\"def
"abc"""def" ghi"</sup>|abc"def ghi|
"abc"""def" ghi<br><sup>* missing close qoute at end</sup>|abc"def ghi|
"abc""def" ghi|abc"def|ghi
"abc\\"""def" ghi|abc""def|ghi
"abc\\\\"""def" ghi"|abc\\"def ghi|
"abc\\\\\\"""def" ghi|abc\\""def|ghi
"abc\\\\\\\\"""def" ghi"|abc\\\\"def ghi|
</details>
For PoC one could use any lang like tcl, python, etc, or even a self-written executable getting the argc/argv from main.<br/>
The above diff and nominal condition was generated using this python script on Windows box:
```python
from sys import argv; del argv[0]; print(str(len(argv)) + ' | ' + ' | '.join(argv))
```
## References
[Related PR](https://github.com/reactos/reactos/pull/5186) with fix for ReactOS.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2472
This second MR in the Wayland series adds display configuration related enhancements, including providing more display information (like a proper/consistent name and position) to Wine and implementing GetCurrentDisplaySettings.
To get additional information from the Wayland compositor we need to use a protocol from the wayland-protocols collection, so we introduce support in the build system for protocol .xml files, and also makedep changes to gracefully handle the case these external sources are missing when the driver is disabled. These changes are introduced on their own in the first commit in the series, but we can squash it with the next commit, where the functionality is first used, if preferred.
To be able to provide a consistent view of the display settings across all processes, this MR adds a shared memory region containing an authoritative version of the Wayland output information (see the "winewayland.drv: Implement GetCurrentDisplaySettings." commit for more details).
**Important note:** This MR requires the wayland-protocols package in the CI docker image. Without it the Wayland driver build will be disabled, so any build results are not going to be representative of the Wayland driver code changes in this branch.
Thanks!
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2476
On Windows, ldap_delete_(ext_)s returns LDAP_UNWILLING_TO_PERFORM when
trying to delete an entry that cannot be deleted. On Unix,
LDAP_SERVER_DOWN is returned instead. Unix also returns LDAP_SERVER_DOWN
immediately from ldap_delete_ext if the entry cannot be deleted, whereas
Windows queues an asynchronous operation and returns LDAP_SUCCESS.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54702
--
v2: wldap32: Handle null DN or null message in ldap_delete* and add tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2481
I initially wanted to do the refactoring in a separate merge request, but since my merge request yesterday broke the tests, I decided to add the implementation into this commit as well.
--
v2: kernelbase: Recursively obtain the Wow6432Node parent.
kernelbase: Add support for shared registry keys.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2483
I initially wanted to do the refactoring in a separate merge request, but since my merge request yesterday broke the tests, I decided to add the implementation into this commit as well.
--
v3: kernelbase: Recursively obtain the Wow6432Node parent.
kernelbase: Add support for shared registry keys.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2483
--
v2: wineps: Handle EMR_LINETO record in spool files.
wineps: Handle EMR_MOVETOEX record in spool files.
wineps: Handle EMR_RECTANGLE record in spool files.
wineps: Handle pen selection in spool files.
wineps: Handle brush selection in spool files.
wineps: Handle EMR_EOF record in spool files.
wineps: Handle EMR_HEADER record in spool files.
wineps: Write document header and footer in PrintDocumentOnPrintProcessor.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2484
This is what it looks like:

--
v9: winecfg: Add an option to set WinRT app dark theme.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2183
This corrects what interface should be returned, there isn't a hierarchy with
these IUISettings at all. It should return IUISettings and then QI for
any others that it requires.
--
v3: windows.ui: Use DEFINE_IINSPECTABLE for IUISettings3
windows.ui: Add IUISettings2 stub interface
windows.ui: Add Stubbed interface IUISettings
include: Add Missing IUISettings interfaces.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2465
On Windows, ldap_delete_(ext_)s returns LDAP_UNWILLING_TO_PERFORM when
trying to delete an entry that cannot be deleted. On Unix,
LDAP_SERVER_DOWN is returned instead. Unix also returns LDAP_SERVER_DOWN
immediately from ldap_delete_ext if the entry cannot be deleted, whereas
Windows queues an asynchronous operation and returns LDAP_SUCCESS.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54702
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2481
--
v7: winegstreamer: Implement ProcessInput and ProcessOutput for WMV decoder DMO.
winegstreamer: Create wg_transform for WMV decoder.
winegstreamer: Better handle framerate.
winegstreamer: Add format field to wmv wg_format.
mf/tests: Test time length returned by ProcessOutput.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2258
On Thu Mar 16 16:04:48 2023 +0000, Gabriel Ivăncescu wrote:
> I think they're still useful, since they're the only "movable" devices
> (in PA Volume Control for example). They use the largest channel mask
> out of all the sources/sinks, so it's not a problem to have them movable
> with no notifications to the app, unlike the others.
How should we proceed then?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2364#note_27595