This concludes the series.
--
v2: ddraw: Reimplement SetSurfaceDesc() by recreating the wined3d texture(s).
wined3d: Pass parent ops to wined3d_rendertarget_view_set_parent().
ddraw/tests: Add some tests for creating surfaces with user memory.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2480
Fixes bug [53826](https://bugs.winehq.org/show_bug.cgi?id=53826).
--
v19: ntdll: Set xattr in NtCreateFile if inferred and requested attributes don't match.
ntdll: Only infer hidden attribute from file name if xattr is not present.
ntdll: Handle hidden file names inside get_file_info instead of after it.
ntdll: Do not open-code hidden file handling in get_dir_data_entry.
ntdll/tests: Add test for file attributes of files with names beginning with a dot.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1148
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