It's a clean-room reimplementation that mimics Windows 10 program's output format.
It prints all the information that is available via KerbQueryTicketCacheMessage.
Also tested to work on Windows if dynamically linked + built with winegcc.
For further extension of the functonality, implementing
KerbQueryTicketCacheEx{,2,3}Message is required.
--
v3: klist: Add a program that lists Kerberos tickets.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3347
It's a clean-room reimplementation that mimics Windows 10 program's output format.
It prints all the information that is available via KerbQueryTicketCacheMessage.
Also tested to work on Windows if dynamically linked + built with winegcc.
For further extension of the functonality, implementing
KerbQueryTicketCacheEx{,2,3}Message is required.
--
v2: klist: Add a program that lists Kerberos tickets.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3347
Mainly promoting single object components to variables for SM 5.0's RDEF block and lowering combined samplers to separate sampler+texture objects for SM 4.
Following patches (including prepending uniform copies resource components within struct parameters) in:
https://gitlab.winehq.org/fcasas/vkd3d/-/commits/master6c
--
v6: vkd3d-shader/hlsl: Don't allocate all texture registers for synthetic separated samplers.
vkd3d-shader/hlsl: Lower combined samplers to separate sampler and texture objects for SM4.
vkd3d-shader/hlsl: Separate tracking of sampler_dim and usage for object components.
vkd3d-shader/hlsl: Introduce hlsl_new_synthetic_var_named().
vkd3d-shader/hlsl: Check is_uniform instead of HLSL_STORAGE_UNIFORM when validating object refs.
tests: Add lowering combined samplers tests.
tests: Pass D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY when compiling with the shader-runner.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/209
Fix the issue of incorrect linkid calculation due to a lack of judgment on the current type.
Signed-off-by: Zhaoyi <zhaoyi(a)uniontech.com>
--
v13: comctl32/syslink: Check item type before increasing link ID in SYSLINK_LinkAtPt().
https://gitlab.winehq.org/wine/wine/-/merge_requests/3114
This is a preparation for better handling of message packing between win32u and user32. It also removes some hacks that were needed before syscall separation completion.
--
v2: win32u: Pass module name before packed lparam in win_hook_params.
user32: Always use NtCallbackReturn to pass result from User32CallWindowsHook.
wow64win: Convert parameters in place in wow64_NtUserCallWindowsHook.
wow64win: Conver parameters in place in wow64_NtUserCallWinProc.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3346
This is a preparation for better handling of message packing between win32u and user32. It also removes some hacks that were needed before syscall separation completion.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3346
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54748
--
v3: gdiplus: Fix GdipGetAllPropertyItems return value when no properties exist.
gdiplus: Fix GdipGetPropertySize return value when no properties exist.
gdiplus/tests: Pare down image property tests that are not run for Wine.
gdiplus/tests: Use test context for test ran in a loop.
gdiplus/tests: Add GIF to image properties tests.
gdiplus/tests: Use consistent no-alternate value for image properties.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3302
Validate user data before passing it to PolyDraw.
The program in the bug requests to draw figures outrageously outside the DC's region after presumably, some uninitialized values happen as a result of a missing font. Native gdiplus seems to handle this gracefully so we probably also should.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41617
Signed-off-by: David Kahurani <k.kahurani(a)gmail.com>
--
v4: gdiplus: Clip polygons before drawing them
https://gitlab.winehq.org/wine/wine/-/merge_requests/3288
Some tests in gdiplus output hex-formatted data chunks, but it is very hard to read
EXAMPLE BEFORE FIX:
```
image.c:4831: Test marked todo: 16: data should match
image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 80i
mage.c:4837: 80image.c:4837: 80image.c:4837: 80image.c:4837: 80image.c:4837: 80image.c:4837: 40image.c:4837: 40im
age.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4837: 40ima
ge.c:4837: 40image.c:4837: 40image.c:4837: 40image.c:4838:
```
EXAMPLE AFTER FIX:
```
image.c:4802: Test marked todo: 16: data should match
image.c:4804: 40 40 40 40 40 40 80 80 80 80 80 80 40 40 40 40 40 40 40 40 40 40 40 40
```
--
v2: gdiplus/tests: Fix mangled test output when dumping data in hex format.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3313
Notes:
- One test VM doesn't have sound output, that's why I added the check for SAR availability.
--
v2: mfmediaengine: Add support for inserting audio effects.
mfmediaengine/tests: Add tests for audio effects.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3311
Today, NtContinue() on ARM64 does not restore X16 and X17 from the
context.
This is because the values for X16 and X17 are overwritten when the
current thread returns to the "user mode" (PE side) via
__wine_syscall_dispatcher, which in turn uses them as scratch registers
for restoring SP and PC respectively.
We cannot avoid using scratch registers when restoring SP and PC. This
is because ARMv8 does not have an unprivileged (EL0) instruction that
loads SP and PC from memory or non-GPR architectural state.
Fix this by making ARM64 __wine_syscall_dispatcher perform a full
context restore via raise(SIGUSR2) when NtContinue() is used.
Since raising a signal is quite expensive, it should be done only when
necessary. To achieve this, split the ARM64 syscall dispatcher's
returning behaviour into a fast path (that does not involve signals) and
a slow path (that involves signals):
- If CONTEXT_INTEGER is not set, the dispatcher takes the fast path:
the X16 and X17 registers are clobbered as usual.
- If X16 == PC and X17 == SP, the dispatcher also takes the fast path:
it can safely use X16 and X17 without corrupting the register values,
since those two registers already have the desired values.
This fast path is used in call_user_apc_dispatcher(),
call_user_exception_dispatcher(), and call_init_thunk().
- Otherwise, the dispatcher takes the slow path: it raises SIGUSR2 and
does full context restore in the signal handler.
--
v2: ntdll: Fix restoring X16 and X17 in ARM64 syscall dispatcher.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3341
Today, NtContinue() on ARM64 does not restore X16 and X17 from the
context.
This is because X16 and X17 are used as scratch registers for restoring
SP and PC respectively in __wine_syscall_dispatcher. Scratch registers
are required because ARMv8 does not have an unprivileged (EL0)
instruction that loads SP and PC from memory or non-GPR architectural
state.
Fix this by making ARM64 __wine_syscall_dispatcher perform a full
context restore via raise(SIGUSR2) when NtContinue() is used.
Since raising a signal is quite expensive, it should be done only when
necessary. To achieve this, split the ARM64 syscall dispatcher's
returning behaviour into a fast path (that does not involve signals) and
a slow path (that involves signals):
- If CONTEXT_INTEGER is not set, the dispatcher takes the fast path:
the X16 and X17 registers are clobbered as usual.
- If X16 == PC and X17 == SP, the dispatcher also takes the fast path:
it can safely use X16 and X17 without corrupting the register values,
since those two registers already have the desired values.
This fast path is used in call_user_apc_dispatcher(),
call_user_exception_dispatcher(), and call_init_thunk().
- Otherwise, the dispatcher takes the slow path: it raises SIGUSR2 and
does full context restore in the signal handler.
Fixes: 88e336214db94318b6657d641919fcce6be4a328
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3341
SafeSEH is not applicable to architectures other than i386.
This fixes compiling with the clang ARM assembler, which cannot parse
".def @feat.00" since "@" is parsed as the start of a line comment.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3340
It turns out that Windows have a special behaviour WRT cancelling asyncs for terminating thread (or already terminated thread when socket handle is closed) when there is no more open handles in the process for the socket (while there might be handles to it in another processes).
We currently have a logic on cancelling async in server/async.c:cancel_terminating_thread_asyncs() called before thread termination. It has a special case ("async->completion && async->data.apc_context && !async->event") when async is not canceled (covered by the tests). It turns out that on Windows, if there are no more handles to the socket in the async's process, async is cancelled even in this case.
Then, if thread is terminated while there are open handles in the same process, but those handles are closed after that, it turns out the asyncs should be canceled the same way, even if there are handles for the socket in another process.
Why this is important (and, actually, makes some sense to me), is that it is very easy to duplicate all the open handles to the child process. Just e. g., Qt doesn't seem to have any way to create a process through QtProcess without inheriting handles. Programs might expect that once they close socket handle the async operations will be aborted and they receive completions on port. But that doesn't happen if they didn't use an event for overlapped operation and happened to create any child process with inherited handles after creating the socket. Windows behaviour looks to me as a workaround for this.
Besides the present test, I also tested the same with AcceptEx and IOCTL_AFD_RECV which behaves the same. Just to note, closing the handle before thread termination when there are no other open handles is quite a different case. In its heart it behaves *somewhat* similar on Windows and Wine but not quite, hitting various issues. But that looks unrelated to the special case concerned in this patchset.
Fixes Battle.net hanging on exit during "update and restart" (not to confuse with update itself not finishing which is an unrelated issue related to file DACLs).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3329
--
v4: sapi/tests: Use SHDeleteKeyA instead of RegDeleteTreeA in token tests.
sapi/tests: Fix ISpObjectToken::CreateInstance E_ACCESSDENIED error.
sapi/tests: Fix intermittent duration test failure in mmaudio.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3336
The typelib is only created if something requests it, so it may be NULL at PROCESS_DETACH.
WMPControls_play doesn't release and NULL out the filter_graph it creates on failure. So if a call to play() fails after making filter_graph but before making media_controls, calling play() again on the same instance will crash.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3326
This MR allows existing some existing Windows TTS Engines, such as Amazon Polly, to be used in Far Cry 6, and possibly in other games/applications.
--
v2: sapi: Implement ISpVoice::WaitUntilDone.
sapi: Implement ISpTTSEngineSite::GetActions/Rate/Volume.
sapi: Implement ISpTTSEngineSite::Write.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3328
Commit b1cc87cb656 ("msi: The line control has a height of exactly 2
device units.", 2007-12-16) open-coded the body of
(msi_)dialog_add_control() inside dialog_line_control() modulo the
height override.
Except the fixed height, line controls have nothing special compared to
other controls. Thus, there is little merit in open-coding it.
Also, dialog_line_control() has bit-rotted over time; it already missed
a few changes that were done to any other controls.
Fix this by just using dialog_add_control(). Also, add a special case
logic just for line controls.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3322
Today, CreateTextServices() sometimes triggers an assertion failure in
select_style().
When ME_MakeEditor() calls ME_MakeFirstParagraph(), the editor
(ME_TextEditor) is not in a fully initialized state. For example, the
font cache (pFontCache) is not fully initialized, which sometimes makes
select_style() believe that the cache slots are fully occupied.
Fix this by delaying the call to wrap_marked_paras_dc() until the editor
is fully initialized.
Also, delay the call to ITextHost::TxReleaseDC() until after
wrap_marked_paras_dc(), since we need the device context a bit longer.
Fixes: b70eb32c5f3e506181d9e1e9fbef62e9baf3674d
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3321
This MR fixes WRC9 crashing on start with builtin xinput, since the game uses UWP xinput the ordinal numbers don't match up, so I decided to put these new exports with `@ stdcall` instead
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3330
This is just a draft to receive feedback, I'm not sure how could I test this behavior, right now the test I wrote works but there are times where it doesn't enter into the deadlock.
Also I'm not sure if leaving the critical section before waiting for the streaming thread is the correct way to solve the problem.
--
v2: evr: Leave critical section before waiting for streaming thread.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3319
On Thu Jul 13 19:42:16 2023 +0000, Jinoh Kang wrote:
> This leads to a regression: NtContinue() can no longer properly restore
> X16 and X17, since they are now clobbered by `__wine_syscall_dispatcher_return`.
> The proper fix is at
> https://www.winehq.org/mailman3/hyperkitty/list/wine-devel@winehq.org/threa…,
> which is a superset of this patchset.
> I don't have an ARM64 build machine at the moment; can you rebase it and
> see if it works?
> Many thanks for your work!
Can verify that your patch works for me, apologies for missing this in my original MR
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3315#note_38932
This fixes SetWindowLongPtr on WoW64. On 32-bit, we have
```
#define SetWindowLongPtrA SetWindowLongA
#define SetWindowLongPtrW SetWindowLongW
```
meaning that on WoW64, all pointers passed would be padded with `0xffffffff` (because they are treated as LONG), and this is the cause of many of the failing WoW64 tests. This fixes that behavior. I'm not sure if this is the right place to fix it though.
--
v6: wow64win: Always use NtUserSetWindowLongPtr() for GWLP_HINSTANCE and GWLP_WNDPROC.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3294
On Thu Jul 13 18:07:29 2023 +0000, Gabriel Ivăncescu wrote:
> There's no need for a cast though. `ARRAY_SIZE` is already `size_t`
> (because it's implemented with `sizeof`), and a comparison between a
> signed integer and an unsigned integer with at least as many bits is
> always promoted to unsigned.
That is true. This thread can be dismissed then.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38929
On Thu Jul 13 16:37:28 2023 +0000, Jeffrey Smith wrote:
> Compilers can (and at least some do) treat an enumeration as a _signed_
> integer. For the comparison to work as desired you'll want to cast
> `InformationClass` to an unsigned type. I think `size_t` would be appropriate.
There's no need for a cast though. `ARRAY_SIZE` is already `size_t` (because it's implemented with `sizeof`), and a comparison between a signed integer and an unsigned integer with at least as many bits is always promoted to unsigned.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38928
Fall through in create_link and allow SHGetFolderPathAndSubDirW to
create an empty folder in place if the alternatives are not available.
Creating a link back to $HOME makes a recursive directory structure,
which results in crashes in programs that naively search %USERPROFILE%
(e.g. Quicken).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3325
Jeffrey Smith (@whydoubt) commented about dlls/advapi32/lsa.c:
> + "PolicyReplicaSourceInformation",
> + "PolicyDefaultQuotaInformation",
> + "PolicyModificationInformation",
> + "PolicyAuditFullSetInformation",
> + "PolicyAuditFullQueryInformation",
> + "PolicyDnsDomainInformation",
> + "PolicyDnsDomainInformationInt",
> + "PolicyLocalAccountDomainInformation",
> + "PolicyMachineAccountInformation",
> + "PolicyMachineAccountInformation2",
> + "PolicyLastEntry"
> +};
> +
> +static LPCSTR debugstr_InformationClass(IN POLICY_INFORMATION_CLASS InformationClass)
> +{
> + if (InformationClass >= ARRAY_SIZE(string_InformationClass))
Compilers can (and at least some do) treat an enumeration as a _signed_ integer. For the comparison to work as desired you'll want to cast `InformationClass` to an unsigned type. I think `size_t` would be appropriate.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38926
In HttpSendRequestW and HttpSendRequestExW, if the header pointer is not
null but the length parameter is 0, the header length should be derived
from the string length instead.
In HttpSendRequestA and HttpSendRequestExA, on the same scenario, the
function should fail instead.
--
v5: wininet: Handle http headers correctly when length is 0
https://gitlab.winehq.org/wine/wine/-/merge_requests/3269
This fixes an issue I ran into in UI Automation using an interface proxy marshaled with `MSHCTX_INPROC`. `CoUnmarshalInterface` always passes `MSHCTX_LOCAL` when using the standard marshaler, regardless of what was passed to `CoMarshalInterface`.
When passing an interface that uses the free threaded marshaler as an argument to a method on the proxy retrieved from `CoUnmarshalInterface`, it passes `MSHCTX_LOCAL` when trying to marshal, which the results in the free threaded marshaler trying to create a proxy/stub which fails.
--
v3: combase: Use correct destination context in CoUnmarshalInterface when using the standard marshaler.
ole32/tests: Extend test_marshal_channel_buffer() test to include IRpcProxyBufferWrapper checks.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3198
Mainly promoting single object components to variables for SM 5.0's RDEF block and lowering combined samplers to separate sampler+texture objects for SM 4.
Following patches (including prepending uniform copies resource components within struct parameters) in:
https://gitlab.winehq.org/fcasas/vkd3d/-/commits/master6c
--
v5: vkd3d-shader/hlsl: Don't allocate all texture registers for synthetic separated samplers.
vkd3d-shader/hlsl: Lower combined samplers to separate sampler and texture objects for SM4.
vkd3d-shader/hlsl: Separate tracking of sampler_dim and usage for object components.
vkd3d-shader/hlsl: Introduce hlsl_new_synthetic_var_named().
vkd3d-shader/hlsl: Check is_uniform instead of HLSL_STORAGE_UNIFORM when validating object refs.
tests: Add lowering combined samplers tests.
vkd3d-shader/hlsl: Handle resource components individually for SM 5.0.
vkd3d-shader/tpf: Introduce struct extern_resource.
vkd3d-shader/hlsl: Allow derefs to provide the data_type.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/209
Sufficient for compiling a no-op pixel shader.
This should probably be rebased on top of !263 because it introduces vkd3d_spirv_get_type_id_for_data_type(), which 263 renders unnecessary.
!263 is not essential, but I think using two different type systems in the backend is not ideal.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/278
Jeffrey Smith (@whydoubt) commented about dlls/secur32/secur32.c:
> + "NameGivenName",
> + "NameSurname"
> +};
> +
> +static LPCSTR debugstr_NameFormat(IN EXTENDED_NAME_FORMAT NameFormat)
> +{
> + if (NameFormat >= sizeof(string_NameFormat)/sizeof(string_NameFormat[0]))
> + return "(unknown)";
> + return string_NameFormat[NameFormat];
> +}
> +
> BOOLEAN WINAPI GetUserNameExW(
> EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG nSize)
> {
> - TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize);
> + TRACE("(%d %s %p %p)\n", NameFormat, debugstr_NameFormat(NameFormat), lpNameBuffer, nSize);
Written this way, it would make it appear that the function takes 4 parameters. I would suggest revising to make it clear that this is two representations of the same parameter.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38855
Jeffrey Smith (@whydoubt) commented about dlls/secur32/secur32.c:
> }
>
> +static LPCSTR string_NameFormat[] =
> +{
> + "NameUnknown",
> + "NameFullyQualifiedDN",
> + "NameSamCompatible",
> + "NameDisplay",
> + "NameUniqueId",
> + "NameCanonical",
> + "NameUserPrincipal",
> + "NameCanonicalEx",
> + "NameServicePrincipal",
> + "NameDnsDomain",
> + "NameGivenName",
> + "NameSurname"
The values in the EXTENDED_NAME_FORMAT enumeration are not contiguous, so you need to fill in some gaps.
For instance, NameUniqueId is 6.
If passed in, this method would return "NameUserPrincipal".
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3301#note_38852
Validate user data before passing it to PolyDraw.
The program in the bug requests to draw figures outrageously outside the DC's region after presumably, some uninitialized values happen as a result of a missing font. Native gdiplus seems to handle this gracefully so we probably also should.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41617
Signed-off-by: David Kahurani <k.kahurani(a)gmail.com>
--
v3: gdiplus: Clip polygons before drawing them
https://gitlab.winehq.org/wine/wine/-/merge_requests/3288
Validate user data before passing it to PolyDraw.
The program in the bug requests to draw figures outrageously outside the DC's region after presumably, some uninitialized values happen as a result of a missing font. Native gdiplus seems to handle this gracefully so we probably also should.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41617
Signed-off-by: David Kahurani <k.kahurani(a)gmail.com>
--
v2: gdiplus: Clip polygons before drawing them
https://gitlab.winehq.org/wine/wine/-/merge_requests/3288
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54748
(I put this is draft, as there is something else in `test_image_properties` that should possibly be cleaned up first)
--
v2: gdiplus: Fix GdipGetAllPropertyItems return value when no properties exist.
gdiplus: Fix GdipGetPropertySize return value when no properties exist.
gdiplus/tests: Use test context for test ran in a loop.
gdiplus/tests: Add GIF to image properties tests
gdiplus/tests: Use consistent no-alternate-value for image properties
https://gitlab.winehq.org/wine/wine/-/merge_requests/3302
Windows 10 [received support](https://devblogs.microsoft.com/commandline/af_unix-comes-to-window… for AF_UNIX sockets in Insider Build 17063. This merge request adds basic support for AF_UNIX sockets to ws2_32 and wineserver.
Of particular note is the difficulty in handling `sun_path`. Most of the functions that allow for translating Windows paths to Unix paths are not accessible from ws2_32. I considered the following options:
* Pass the Windows path to wineserver and do the conversion there.
* This is, as far as I can tell, not possible without major rearchitecting. wineserver does not have functions to translate Windows paths to Unix paths, for obvious reasons.
* Obtain the current working directory of the requesting process and temporarily change directories to there.
* This only handles relative paths and fails for absolute paths, UNC paths, etc.
* Conditionally change directories based on whether the path is relative or not.
* This is error-prone and wineserver does not have the requisite functions to do this cleanly.
I ultimately decided to pass the translated Unix path to wineserver, which changes directories to `dirname(path)`. It then provides `bind` and `connect` with `basename(path)`. This is not threadsafe, but wineserver is not (currently) multithreaded.
Abstract sockets are supported by this patch.
--
v43: ws2_32/tests: Add test for AF_UNIX sockets fix.
server: Fix getsockname() and accept() on AF_UNIX sockets.
server: Introduce error when attempting to create a SOCK_DGRAM AF_UNIX socket.
server: Allow for deletion of socket files.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2786