Compare commits

...

296 Commits
v5.10 ... v6.0

Author SHA1 Message Date
Alistair Leslie-Hughes
2414b1da6a Release v6.0 2021-01-15 07:40:07 +11:00
Alistair Leslie-Hughes
7ab49f09a2 Release v6.0-rc6 2021-01-09 10:12:38 +11:00
Alistair Leslie-Hughes
a3d08de2b8 Rebase against 7d3186e029fb4cf417fab59483a37d8aece95b5d. 2021-01-09 09:59:05 +11:00
Alistair Leslie-Hughes
1c969cbbed Rebase against 9bc3a9f78bf5e6a09d4e9811f645def4a477f3d0. 2021-01-08 10:04:17 +11:00
Alistair Leslie-Hughes
0e7472e7a3 Added dsound-localder patchset 2021-01-07 13:22:54 +11:00
Alistair Leslie-Hughes
f3e785a3a8 Rebase against 4ac05afd39aff3030e3379ee06e32d6544ef5d62. 2021-01-07 13:15:41 +11:00
Zebediah Figura
dfddef9654 ntdll-NtAlertThreadByThreadId: Reset a thread's Win32 futex entry when waking it.
Avoid a race where two simultaneous calls to RtlWakeAddressSingle() wake the same address.
2021-01-05 19:53:40 -06:00
Alistair Leslie-Hughes
d87ec36ccf Rebase against 221fdb09b4c20da45e9834aa0cae27dcc75ea27b. 2021-01-05 09:57:51 +11:00
Alistair Leslie-Hughes
a3710ff21f Release v6.0-rc5 2021-01-03 10:25:03 +11:00
Alistair Leslie-Hughes
0e67af3d09 Updated dsound-EAX patchset
Enable this feature by default, to allow for more testing.
2021-01-01 13:48:55 +11:00
Zebediah Figura
8b1e0eec1d ntdll-NtAlertThreadByThreadId: Free the address wait entry on thread exit. 2020-12-28 12:36:15 -06:00
Zebediah Figura
b8ca0eae9f ntdll-NtAlertThreadByThreadId: Use a lock-free (list of) arrays to map thread IDs to addresses. 2020-12-28 12:22:10 -06:00
Alistair Leslie-Hughes
350eb136a5 Release v6.0-rc4 2020-12-27 10:59:24 +11:00
Alistair Leslie-Hughes
f40763d8a5 Updated dxdiag-new-dlls patchset 2020-12-27 10:03:16 +11:00
Alistair Leslie-Hughes
4462586c80 Updated mfplat-streaming-support patchset 2020-12-27 10:03:16 +11:00
Zebediah Figura
aae98229b0 libs-Unicode_Collation: Add another bug reference. 2020-12-25 14:02:42 -06:00
Zebediah Figura
7ad10427be server-File_Permissions: Clarify patch 0008 (DACL mapping) a bit.
This code should be effectively identical, but it makes the diff against
upstream a bit clearer.
2020-12-21 22:04:22 -06:00
Alistair Leslie-Hughes
9912133b6a Release v6.0-rc3 2020-12-19 14:48:29 +11:00
Alistair Leslie-Hughes
14450482bc Updated mfplat-streaming-support patchset 2020-12-19 13:09:14 +11:00
Alistair Leslie-Hughes
a8947d8016 Rebase against 0aa6f8e2ea1e3f2e852bef1a07d0d1f983870150. 2020-12-19 12:29:38 +11:00
Alistair Leslie-Hughes
a5a402a003 Added ntdll-RtlQueryProcessPlaceholderCompatibilityMode patchset 2020-12-18 09:44:36 +11:00
Alistair Leslie-Hughes
2505882bc6 Rebase against 0aa6f8e2ea1e3f2e852bef1a07d0d1f983870150. 2020-12-18 09:21:49 +11:00
Alistair Leslie-Hughes
760b2fbc35 Updated widl-winrt-support patchset 2020-12-18 08:06:29 +11:00
Zebediah Figura
909415c8d0 setupapi-DiskSpaceList: Add a bug reference. 2020-12-17 14:50:58 -06:00
Alistair Leslie-Hughes
5cd622f667 Added dxdiag-new-dlls patchset 2020-12-17 20:57:15 +11:00
Alistair Leslie-Hughes
4004f81390 Added odbccp32-SQLWriteDSNToIni patchset 2020-12-17 10:01:37 +11:00
Alistair Leslie-Hughes
28c6e62cb9 Added d3drm-IDirect3D3-support patchset 2020-12-17 09:46:35 +11:00
Alistair Leslie-Hughes
df37ef7599 Updated mfplat-streaming-support patchset
Restore file.
2020-12-17 09:37:21 +11:00
Alistair Leslie-Hughes
3b4ce945a6 Updated dxva2-Video_Decoder patchset 2020-12-17 08:14:07 +11:00
Alistair Leslie-Hughes
6d67766abd Updated mfplat-streaming-support patchset 2020-12-17 07:44:48 +11:00
Paul Gofman
143e59bfe2 Updated bcrypt-ECDHSecretAgreement patchset.
Also fix fallback function table and backend function resolution.
2020-12-16 16:23:54 +03:00
Paul Gofman
7dbce711de Updated ntdll-Syscall_Emulation patchset. 2020-12-16 12:08:17 +03:00
Paul Gofman
53bbade133 Updated bcrypt-ECDHSecretAgreement patchset.
Update key_funcs[] in gcrypt.c and thus fix the crash
on attempt to compute ECDH secret agreement.
2020-12-16 00:30:51 +03:00
Alistair Leslie-Hughes
fe5b02cbbc Rebase against 04ddabfdff644561adf0e36050db1bbc63cad83a. 2020-12-15 10:55:34 +11:00
Paul Gofman
abb7ae8b1c Updated and reenabled ntdll-NtQueryVirtualMemory patchset. 2020-12-15 00:53:49 +03:00
Alistair Leslie-Hughes
0fc2f15ac5 Updated Staging patchset
Restore file removed by mistake.
2020-12-14 15:33:15 +11:00
Alistair Leslie-Hughes
c646dc9283 Release v6.0-rc2 2020-12-13 14:02:53 +11:00
Alistair Leslie-Hughes
d0b0b5be24 Updated ntdll-Junction_Points patchset
Fixes: https://bugs.winehq.org/show_bug.cgi?id=50303
2020-12-13 13:18:23 +11:00
Alistair Leslie-Hughes
8cbc70df46 Disable ntdll-NtAlertThreadByThreadId patchset
This patchset is causing applications to freeze on startup (intermittently).

Disabled until the root cause can be fixed.
2020-12-13 09:08:36 +11:00
Alistair Leslie-Hughes
a8684593e2 Updated mfplat-streaming-support patchset 2020-12-13 08:44:17 +11:00
Alistair Leslie-Hughes
e015f0590c Updated mfplat-streaming-support patchset
Godfall intro movie playback - Still crashes though if you dont click to skip before it ends.
2020-12-10 17:15:10 +11:00
Alistair Leslie-Hughes
dea57ccd5f Revert "Updated mfplat-streaming-support patchset"
This update cause regressions with UE4 based games.

This reverts commit 3511fe03ee.
2020-12-10 17:15:10 +11:00
Zebediah Figura
fd8727a320 eventfd_synchronization: Try harder to make sure hunks are applied in the right place.
As of dc77e28 hunks were getting swapped when applied after ntdll-NtAlertThreadByThreadId. Spotted by Etienne Juvigny.
2020-12-09 23:38:36 -06:00
Zebediah Figura
dc77e28b0f ntdll-NtAlertThreadByThreadId: New patch set. 2020-12-08 20:56:56 -06:00
Zebediah Figura
213037cb33 libs-Unicode_Collation: Replace with new patches from Fabian Maurer. 2020-12-08 20:14:26 -06:00
Zebediah Figura
fce121fcd9 ntdll-Junction_Points: Do not use O_SYMLINK if it is not defined.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50255
2020-12-05 22:16:49 -06:00
Zebediah Figura
2dc013940d ntdll-DOS_Attributes: Restore a definition for FreeBSD. 2020-12-05 21:48:19 -06:00
Zebediah Figura
8229c98169 server-Stored_ACLs: Define xattr_valid_namespace() where it's first used. 2020-12-05 21:46:14 -06:00
Alistair Leslie-Hughes
d7b71f0bb4 Release v6.0rc1 2020-12-05 15:50:13 +11:00
Alistair Leslie-Hughes
3511fe03ee Updated mfplat-streaming-support patchset 2020-12-05 11:15:09 +11:00
Alistair Leslie-Hughes
7ffd7fc333 Removed libs-Debug_Channel patchset
This patch would have to completely rewriten and hasn't been used for quite sometime.
2020-12-05 10:31:59 +11:00
Alistair Leslie-Hughes
7be9c41c35 Rebase against 842b38e29166a429d59331be40761335807c85d2. 2020-12-05 10:25:39 +11:00
Alistair Leslie-Hughes
e002d94a8b Rebase against 727168a9e116a43f851df2673a9169ad280a9ec8.
Includes an updated mfplat patchset.
2020-12-04 11:22:01 +11:00
Alistair Leslie-Hughes
5eb920dd83 Rebase against e4fbae832c868e9fcf5a91c58255fe3f4ea1cb30. 2020-12-03 10:02:16 +11:00
Zebediah Figura
968e22f2ed server-unix_name: New patch set. 2020-12-02 10:35:06 -06:00
Zebediah Figura
f9e86098b3 ntdll-Junction_Points: Updates from Erich E. Hoover. 2020-12-02 10:34:50 -06:00
Alistair Leslie-Hughes
023588ac34 Rebase against 447924a6d68f7919bd451661314a52aa99cab709. 2020-12-02 09:52:16 +11:00
Alistair Leslie-Hughes
d3b70d6278 Rebase against 2ad09b01673381261815bfc804a2f69ce4d85f86. 2020-12-01 10:45:13 +11:00
Alistair Leslie-Hughes
47fea9ffa2 Updated mfplat-streaming-support patchset 2020-11-30 14:14:26 +11:00
Alistair Leslie-Hughes
2a073f334b Rebase against cbca9f847f60773b4e7e5408f6a079f4896c5c1e. 2020-11-28 15:07:12 +11:00
Alistair Leslie-Hughes
3b0de86bf9 Rebase against 9faa5eeddd24a057d9ff522259c9dbdc6203c098. 2020-11-27 11:25:44 +11:00
Alistair Leslie-Hughes
b9d3415f29 Rebase against 40d4fbe45997a1820296e7909ba2212518bcfacc. 2020-11-26 09:32:07 +11:00
Alistair Leslie-Hughes
84bb779a9b Added user32-message-order patchset 2020-11-26 08:22:51 +11:00
Alistair Leslie-Hughes
3553024da0 Updated widl-winrt-support patchset
Thanks Rémi Bernon.
2020-11-25 22:14:33 +11:00
Alistair Leslie-Hughes
991f2e8ebf Rebase against 4807a8f588c67e2296474399368a96c0046120fd. 2020-11-24 09:12:33 +11:00
Zebediah Figura
837404f454 crypt32-CRYPT_KEY_PROV_INFO: New patch set. 2020-11-22 21:03:03 -06:00
Zebediah Figura
18032936f1 ntdll-Junction_Points: Updates from Erich E. Hoover. 2020-11-22 20:16:54 -06:00
Alistair Leslie-Hughes
0ae7315541 Updated mfplat-streaming-support patchset
Already handled upstream.
2020-11-22 17:57:24 +11:00
Alistair Leslie-Hughes
f257f37b92 Updated msvcrt-Math_Precision patchset
Fixes: https://bugs.winehq.org/show_bug.cgi?id=50161
Fixes: https://bugs.winehq.org/show_bug.cgi?id=50162
2020-11-22 11:21:53 +11:00
Alistair Leslie-Hughes
371d6ff606 Release v5.22 2020-11-21 11:24:11 +11:00
Alistair Leslie-Hughes
88ffa8d374 Rebase against bedfb9cae224a369efa4588332a5518dbee57035. 2020-11-21 09:56:05 +11:00
Alistair Leslie-Hughes
7734f7a808 Rebase against 65d917402f43d6c061668cff811f5fd6729d5750. 2020-11-19 14:33:39 +11:00
Alistair Leslie-Hughes
0192a7b36c Rebase against 764a93f121c6b0f88c3444454ebb85eb7cb63295. 2020-11-18 09:40:10 +11:00
Alistair Leslie-Hughes
5566259fb5 Rebase against 86e6c0bc28177a3794950fe2a13b8208400b6194. 2020-11-17 10:18:40 +11:00
Alistair Leslie-Hughes
7bdc1d6bac Updated eventfd_synchronization patchset 2020-11-15 14:23:28 +11:00
Alistair Leslie-Hughes
852a7d9a7d Removed dwmapi-DwmGetTransportAttributes patchset
Only contains tests, and DwmGetTransportAttributes is upstream.
2020-11-15 09:47:44 +11:00
Alistair Leslie-Hughes
3b6b470bca Rebase against cf49617c1a378dd4a37ab7226187708c501b046f. 2020-11-14 21:51:08 +11:00
Alistair Leslie-Hughes
cd3ee9b25d Rebase against 1f15ddce9c7d0ee71521d7b98c698488b76d3f01. 2020-11-12 09:22:07 +11:00
Alistair Leslie-Hughes
c7ea1850c7 Rebase against b940c5e7c91bff963336dd7d2c4defc3a82c75a1. 2020-11-11 10:26:07 +11:00
Alistair Leslie-Hughes
41c7c741d7 Updated mfplat-streaming-support patchset 2020-11-10 16:42:53 +11:00
Alistair Leslie-Hughes
009f571ba1 Rebase against 572aa09de1b0e3ba0e8b19f48d5e96539625bb0a. 2020-11-10 14:02:03 +11:00
Alistair Leslie-Hughes
e2d9f97b61 Release v5.21 2020-11-07 16:30:34 +11:00
Alistair Leslie-Hughes
c32fb530b8 Rebase against 70d77a439ab58dcf56664d1545aa0c4cd3edb31e. 2020-11-07 11:30:52 +11:00
Alistair Leslie-Hughes
9d2a93164f Rebase against 4919b9b99fe20cfb8599b7b827811fdd7937ea9d. 2020-11-06 11:12:16 +11:00
Alistair Leslie-Hughes
4130b2a71c Rebase against b793799d3d5facb765d97041669da4bc159b860b. 2020-11-05 11:02:49 +11:00
Alistair Leslie-Hughes
786cac8be4 Rebase against 908c837b17ac1c285ef32e98f53df730c3770295. 2020-11-04 10:18:49 +11:00
Paul Gofman
6ad4bdecd2 Updated ntdll-Syscall_Emulation patchset. 2020-11-03 19:55:50 +03:00
Alistair Leslie-Hughes
950d7c6c43 Rebase against dfa4c07941322dbcad54507cd0acf271a6c719ab. 2020-11-03 20:45:48 +11:00
Zebediah Figura
66561ecf5d patchinstall.py: Remove the autogenerated patch list. 2020-11-01 15:25:10 -06:00
Alistair Leslie-Hughes
7925f8829e Fix rebase 2020-11-01 08:27:02 +11:00
Alistair Leslie-Hughes
f7739e7052 Rebase against 03eaa2cc93e5e2ea4c36495870c268797aea3ca8. 2020-10-31 19:32:08 +11:00
Alistair Leslie-Hughes
44f49e8001 Rebase against c9e2deac39924473ac538ee22a2a0c0dbe3bad85. 2020-10-30 14:28:10 +11:00
Zebediah Figura
c118dfd709 msxml3-FreeThreadedXMLHTTP60: Restore a mistakenly deleted hunk.
Spotted by Gijs Vermeulen.
2020-10-29 10:47:54 -05:00
Alistair Leslie-Hughes
c811f7aa7e Rebase against 03395fdf71b606b589b917eab5d4766842188b91. 2020-10-29 15:52:40 +11:00
Alistair Leslie-Hughes
495ae4e9af Updated mfplat-streaming-support patchset 2020-10-28 15:13:16 +11:00
Alistair Leslie-Hughes
819539b19f Updated dinput-remap-joystick patchset
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50066
2020-10-28 15:10:34 +11:00
Zebediah Figura
bd2086ff97 Rebase against 2148167f2557cc6c7d1e2f5ffef28bd936503a9a. 2020-10-27 17:40:08 -05:00
Zebediah Figura
db6b6282eb bcrypt-ECDHSecretAgreement: Also add a missing RESOLVE_FUNC for key_asymmetric_duplicate.
Spotted by Juuso Alasuutari <juuso.alasuutari@gmail.com>.
2020-10-27 10:43:26 -05:00
Erich E. Hoover
3dc5147b28 ntdll-Junction_Points: Updates from Erich E. Hoover. 2020-10-26 22:07:42 -05:00
Zebediah Figura
d1a75649b7 bcrypt-ECDHSecretAgreement: Add a missing function table entry. 2020-10-26 18:44:49 -05:00
Zebediah Figura
40dda2bf72 Rebase against 93107c08f5aa7f37ad7ece9cd7ca248dba3030ce. 2020-10-26 18:36:59 -05:00
Zebediah Figura
534f6ae34e ntdll-Fix_Aligment: Remove patch set.
This is fixed upstream, presumably by e3e477e6a14fbcb153258b47d1905915dc4c1f22.
2020-10-24 15:42:52 -05:00
Zebediah Figura
411aeb2398 server-Stored_ACLs: Restore some definitions for FreeBSD. 2020-10-24 10:28:29 -05:00
Zebediah Figura
7e7e0bbe3e ntdll-DOS_Attributes: Restore some definitions for FreeBSD. 2020-10-24 10:28:17 -05:00
Alistair Leslie-Hughes
bf69e4ee2b Release v5.20 2020-10-24 12:18:18 +11:00
Alistair Leslie-Hughes
8d04884c1f Updated winex11.drv-Query_server_position patchset
Reverted to the older patch to stop issues with windows
not being hidden correctly.
2020-10-22 12:40:44 +11:00
Alistair Leslie-Hughes
8d07859cb1 Rebase against f6a5a3d03c1eb914444af96352ca54eec79d7e2c. 2020-10-22 08:18:16 +11:00
Alistair Leslie-Hughes
05efccaeaf Fix rebase 2020-10-21 20:19:12 +11:00
Alistair Leslie-Hughes
8cacc0d955 Updated mfplat-streaming-support patchset 2020-10-21 17:52:40 +11:00
Alistair Leslie-Hughes
5b5a6de9b8 Rebase against 42bba70a024060fbd698aadec20fbb6f61ad9e16. 2020-10-21 16:32:58 +11:00
Zebediah Figura
be9c96813a eventfd_synchronization: Create esync file descriptors for console server objects. 2020-10-17 19:24:53 -05:00
Zebediah Figura
ed56966feb eventfd_synchronization: Rebase and reënable. 2020-10-17 16:57:58 -05:00
Alistair Leslie-Hughes
80498dd440 Rebase against de679af492ed93d70c99dff7f7cfc01cc8f25eb0. 2020-10-16 10:49:21 +11:00
Alistair Leslie-Hughes
601cfd7fdb Updated mfplat-streaming-support patchset 2020-10-15 16:57:57 +11:00
Alistair Leslie-Hughes
6d726da3ba Rebase against e909986e6ea5ecd49b2b847f321ad89b2ae4f6f1. 2020-10-15 09:36:18 +11:00
Alistair Leslie-Hughes
6a87f0a479 Updated windows.networking.connectivity.dll patchset 2020-10-14 18:26:41 +11:00
Alistair Leslie-Hughes
2d12fd01d7 Updated windows.globalization-dll patchset 2020-10-14 18:24:09 +11:00
Alistair Leslie-Hughes
fbf364bce9 Updated windows.gaming.input-dll patchset 2020-10-14 18:12:00 +11:00
Alistair Leslie-Hughes
23ca7fe894 Updated windows.media.speech.dll patchset 2020-10-14 18:00:35 +11:00
Alistair Leslie-Hughes
ae8bdc6121 Added widl-winrt-support patchset 2020-10-14 17:43:08 +11:00
Alistair Leslie-Hughes
3cea972271 Rebase against f4a66ad257df4605e73dfea792eec55a70a04e84. 2020-10-14 08:12:47 +11:00
Paul Gofman
b49e874386 Updated and reenabled ntdll-FLS_Callbacks patchset. 2020-10-10 15:23:36 +03:00
Alistair Leslie-Hughes
6ea9eb634f Release v5.19 2020-10-10 10:18:47 +11:00
Alistair Leslie-Hughes
24fa2aa786 Updated bcrypt-ECDHSecretAgreement patchset 2020-10-10 09:06:27 +11:00
Alistair Leslie-Hughes
8bef81b0a6 Updated color-sRGB-profile patchset 2020-10-10 08:58:41 +11:00
Paul Gofman
ab4391f61b Updated ntdll-ForceBottomUpAlloc patchset. 2020-10-09 13:12:52 +03:00
Alistair Leslie-Hughes
f6356a2c93 Rebase against 412db7789379549c4f821acb11c92f7aabab71c9. 2020-10-09 08:19:43 +11:00
Alistair Leslie-Hughes
8c5be4c9e7 Updated xactengine2-dll patchset 2020-10-07 10:42:36 +11:00
Alistair Leslie-Hughes
48fc6b0ba0 Updated xactengine-initial patchset 2020-10-07 10:34:59 +11:00
Alistair Leslie-Hughes
ee0185d9e2 Rebase against c29f9e6ee7656aa028bb1630284e7d4873bd5b0f. 2020-10-07 10:30:27 +11:00
Paul Gofman
df02967431 Updated server-Object_Types patchset.
Don't grab type object in get_object_type().
2020-10-06 23:37:25 +03:00
Alistair Leslie-Hughes
87a40ed683 Rebase against 568e3e8b697a960881c162671a33c28727921797. 2020-10-06 10:01:40 +11:00
Alistair Leslie-Hughes
194669052e Updated bcrypt-ECDHSecretAgreement patchset 2020-10-03 18:55:33 +10:00
Alistair Leslie-Hughes
aa7895faf6 Updated mfplat-streaming-support patchset 2020-10-03 18:10:26 +10:00
Alistair Leslie-Hughes
f82518af72 Rebase against cce4f36e214125173a8df84d27ba5b33df8d1434. 2020-10-03 15:35:36 +10:00
Alistair Leslie-Hughes
7145412e08 Rebase against fa9f4a20f5305b7cbcfe3a644d39d4b759f89203. 2020-10-02 08:48:09 +10:00
Alistair Leslie-Hughes
cd9f6dbd90 Updated xactengine-initial patchset
Use the Version 2 of the tests patch whcih moved them to xactengine.
Seperated out x3daudio1_7 library into it's own patch.
2020-10-01 19:14:39 +10:00
Alistair Leslie-Hughes
e634569429 Rebase against d45b3d4fdd7cbcfdba70c327ab90976a3b658da2. 2020-10-01 08:58:16 +10:00
Zebediah Figura
76a479203b Rebase against 23c6dd55b8c983ec88cada0a6d6c75ee9cd93976. 2020-09-29 15:52:53 -05:00
Alistair Leslie-Hughes
639755741e Rebase against 2ee75bf9ade3e90f10ffe4236c8c95d817402392. 2020-09-29 12:58:11 +10:00
Alistair Leslie-Hughes
9acfa3b899 Added windows.networking.connectivity.dll patchset 2020-09-28 15:32:22 +10:00
Alistair Leslie-Hughes
7b32c6a57f Updated mfplat-streaming-support patchset 2020-09-28 15:32:21 +10:00
Zebediah Figura
7bd8acb4ca ntdll-Junction_Points: Updates from Erich E. Hoover.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49790
2020-09-27 20:30:44 -05:00
Alistair Leslie-Hughes
0a299f39c8 Release v5.18 2020-09-28 10:00:50 +10:00
Zebediah Figura
f22ff249a9 Rebase against 9a6e5b23293fbad3bbdcd52007402a3b9a1cb99d. 2020-09-26 15:18:07 -05:00
Zebediah Figura
f90534f9da xactengine-initial: Rebase and re-enable. 2020-09-24 21:16:37 -05:00
Zebediah Figura
de03562a2d Rebase against 5f24f3012469f7056aa9b22765af1c0f11e1f6a2. 2020-09-24 20:34:42 -05:00
Zebediah Figura
831d2d8b52 Rebase against 0a49202109e29bd18daaf746cb9493e385511e13. 2020-09-23 18:52:01 -05:00
Zebediah Figura
5087d8a8d9 Rebase against 1a7b256f7c69c50c2a216317e03f9caeb268d0af. 2020-09-23 17:32:29 -05:00
Alistair Leslie-Hughes
22ed5ee061 Added xactengine2-dll 2020-09-19 18:08:41 +10:00
Alistair Leslie-Hughes
003d5833c2 Added windows.globalization-dll patchset 2020-09-18 11:11:59 +10:00
Alistair Leslie-Hughes
151728b04d Updated dbghelp-Debug_Symbols patchset 2020-09-16 15:13:10 +10:00
Alistair Leslie-Hughes
83c7e2a993 Updated color-sRGB-profile 2020-09-16 15:09:31 +10:00
Alistair Leslie-Hughes
91a9c0e3db Rebase against 666c5b6e20e3b9e1e34d10b88372406f494699f2. 2020-09-15 11:25:35 +10:00
Alistair Leslie-Hughes
c35a3386eb Release v5.17.2 2020-09-13 15:09:46 +10:00
Alistair Leslie-Hughes
2996658d6a Updated mfplat-streaming-support patchset 2020-09-13 14:08:47 +10:00
Alistair Leslie-Hughes
c7aa87d8a2 Release v5.17.1 2020-09-13 09:37:57 +10:00
Alistair Leslie-Hughes
4125a9880c Updated ntdll-Junction_Points patchset
Fix compile error on older systems.
2020-09-13 09:32:34 +10:00
Alistair Leslie-Hughes
c44db537f1 Release v5.17 2020-09-12 14:55:20 +10:00
Zebediah Figura
71ac12a8e3 server-Desktop_Refcount: Remove patch set.
This was first added in 78db8b7950 with the
message "Added patch to fix possible leak of explorer.exe processes and
implement proper desktop refcounting." The message of course suggests that
even then no application was known that actually depended on this.

In practice this seems wrong, also: once all non-system processes other than
explorer have terminated, the only way explorer.exe can remain alive is if a
system process holds a reference to explorer. The only relevant system
processes are services, and services cannot display a GUI [this is enforced
since Vista], so this should never be the case.
2020-09-11 23:09:57 -05:00
Zebediah Figura
7fc716aa5f Rebase against 01bacebba418bf6f58a644b1aab41be215bd200a. 2020-09-11 23:05:50 -05:00
Alistair Leslie-Hughes
d34ff18679 Disabled color-sRGB-profile
This is causing a lockup of rundll32.
2020-09-11 19:14:29 +10:00
Alistair Leslie-Hughes
a2fed1b240 Updated windows.media.speech.dll patchset 2020-09-11 12:29:08 +10:00
Alistair Leslie-Hughes
88f994eb57 Added color-sRGB-profile patchset 2020-09-11 10:05:53 +10:00
Zebediah Figura
88e6b6c65c Rebase against 0ead40dc9b87ebbd74ad6ebda0182365ab2efde3. 2020-09-09 19:57:52 -05:00
Alistair Leslie-Hughes
9a9401026f Updated mfplat-streaming-support patchset 2020-09-09 14:08:45 +10:00
Alistair Leslie-Hughes
d79463a8b3 Added msxml3-FreeThreadedXMLHTTP60 patchset 2020-09-09 12:37:05 +10:00
Alistair Leslie-Hughes
ec77bc9d66 Added kernelbase-CreateFile2 patchset 2020-09-09 12:34:27 +10:00
Alistair Leslie-Hughes
5969ae1e56 Added combase-CoCreateInstanceFromApp patchset 2020-09-09 12:04:06 +10:00
Alistair Leslie-Hughes
5e685d6df9 Removed --patches patchupdate.py support
Since the patch to print --patches has been removed.  Dont generate the data.
2020-09-09 11:13:11 +10:00
Zebediah Figura
ad66963dff Rebase against 8827eb6a83348057293f89be535ccb74607db608. 2020-09-08 19:35:45 -05:00
Alistair Leslie-Hughes
480bf20bec Rebase against 7ec069d85f5235db98e57291825b9d602ae47ed5. 2020-09-08 08:57:31 +10:00
Alistair Leslie-Hughes
7a5a98a14b Updated server-Desktop_Refcount patchset 2020-09-07 14:03:16 +10:00
Zebediah Figura
0505562a30 Rebase against 432858b285d2b63eca6f99a162c9a13dd6e6ac71. 2020-09-04 17:22:08 -05:00
Zebediah Figura
d7df18ad2d server-Desktop_Refcount: Add more alloc_handle callbacks to new objects. 2020-09-03 21:33:08 -05:00
Zebediah Figura
603343a361 Staging: Add mistakenly omitted backslash to NT object path name. 2020-09-03 21:26:52 -05:00
Zebediah Figura
1d149ff59d Rebase against 314368e6c442f043ebfc22b70c1113e4e6232c04. 2020-09-03 21:24:20 -05:00
Alistair Leslie-Hughes
285e594688 Rebase against 87f41e6b408dd01055ff6a378b90d089d61ec370. 2020-09-03 08:40:02 +10:00
Zebediah Figura
6c6ef5bfa4 Rebase against 00a0e2cd8c4df240371ddd22516e4e3544a142ce. 2020-09-02 09:38:53 -05:00
Alistair Leslie-Hughes
db87b45e49 Added windows.media.speech.dll patchset 2020-09-01 12:54:02 +10:00
Alistair Leslie-Hughes
21620bf3cf Rebase against 518d06404ad70aa9812a77d019a18fe79c16f831. 2020-09-01 12:17:43 +10:00
Alistair Leslie-Hughes
f6495b290f Updated mfplat-streaming-support patchset 2020-08-30 13:07:52 +10:00
Alistair Leslie-Hughes
caf4d5011e Updated windows.gaming.input-dll patchset
Add Wine bug for tracking
2020-08-30 13:06:33 +10:00
Alistair Leslie-Hughes
c3138a19dc Release v5.16 2020-08-30 09:12:20 +10:00
Alistair Leslie-Hughes
5af9636365 Rebase against 5bb27d1edb2b6c8c04991cc88e54f161f0c41625. 2020-08-29 08:55:38 +10:00
Alistair Leslie-Hughes
fd175dc863 Rebase against 7489efa03f09c6c3613668a0169abade6b390d09. 2020-08-28 09:44:07 +10:00
Alistair Leslie-Hughes
2b119ef030 Rebase against 666f614f3f09211614024f87a238aa49c79f574a. 2020-08-27 09:15:54 +10:00
Alistair Leslie-Hughes
c4b73e1752 Added windows.gaming.input-dll patchset 2020-08-26 18:44:32 +10:00
Alistair Leslie-Hughes
424cc0395c Added srvcli-dll patchset 2020-08-26 18:15:23 +10:00
Alistair Leslie-Hughes
298af8f9fe Added netutils-dll patchset 2020-08-26 18:07:51 +10:00
Alistair Leslie-Hughes
416f7f3bb5 Added xactengine3_7-PrepareWave patchset 2020-08-26 17:56:15 +10:00
Alistair Leslie-Hughes
8321c62f24 Rebase against a53288e8c95d59b03eefe10f4963b555b04426aa. 2020-08-26 10:01:53 +10:00
Zebediah Figura
d452acf61b Rebase against aaea13a128b76fa0076b8852187c7d10e5eb5d68. 2020-08-24 21:21:59 -05:00
Alistair Leslie-Hughes
663c3ba497 Rebase against ab94abb14f74fe863ae40dafc7a8301db22792fc. 2020-08-22 09:32:28 +10:00
Alistair Leslie-Hughes
4242749b5b Rebase against 13ea90d80f7275e1ad4f3fc3c1c75b68bdbefbb4.
Two patches have been disabled and I think they need to rewritten to use the
PS_ATTRIBUTE_TOKEN attribute instead of calling the RtlCreateUserProcess directly.
2020-08-21 17:46:43 +10:00
Zebediah Figura
7d08bb86e1 Rebase against 8f3bd63b52f03ff05e9d2a00a2e129a0b0092969. 2020-08-18 19:41:11 -05:00
Alistair Leslie-Hughes
28fad42582 Updated mfplat-streaming-support patchset
Fix typo.
2020-08-17 07:56:43 +10:00
Alistair Leslie-Hughes
68c50a8fb4 Updated mfplat-streaming-support patchset
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=49708
2020-08-16 14:49:27 +10:00
Zebediah Figura
47035cfbf5 readme: Edits to the paragraphs on donation. 2020-08-15 19:48:05 -05:00
Alistair Leslie-Hughes
8e20899551 Release v5.15.2 2020-08-16 10:39:10 +10:00
Zebediah Figura
03290f8a41 ole32-HGLOBALStream: Properly rebase. 2020-08-15 19:32:53 -05:00
Alistair Leslie-Hughes
c811ed7bd9 Release v5.15.1 2020-08-16 09:34:43 +10:00
Zebediah Figura
d9eb78e597 ole32-HGLOBALStream: Remove patches for thread safety.
On the recommendation of Huw Davies, on the grounds that no known application needs them, and that ole32 is in general not thread-safe.
2020-08-15 15:47:53 -05:00
Zebediah Figura
150ce22fa2 mfplat-streaming-support: Correct a variable name.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49705
2020-08-15 12:15:07 -05:00
Alistair Leslie-Hughes
eae4093bf8 Release v5.15 2020-08-15 17:34:37 +10:00
Alistair Leslie-Hughes
621cf69c80 Updated mfplat-streaming-support patchset
Fixed memory leak
2020-08-15 17:33:28 +10:00
Zebediah Figura
bc6c681225 Rebase against 447bce4117a58910690a0d2610ebcbdd49ae9127. 2020-08-13 19:43:35 -05:00
Zebediah Figura
46420edcd0 Rebase against 03e9de4920173d3fa955cf28a8d2b60bd3b06261. 2020-08-11 19:17:01 -05:00
Alistair Leslie-Hughes
af56d3821a Added mfplat-streaming-support patchset 2020-08-11 10:37:52 +10:00
Zebediah Figura
32082f4d6f Rebase against 1ec8bf9b739f1528b742169670eac2350b33a7d4. 2020-08-07 17:06:06 -05:00
Alistair Leslie-Hughes
59e6a606b9 Added programs-systeminfo patchset 2020-08-07 14:44:27 +10:00
Alistair Leslie-Hughes
bf043458ba Updated programs-findstr patchset 2020-08-07 14:17:41 +10:00
Zebediah Figura
7c1249e5c0 Rebase against 8cbbb4f394678411fdb57237553f5d974527877f. 2020-08-06 18:17:01 -05:00
Alistair Leslie-Hughes
3b24c1cf1d Rebase against f7895ef25a4cb2115ffbe04d28b87bcb6ee3c0b7. 2020-08-06 10:04:28 +10:00
Alistair Leslie-Hughes
eb32fd78ae Rebase against 2b76b9f234eb5d4753337d8b080f2c050daae3ff. 2020-08-05 10:37:50 +10:00
Alistair Leslie-Hughes
e4a11b1663 Rebase against 18d7bc985990c1022a9f42d20cc819ba141af5cb. 2020-08-04 10:43:36 +10:00
Alistair Leslie-Hughes
90d57326b5 Added winmm-fullpath patchset 2020-08-03 18:53:37 +10:00
Alistair Leslie-Hughes
b71d588d78 Release v5.14 2020-08-02 14:09:58 +10:00
Alistair Leslie-Hughes
bafd1bfc74 Update README.md 2020-08-02 14:06:53 +10:00
Alistair Leslie-Hughes
23ae4e6c7a Rebase against 70b735760e2e89db11aa76ab3956ea0d1f6e40d4. 2020-08-02 13:53:05 +10:00
Alistair Leslie-Hughes
6ecb8df033 Added programs-findstr patchset 2020-07-31 11:49:51 +10:00
Alistair Leslie-Hughes
364ce82bd1 Rebase against ed8358393413d52096c56e96b44ee73f15053f91. 2020-07-31 11:28:43 +10:00
Alistair Leslie-Hughes
261a981d77 Rebase against 6d66efa3fee7f529bba6c478e71d54e0d66995f5. 2020-07-29 09:47:49 +10:00
Zebediah Figura
f7013bb1b4 Rebase against 0d42388095e4fd5c7702a61824b01ce0f9fc4d74. 2020-07-24 18:41:25 -05:00
Alistair Leslie-Hughes
99c296e10c Rebase against 2a6de8d7f7d6f5ac018d8e330cfa580fc0c3b9e5. 2020-07-24 09:56:26 +10:00
Alistair Leslie-Hughes
02be23fa52 Rebase against 07030059486e0121051b452c94d37f12931cabf4. 2020-07-23 09:33:43 +10:00
Alistair Leslie-Hughes
352d5a391b Rebase against a599d645e33a128fae2d6fbfd7fdc07a8cefda95. 2020-07-22 08:10:30 +10:00
Zebediah Figura
4373a1011e Rebase against a455ff61b40ff73b48d0ccc9c1f14679bb65ab8d. 2020-07-20 19:55:28 -05:00
Paul Gofman
26d3815d8c Updated ntdll-WRITECOPY patchset.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49577
2020-07-20 20:08:02 +03:00
Alistair Leslie-Hughes
54ae005107 Release v5.13 2020-07-19 09:30:32 +10:00
Alistair Leslie-Hughes
0e493bcef1 Added user32-QueryDisplayConfig 2020-07-19 09:25:32 +10:00
Alistair Leslie-Hughes
ee89d77f18 Added ntdll-freebsd-compile 2020-07-19 09:06:06 +10:00
Zebediah Figura
4ffe305c90 ntdll-Junction_Points: Update with rebased patch set from Erich E. Hoover. 2020-07-18 11:58:32 -05:00
Zebediah Figura
1a87edb76b Rebase against 536aec511612afd002808508d76bd5640f359f25. 2020-07-17 17:52:46 -05:00
Alistair Leslie-Hughes
914f67c020 Rebase against 9415667cdfbb4c94cdfe03a1e80a87482bee98c1. 2020-07-17 11:26:22 +10:00
Alistair Leslie-Hughes
c3c5d48b18 Rebase against 42cb7d2ad1caba08de235e6319b9967296b5d554. 2020-07-16 09:08:33 +10:00
Paul Gofman
884f646404 Updated winebuild-pe_syscall_thunks patchset.
Fix context eip in NtGetContextThread() on i386.
2020-07-15 12:48:46 +03:00
Paul Gofman
5c4729e4ce Updated winebuild-pe_syscall_thunks patchset.
Fix non-PE build.
2020-07-15 02:55:55 +03:00
Zebediah Figura
103195f07d Rebase against 54b2a10659871032720df31ae9ca6cba2ff4acf0. 2020-07-14 18:10:39 -05:00
Paul Gofman
3acacd0ee1 Updated and reenabled ntdll-Syscall_Emulation patchset. 2020-07-14 16:13:54 +03:00
Paul Gofman
d2d0366ce5 Added winebuild-pe_syscall_thunks patchset.
Restores the major bits of functionality of
the former 'winebuild-Fake_Dlls' patchset which
are yet missing upstream.
2020-07-14 16:08:50 +03:00
Zebediah Figura
913b39b117 Rebase against fdb3d9ae320363c1bd9fa716b167a7ad313e638b. 2020-07-13 17:56:04 -05:00
Zebediah Figura
4d315a6098 ntdll-DOS_Attributes: Correct rebase. 2020-07-11 15:42:27 -05:00
Zebediah Figura
5e5dafe07a ntdll-SystemRoot_Symlink: Remove patch set.
This patch is just incorrect. wineserver always is case-sensitive unless OBJ_CASE_INSENSITIVE is specified.

For reference, the relevant cygwin code:
https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/shared.cc;h=c939e0d0fb88506684038c01c5fd6141c8f130f8;hb=refs/heads/master
2020-07-11 12:32:23 -05:00
Zebediah Figura
bb79717d86 ntdll-NtDevicePath: Remove incorrect CDECL from nt_to_unix_file_name().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49555
2020-07-11 10:21:36 -05:00
Zebediah Figura
b1219b7fae Rebase against caa41d4917a84dbbeb4aa14f18cfecfd17efe71a. 2020-07-10 21:10:05 -05:00
Zebediah Figura
046f6604b7 Rebase against 18ae539c914a9b5a89f63d8cf9c2a21273eccc6c. 2020-07-09 23:17:40 -05:00
Zebediah Figura
f6954e6e77 Rebase against 262e4ab9e0eeb126dde5cb4cba13fbf7f1d1cef0. 2020-07-08 20:46:51 -05:00
Alistair Leslie-Hughes
553c1cff5a dsound-EAX - Fix compile 2020-07-08 10:38:50 +10:00
Zebediah Figura
4ef21bcf82 dsound-EAX: Correct rebase against 130870084 and e09190399. 2020-07-07 18:10:13 -05:00
Zebediah Figura
ebbd01086e kernel32-K32GetPerformanceInfo: Remove patch set.
As of 8622eb326fb, SystemProcessInformation should now actually be reasonably
fast, requiring only a couple of server calls. This patch set would make
K32GetPerformanceInfo() even faster, but without any record of what it helps,
it's not particularly likely that it's making a significant difference anymore.
2020-07-07 18:05:07 -05:00
Zebediah Figura
b1765ff74e Rebase against e0e3b6bc91f7db956e3a66f2938eea45d4055a39. 2020-07-07 17:59:50 -05:00
Alistair Leslie-Hughes
21a97e1f88 Rebase against 6e2a54ec76d225d76506fe909a9c300702636d5b. 2020-07-07 08:50:59 +10:00
Alistair Leslie-Hughes
4f13965432 Release v5.12.1
Compile Fixes.
2020-07-06 07:55:07 +10:00
Zebediah Figura
3dd8d0e647 xactengine-initial: Correct a spelling error in the definition of IXACT3Engine_Initialize. 2020-07-05 11:36:37 -05:00
Zebediah Figura
3f3a05f91c xactengine-initial: Get rid of the separate IXACT34Cue implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49514
2020-07-04 11:38:26 -05:00
Alistair Leslie-Hughes
f48f106853 Release v5.12 2020-07-04 11:59:57 +10:00
Zebediah Figura
2e111fae10 ntdll-NtQueryVirtualMemory: Correct rebase. 2020-07-03 19:21:33 -05:00
Zebediah Figura
9cca205cc2 ntdll-NtQueryVirtualMemory: Rebase and re-enable. 2020-07-03 18:23:02 -05:00
Zebediah Figura
502c444d9c Rebase against 51dd1ba02e4a96a3e0c9381a434bfd1fd4347d83. 2020-07-03 18:18:38 -05:00
Alistair Leslie-Hughes
215d78f8e1 Rebase against 8bd5fe30014c2aa60f0c4570db4ef936e8c51245. 2020-07-03 08:19:34 +10:00
Alistair Leslie-Hughes
cbdc68f558 Updated patchinstall.sh for server-Key-State 2020-07-02 09:58:06 +10:00
Alistair Leslie-Hughes
6125243d3a Rebase against 10b17932fa829fac10a5e6717d96ed5d56de80fe. 2020-07-02 08:27:54 +10:00
Zebediah Figura
262df397ef server-Key_State: Rebase and restore mistakenly deleted patch. 2020-06-30 19:15:34 -05:00
Zebediah Figura
f904ca32a3 user32-rawinput-*: Rebase and re-enable.
Thanks to Rémi Bernon for the rebased patch sets.
2020-06-30 17:30:13 -05:00
Zebediah Figura
70f6f6d7e4 Rebase against 359ee2ecc21b08e4118f0f77b3a208e4b5e1e63d. 2020-06-30 17:11:27 -05:00
Zebediah Figura
4995d0d3af ntdll-ThreadTime: Correct rebase. 2020-06-29 20:55:04 -05:00
Zebediah Figura
40099e26bf ntdll-ThreadTime: Rebase and re-enable. 2020-06-29 19:03:01 -05:00
Zebediah Figura
70d8178927 Rebase against ec9e556d31278d2de28b8ba82a063dc9fffdb440. 2020-06-29 18:56:48 -05:00
Zebediah Figura
b6c2818755 server-Desktop_Refcount: Add missing alloc_handle() callback.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49463
2020-06-27 11:22:04 -05:00
Alistair Leslie-Hughes
37fc290f77 Rebase against 13b2587d4f55d64a1381c60ac34acf4abe6bb1e8. 2020-06-27 11:39:24 +10:00
Alistair Leslie-Hughes
82cff8bbdb Rebase against fe4379eb19a201d45bc0d2d51270db133fd23a77. 2020-06-26 11:07:53 +10:00
Alistair Leslie-Hughes
df2fd22e4d Added winevulkan-vkGetPhysicalDeviceSurfaceCapabilitiesKHR patchset 2020-06-25 10:03:16 +10:00
Alistair Leslie-Hughes
60074b960f Rebase against 1f6423f778f7036a3875613e10b9c8c3b84584f0. 2020-06-25 08:19:10 +10:00
Paul Gofman
97fbe3fe04 Updated ntdll-ForceBottomUpAlloc patchset. 2020-06-24 20:02:02 +03:00
Paul Gofman
f2686a1537 Updated ntdll-ForceBottomUpAlloc patchset. 2020-06-24 17:49:51 +03:00
Zebediah Figura
7766c17912 Rebase against bc282905d9491b9f9fe4ae4b69a8ccdf99c5aaa8. 2020-06-23 18:07:36 -05:00
Paul Gofman
8402c95961 Updated server-Stored_ACLs patchset.
Do not turn file type into FD_TYPE_CHAR when setting
security descriptor.
2020-06-23 13:11:59 +03:00
Zebediah Figura
6274392d27 Rebase against 449b8c7e9212d0a80e28babff20f2755b7370872. 2020-06-22 17:21:09 -05:00
Alistair Leslie-Hughes
102af10c89 Updated winemenubuilder-Desktop_Icon_Path patchset
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49415
2020-06-22 13:56:19 +10:00
Alistair Leslie-Hughes
3d9a927266 Release v5.11 2020-06-20 11:51:49 +10:00
Zebediah Figura
8e5546184f ntdll-Junction_Points: Rebase and re-enable. 2020-06-18 20:41:39 -05:00
Zebediah Figura
d799e8fd82 Rebase against e80df2d2d54a3f16389bea77f6863cc1c05d6251. 2020-06-18 19:13:40 -05:00
Alistair Leslie-Hughes
02913f754f Rebase against 67ef5151744b347d4a30c985da6712fb0061e675. 2020-06-18 08:59:21 +10:00
Zebediah Figura
03f5adcafb advapi32-Token_Integrity_Level: Correct rebase. 2020-06-16 19:38:49 -05:00
Alistair Leslie-Hughes
984d402240 Rebase against f56e409c2feb62056eb133e53fe398eadd0a503e. 2020-06-17 10:06:04 +10:00
Zebediah Figura
32fcc0d75b Rebase against 634cb775c27b61ad6ce1fbe3e9972b0edfa31dcb. 2020-06-15 17:43:18 -05:00
Zebediah Figura
b6595d9e28 Rebase against 948a6a47b8dbd0ddd86cad04de03f0e4ba81b65d. 2020-06-12 18:15:13 -05:00
Alistair Leslie-Hughes
eb4f9db59c Updated wow64cpu-Wow64Transition patchset
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49025
2020-06-12 09:41:04 +10:00
Alistair Leslie-Hughes
11f545447b Rebase against 22970932d014f024fcf7f0f98b1a5384b1b1eb99. 2020-06-12 09:35:12 +10:00
Paul Gofman
7934e14fc0 Updated ntdll-Syscall_Emulation patchset.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49362
2020-06-11 15:26:30 +03:00
Paul Gofman
5306e1df11 Updated winebuild-Fake_Dlls patchset.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49357
2020-06-11 15:23:16 +03:00
Alistair Leslie-Hughes
938c0aa155 Rebase against 343043153b44fa46a2081fa8a2c171eac7c8dab6. 2020-06-11 08:44:26 +10:00
Zebediah Figura
cb2a6551bc Rebase against bf454cc39428fc5299e5c26d9c0ddc6a9277c7ae. 2020-06-09 18:27:57 -05:00
Zebediah Figura
9a4c8c5631 Rebase against 17529582402ebe27ef975fc7dcb8353f4f95e629. 2020-06-08 16:00:03 -05:00
Paul Gofman
044cb93066 Updated ntdll-ForceBottomUpAlloc patchset.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49326
2020-06-08 15:33:28 +03:00
704 changed files with 44382 additions and 41900 deletions

View File

@@ -79,4 +79,32 @@ Contributing
For information on contributing to Wine-Staging, please see
<https://wiki.winehq.org/Wine-Staging_Contributing>. Note that GitHub pull
requests are strongly dispreferred, especially for patches.
requests are strongly dispreferred, especially for patches.
Donations
---------
wine-staging is a large set of experimental patches which provide various
improvements to WINE, but are not quite suitable for upstreaming. This set of
patches has been continuously managed for many years by a small group of
volunteers. The way this works is that we often review patches attached to
various bug reports found at https://bugs.winehq.org/ which may fix bugs, but
may not be quite suitable to be upstreamed due to needing some cleanup or more
proper implementation. In the event that this happens, we add the patches to
wine-staging instead, and keep them updated and maintained as well as attempt to
clean them up to be upstreamed. We also both write and verify patches which fix
various bugs that may not have patches, and in turn allow them run better using
WINE. This includes testing on various hardware, games, and applications.
Any expenses for applications, games, or hardware which we do not own comes out
of pocket. In order to alleviate these expenses, we are now accepting donations.
This in turn allows us to continue to perform testing, provide fixes, and get
them upstreamed, ultimately aiming to provide a better experience for all WINE
users. All of our work is provided publicly for free and can be found at
<https://github.com/wine-staging/wine-staging>. We do not expect to be paid for
any of the work provided, nor will donators receive any special benefits or
compensation.
Donations are recieved through Patreon. Anyone interested may donate here:
https://www.patreon.com/winestaging

View File

@@ -1,4 +1,4 @@
From 7529755fcc41fda650aac6b27f34438354435d34 Mon Sep 17 00:00:00 2001
From b51fdc7e211f676d169c937209bf689e57252c5d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 22 Mar 2016 21:58:40 +0100
Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
@@ -9,10 +9,10 @@ Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index 9280b5d32..2f0974a4c 100644
index aa51c744297..7cad015480f 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -1887,7 +1887,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
@@ -2130,7 +2130,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
if (!iface)
return NULL;
assert(iface->lpVtbl == (IDWriteFontVtbl*)&dwritefontvtbl);
@@ -21,7 +21,7 @@ index 9280b5d32..2f0974a4c 100644
}
struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
@@ -1895,7 +1895,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
@@ -2138,7 +2138,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
if (!iface)
return NULL;
assert(iface->lpVtbl == (IDWriteFontFaceVtbl*)&dwritefontfacevtbl);
@@ -31,10 +31,10 @@ index 9280b5d32..2f0974a4c 100644
static struct dwrite_fontfacereference *unsafe_impl_from_IDWriteFontFaceReference(IDWriteFontFaceReference *iface)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index b9321157a..76ea23ba6 100644
index 1f6201a6a93..35791d5c22e 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -5895,7 +5895,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
@@ -5886,7 +5886,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
static struct dwrite_textformat *unsafe_impl_from_IDWriteTextFormat(IDWriteTextFormat *iface)
{
return (iface->lpVtbl == (IDWriteTextFormatVtbl*)&dwritetextformatvtbl) ?
@@ -42,7 +42,7 @@ index b9321157a..76ea23ba6 100644
+ CONTAINING_RECORD((IDWriteTextFormat3 *)iface, struct dwrite_textformat, IDWriteTextFormat3_iface) : NULL;
}
HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STYLE style,
HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight,
--
2.24.0
2.29.2

View File

@@ -1,49 +1,60 @@
From aa9cb874b1fb89601d6a5a735b442b8a7aa7b3aa Mon Sep 17 00:00:00 2001
From 0cf6433af95363c5fbba2af482b2ba50b863dfb7 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 2 Oct 2014 19:44:31 +0200
Subject: [PATCH] kernel32: Add winediag message to show warning, that this
isn't vanilla wine.
Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
branch name and version.
---
dlls/kernel32/process.c | 11 +++++++++++
1 file changed, 11 insertions(+)
dlls/ntdll/loader.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 8f506fcf1320..45bfe7fe7b5d 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -60,6 +60,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(process);
WINE_DECLARE_DEBUG_CHANNEL(relay);
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 20bc3f977d1..c2187a19397 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -44,6 +44,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
WINE_DECLARE_DEBUG_CHANNEL(snoop);
WINE_DECLARE_DEBUG_CHANNEL(loaddll);
WINE_DECLARE_DEBUG_CHANNEL(imports);
+WINE_DECLARE_DEBUG_CHANNEL(winediag);
typedef struct
{
@@ -125,6 +126,7 @@ static inline DWORD call_process_entry( PEB *peb, LPTHREAD_START_ROUTINE entry )
#ifdef _WIN64
#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
@@ -3456,6 +3457,7 @@ static void process_breakpoint(void)
__ENDTRY
}
#endif
+extern const char * CDECL wine_get_version(void);
/***********************************************************************
* __wine_start_process
*
@@ -150,6 +152,15 @@ void CDECL __wine_start_process( LPTHREAD_START_ROUTINE entry, PEB *peb )
__TRY
{
+ if (CreateEventA(0, 0, 0, "__winestaging_warn_event") && GetLastError() != ERROR_ALREADY_EXISTS)
+ {
+ FIXME_(winediag)("Wine Staging %s is a testing version containing experimental patches.\n", wine_get_version());
+ FIXME_(winediag)("Please mention your exact version when filing bug reports on winehq.org.\n");
+ }
+ else
+ WARN_(winediag)("Wine Staging %s is a testing version containing experimental patches.\n", wine_get_version());
+
+
if (!CheckRemoteDebuggerPresent( GetCurrentProcess(), &being_debugged ))
being_debugged = FALSE;
/******************************************************************
* LdrInitializeThunk (NTDLL.@)
@@ -3465,6 +3467,9 @@ static void process_breakpoint(void)
*/
void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR unknown3, ULONG_PTR unknown4 )
{
+ OBJECT_ATTRIBUTES staging_event_attr;
+ UNICODE_STRING staging_event_string;
+ HANDLE staging_event;
static int attach_done;
int i;
NTSTATUS status;
@@ -3483,6 +3488,16 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
entry = (void **)&context->u.s.X0;
#endif
+ RtlInitUnicodeString( &staging_event_string, L"\\__wine_staging_warn_event" );
+ InitializeObjectAttributes( &staging_event_attr, &staging_event_string, OBJ_OPENIF, NULL, NULL );
+ if (NtCreateEvent( &staging_event, EVENT_ALL_ACCESS, &staging_event_attr, NotificationEvent, FALSE ) == STATUS_SUCCESS)
+ {
+ FIXME_(winediag)("wine-staging %s is a testing version containing experimental patches.\n", wine_get_version());
+ FIXME_(winediag)("Please mention your exact version when filing bug reports on winehq.org.\n");
+ }
+ else
+ WARN_(winediag)("wine-staging %s is a testing version containing experimental patches.\n", wine_get_version());
+
if (process_detaching) NtTerminateThread( GetCurrentThread(), 0 );
RtlEnterCriticalSection( &loader_section );
--
2.26.2
2.28.0

View File

@@ -1,39 +1,35 @@
From c097870c69720ece3874ad4ff987408a8c24ffb2 Mon Sep 17 00:00:00 2001
From ce5e1fc75139e4de9d92dfe27b4a513a96da013c Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 2 Oct 2014 19:53:46 +0200
Subject: [PATCH] winelib: Append '(Staging)' at the end of the version string.
---
dlls/ntdll/Makefile.in | 2 +-
libs/wine/Makefile.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Makefile.in | 2 +-
dlls/ntdll/Makefile.in | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 307a95b3b1a..61019fed949 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -116,7 +116,7 @@ install-manpages:: manpages
# Rules for generated source files
dlls/ntdll/unix/version.c: dummy
- @version=`(GIT_DIR=$(srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || ($(RM) $@ && exit 1)
+ @version=`(GIT_DIR=$(srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1 (Staging)";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || (rm -f $@ && exit 1)
programs/winetest/build.rc: dummy
@build="STRINGTABLE { 1 \"`GIT_DIR=$(srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || (rm -f $@ && exit 1)
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
index ebf607e9d43..de93445d4e3 100644
index f39ffb42c6f..67847bb9392 100644
--- a/dlls/ntdll/Makefile.in
+++ b/dlls/ntdll/Makefile.in
@@ -69,7 +69,7 @@ server_EXTRADEFS = \
-DBIN_TO_DATADIR=\"`$(MAKEDEP) -R ${bindir} ${datadir}/wine`\"
unix/version.c: dummy
- version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || (rm -f $@ && exit 1)
+ version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1 (Staging)";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || (rm -f $@ && exit 1)
dummy:
.PHONY: dummy
diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in
index fe2a2b45e58..1e55a6b1f46 100644
--- a/libs/wine/Makefile.in
+++ b/libs/wine/Makefile.in
@@ -100,7 +100,7 @@ libwine_LDFLAGS = $(LIBWINE_LDFLAGS)
libwine_DEPS = $(LIBWINE_DEPENDS)
version.c: dummy
- version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || (rm -f $@ && exit 1)
+ version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1 (Staging)";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || (rm -f $@ && exit 1)
dummy:
.PHONY: dummy
@@ -79,3 +79,4 @@ unix_loader_EXTRADEFS = \
-DBINDIR=\"${bindir}\" \
-DDLL_TO_BINDIR=\"`${MAKEDEP} -R ${dlldir} ${bindir}`\" \
-DBIN_TO_DATADIR=\"`${MAKEDEP} -R ${bindir} ${datadir}/wine`\"
+
--
2.26.2
2.28.0

View File

@@ -1,117 +0,0 @@
From 599c50c9e339fe04e96fdb665b3d7ccb1a7708b7 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 29 May 2014 23:43:45 +0200
Subject: [PATCH] loader: Add commandline option --patches to show the patch
list.
---
include/wine/library.h | 1 +
libs/wine/config.c | 6 ++++++
libs/wine/wine.map | 1 +
loader/main.c | 42 +++++++++++++++++++++++++++++++++++++++++-
4 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/include/wine/library.h b/include/wine/library.h
index 090b8349559..b8a4a2df576 100644
--- a/include/wine/library.h
+++ b/include/wine/library.h
@@ -42,6 +42,7 @@ extern "C" {
/* configuration */
extern const char *wine_get_version(void);
+extern const void *wine_get_patches(void);
extern const char *wine_get_build_id(void);
extern void wine_init_argv0_path( const char *argv0 );
extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
diff --git a/libs/wine/config.c b/libs/wine/config.c
index f5b4c0de9af..e52739d55ad 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -515,6 +515,12 @@ const char *wine_get_version(void)
return PACKAGE_VERSION;
}
+/* return the applied non-standard patches */
+const void *wine_get_patches(void)
+{
+ return NULL;
+}
+
/* return the build id string */
const char *wine_get_build_id(void)
{
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
index 1143b129734..55f874d3e74 100644
--- a/libs/wine/wine.map
+++ b/libs/wine/wine.map
@@ -13,6 +13,7 @@ WINE_1.0
wine_exec_wine_binary;
wine_get_build_id;
wine_get_version;
+ wine_get_patches;
wine_init;
wine_init_argv0_path;
wine_mmap_add_reserved_area;
diff --git a/loader/main.c b/loader/main.c
index 0e6b6f66b50..24bcfff8c4c 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -55,7 +55,8 @@ static void check_command_line( int argc, char *argv[] )
static const char usage[] =
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
" wine --help Display this help and exit\n"
- " wine --version Output version information and exit";
+ " wine --version Output version information and exit\n"
+ " wine --patches Output patch information and exit";
if (argc <= 1)
{
@@ -72,6 +73,45 @@ static void check_command_line( int argc, char *argv[] )
printf( "%s\n", wine_get_build_id() );
exit(0);
}
+ if (!strcmp( argv[1], "--patches" ))
+ {
+ const struct
+ {
+ const char *author;
+ const char *subject;
+ int revision;
+ }
+ *next, *cur = wine_get_patches();
+
+ if (!cur)
+ {
+ fprintf( stderr, "Patchlist not available.\n" );
+ exit(1);
+ }
+
+ while (cur->author)
+ {
+ next = cur + 1;
+ while (next->author)
+ {
+ if (strcmp( cur->author, next->author )) break;
+ next++;
+ }
+
+ printf( "%s (%d):\n", cur->author, (int)(next - cur) );
+ while (cur < next)
+ {
+ printf( " %s", cur->subject );
+ if (cur->revision != 1)
+ printf( " [rev %d]", cur->revision );
+ printf( "\n" );
+ cur++;
+ }
+ printf( "\n" );
+ }
+
+ exit(0);
+ }
}
--
2.26.2

View File

@@ -0,0 +1 @@
#Depends: ntdll-NtAlertThreadByThreadId

View File

@@ -1,315 +0,0 @@
From 1eb8acd819f9eee8fdf154d0ef43881008265916 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 4 Aug 2017 02:33:14 +0200
Subject: ntdll: Implement NtFilterToken.
---
dlls/ntdll/nt.c | 59 ++++++++++++++++++++++++++++++++++++
dlls/ntdll/ntdll.spec | 2 +-
include/winnt.h | 5 +++
include/winternl.h | 1 +
server/process.c | 2 +-
server/protocol.def | 10 ++++++
server/security.h | 4 ++-
server/token.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++--
8 files changed, 162 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index c3f5df3..59a08de 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -119,6 +119,65 @@ NTSTATUS WINAPI NtDuplicateToken(
}
/******************************************************************************
+ * NtFilterToken [NTDLL.@]
+ * ZwFilterToken [NTDLL.@]
+ */
+NTSTATUS WINAPI NtFilterToken( HANDLE token, ULONG flags, TOKEN_GROUPS *disable_sids,
+ TOKEN_PRIVILEGES *privileges, TOKEN_GROUPS *restrict_sids,
+ HANDLE *new_token )
+{
+ data_size_t privileges_len = 0;
+ data_size_t sids_len = 0;
+ SID *sids = NULL;
+ NTSTATUS status;
+
+ TRACE( "(%p, 0x%08x, %p, %p, %p, %p)\n", token, flags, disable_sids, privileges,
+ restrict_sids, new_token );
+
+ if (flags)
+ FIXME( "flags %x unsupported\n", flags );
+
+ if (restrict_sids)
+ FIXME( "support for restricting sids not yet implemented\n" );
+
+ if (privileges)
+ privileges_len = privileges->PrivilegeCount * sizeof(LUID_AND_ATTRIBUTES);
+
+ if (disable_sids)
+ {
+ DWORD len, i;
+ BYTE *tmp;
+
+ for (i = 0; i < disable_sids->GroupCount; i++)
+ sids_len += RtlLengthSid( disable_sids->Groups[i].Sid );
+
+ sids = RtlAllocateHeap( GetProcessHeap(), 0, sids_len );
+ if (!sids) return STATUS_NO_MEMORY;
+
+ for (i = 0, tmp = (BYTE *)sids; i < disable_sids->GroupCount; i++, tmp += len)
+ {
+ len = RtlLengthSid( disable_sids->Groups[i].Sid );
+ memcpy( tmp, disable_sids->Groups[i].Sid, len );
+ }
+ }
+
+ SERVER_START_REQ( filter_token )
+ {
+ req->handle = wine_server_obj_handle( token );
+ req->flags = flags;
+ req->privileges_size = privileges_len;
+ wine_server_add_data( req, privileges->Privileges, privileges_len );
+ wine_server_add_data( req, sids, sids_len );
+ status = wine_server_call( req );
+ if (!status) *new_token = wine_server_ptr_handle( reply->new_handle );
+ }
+ SERVER_END_REQ;
+
+ RtlFreeHeap( GetProcessHeap(), 0, sids );
+ return status;
+}
+
+/******************************************************************************
* NtOpenProcessToken [NTDLL.@]
* ZwOpenProcessToken [NTDLL.@]
*/
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index c260b0d..3c5e69c 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -176,7 +176,7 @@
# @ stub NtEnumerateSystemEnvironmentValuesEx
@ stdcall NtEnumerateValueKey(long long long ptr long ptr)
@ stub NtExtendSection
-# @ stub NtFilterToken
+@ stdcall NtFilterToken(long long ptr ptr ptr ptr)
@ stdcall NtFindAtom(ptr long ptr)
@ stdcall NtFlushBuffersFile(long ptr)
@ stdcall NtFlushInstructionCache(long ptr long)
diff --git a/include/winnt.h b/include/winnt.h
index 16d96d8..4e238f9 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -3904,6 +3904,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
TOKEN_ADJUST_SESSIONID | \
TOKEN_ADJUST_DEFAULT )
+#define DISABLE_MAX_PRIVILEGE 0x1
+#define SANDBOX_INERT 0x2
+#define LUA_TOKEN 0x4
+#define WRITE_RESTRICTED 0x8
+
#ifndef _SECURITY_DEFINED
#define _SECURITY_DEFINED
diff --git a/include/winternl.h b/include/winternl.h
index c84e6d7..288f93e 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2303,6 +2303,7 @@ NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES
NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
NTSYSAPI NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
+NTSYSAPI NTSTATUS WINAPI NtFilterToken(HANDLE,ULONG,TOKEN_GROUPS*,TOKEN_PRIVILEGES*,TOKEN_GROUPS*,HANDLE*);
NTSYSAPI NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
NTSYSAPI NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
NTSYSAPI NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
diff --git a/server/process.c b/server/process.c
index f8739d0..71d9d6d 100644
--- a/server/process.c
+++ b/server/process.c
@@ -566,7 +566,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
: alloc_handle_table( process, 0 );
/* Note: for security reasons, starting a new process does not attempt
* to use the current impersonation token for the new process */
- process->token = token_duplicate( parent->token, TRUE, 0, NULL );
+ process->token = token_duplicate( parent->token, TRUE, 0, NULL, NULL, 0, NULL, 0 );
process->affinity = parent->affinity;
}
if (!process->handles || !process->token) goto error;
diff --git a/server/protocol.def b/server/protocol.def
index 35824ae..6ee6d28 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3356,6 +3356,16 @@ enum caret_state
obj_handle_t new_handle; /* duplicated handle */
@END
+@REQ(filter_token)
+ obj_handle_t handle; /* handle to the token to duplicate */
+ unsigned int flags; /* flags */
+ data_size_t privileges_size; /* size of privileges */
+ VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
+ VARARG(disable_sids,SID); /* array of groups to remove from new token */
+@REPLY
+ obj_handle_t new_handle; /* filtered handle */
+@END
+
@REQ(access_check)
obj_handle_t handle; /* handle to the token */
unsigned int desired_access; /* desired access to the object */
diff --git a/server/security.h b/server/security.h
index 873bbc6..bc4a8f6 100644
--- a/server/security.h
+++ b/server/security.h
@@ -55,7 +55,9 @@ extern const PSID security_high_label_sid;
extern struct token *token_create_admin(void);
extern int token_assign_label( struct token *token, PSID label );
extern struct token *token_duplicate( struct token *src_token, unsigned primary,
- int impersonation_level, const struct security_descriptor *sd );
+ int impersonation_level, const struct security_descriptor *sd,
+ const LUID_AND_ATTRIBUTES *filter_privileges, unsigned int priv_count,
+ const SID *filter_groups, unsigned int group_count );
extern int token_check_privileges( struct token *token, int all_required,
const LUID_AND_ATTRIBUTES *reqprivs,
unsigned int count, LUID_AND_ATTRIBUTES *usedprivs);
diff --git a/server/token.c b/server/token.c
index 0810a61..2f6a467 100644
--- a/server/token.c
+++ b/server/token.c
@@ -276,6 +276,19 @@ static int acl_is_valid( const ACL *acl, data_size_t size )
return TRUE;
}
+static unsigned int get_sid_count( const SID *sid, data_size_t size )
+{
+ unsigned int count;
+
+ for (count = 0; size >= sizeof(SID) && security_sid_len( sid ) <= size; count++)
+ {
+ size -= security_sid_len( sid );
+ sid = (const SID *)((char *)sid + security_sid_len( sid ));
+ }
+
+ return count;
+}
+
/* checks whether all members of a security descriptor fit inside the size
* of memory specified */
int sd_is_valid( const struct security_descriptor *sd, data_size_t size )
@@ -619,8 +632,36 @@ static struct token *create_token( unsigned primary, const SID *user,
return token;
}
+static int filter_group( struct group *group, const SID *filter, unsigned int count )
+{
+ unsigned int i;
+
+ for (i = 0; i < count; i++)
+ {
+ if (security_equal_sid( &group->sid, filter )) return 1;
+ filter = (const SID *)((char *)filter + security_sid_len( filter ));
+ }
+
+ return 0;
+}
+
+static int filter_privilege( struct privilege *privilege, const LUID_AND_ATTRIBUTES *filter, unsigned int count )
+{
+ unsigned int i;
+
+ for (i = 0; i < count; i++)
+ {
+ if (!memcmp( &privilege->luid, &filter[i].Luid, sizeof(LUID) ))
+ return 1;
+ }
+
+ return 0;
+}
+
struct token *token_duplicate( struct token *src_token, unsigned primary,
- int impersonation_level, const struct security_descriptor *sd )
+ int impersonation_level, const struct security_descriptor *sd,
+ const LUID_AND_ATTRIBUTES *filter_privileges, unsigned int priv_count,
+ const SID *filter_groups, unsigned int group_count)
{
const luid_t *modified_id =
primary || (impersonation_level == src_token->impersonation_level) ?
@@ -656,6 +697,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
return NULL;
}
memcpy( newgroup, group, size );
+ if (filter_group( group, filter_groups, group_count ))
+ {
+ newgroup->enabled = 0;
+ newgroup->def = 0;
+ newgroup->deny_only = 1;
+ }
list_add_tail( &token->groups, &newgroup->entry );
if (src_token->primary_group == &group->sid)
{
@@ -667,11 +714,14 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
/* copy privileges */
LIST_FOR_EACH_ENTRY( privilege, &src_token->privileges, struct privilege, entry )
+ {
+ if (filter_privilege( privilege, filter_privileges, priv_count )) continue;
if (!privilege_add( token, &privilege->luid, privilege->enabled ))
{
release_object( token );
return NULL;
}
+ }
if (sd) default_set_sd( &token->obj, sd, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION );
@@ -1304,7 +1354,7 @@ DECL_HANDLER(duplicate_token)
TOKEN_DUPLICATE,
&token_ops )))
{
- struct token *token = token_duplicate( src_token, req->primary, req->impersonation_level, sd );
+ struct token *token = token_duplicate( src_token, req->primary, req->impersonation_level, sd, NULL, 0, NULL, 0 );
if (token)
{
reply->new_handle = alloc_handle_no_access_check( current->process, token, req->access, objattr->attributes );
@@ -1314,6 +1364,36 @@ DECL_HANDLER(duplicate_token)
}
}
+/* creates a restricted version of a token */
+DECL_HANDLER(filter_token)
+{
+ struct token *src_token;
+
+ if ((src_token = (struct token *)get_handle_obj( current->process, req->handle,
+ TOKEN_DUPLICATE,
+ &token_ops )))
+ {
+ const LUID_AND_ATTRIBUTES *filter_privileges = get_req_data();
+ unsigned int priv_count, group_count;
+ const SID *filter_groups;
+ struct token *token;
+
+ priv_count = min( req->privileges_size, get_req_data_size() ) / sizeof(LUID_AND_ATTRIBUTES);
+ filter_groups = (const SID *)((char *)filter_privileges + priv_count * sizeof(LUID_AND_ATTRIBUTES));
+ group_count = get_sid_count( filter_groups, get_req_data_size() - priv_count * sizeof(LUID_AND_ATTRIBUTES) );
+
+ token = token_duplicate( src_token, src_token->primary, src_token->impersonation_level, NULL,
+ filter_privileges, priv_count, filter_groups, group_count );
+ if (token)
+ {
+ unsigned int access = get_handle_access( current->process, req->handle );
+ reply->new_handle = alloc_handle_no_access_check( current->process, token, access, 0 );
+ release_object( token );
+ }
+ release_object( src_token );
+ }
+}
+
/* checks the specified privileges are held by the token */
DECL_HANDLER(check_token_privileges)
{
--
2.7.4

View File

@@ -1,132 +0,0 @@
From 3c1f5962482e7acf531f57f49d923d9c4e5278b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 4 Aug 2017 02:51:57 +0200
Subject: [PATCH] advapi32: Implement CreateRestrictedToken.
---
dlls/kernelbase/security.c | 103 ++++++++++++++++++++++++++++++-------
1 file changed, 84 insertions(+), 19 deletions(-)
diff --git a/dlls/kernelbase/security.c b/dlls/kernelbase/security.c
index 2e75e81ed77..97f6ee6a2fd 100644
--- a/dlls/kernelbase/security.c
+++ b/dlls/kernelbase/security.c
@@ -592,31 +592,96 @@ exit:
return ret;
}
+static BOOL allocate_groups(TOKEN_GROUPS **groups_ret, SID_AND_ATTRIBUTES *sids, DWORD count)
+{
+ TOKEN_GROUPS *groups;
+ DWORD i;
+
+ if (!count)
+ {
+ *groups_ret = NULL;
+ return TRUE;
+ }
+
+ groups = (TOKEN_GROUPS *)heap_alloc(FIELD_OFFSET(TOKEN_GROUPS, Groups) +
+ count * sizeof(SID_AND_ATTRIBUTES));
+ if (!groups)
+ {
+ SetLastError(ERROR_OUTOFMEMORY);
+ return FALSE;
+ }
+
+ groups->GroupCount = count;
+ for (i = 0; i < count; i++)
+ groups->Groups[i] = sids[i];
+
+ *groups_ret = groups;
+ return TRUE;
+}
+
+static BOOL allocate_privileges(TOKEN_PRIVILEGES **privileges_ret, LUID_AND_ATTRIBUTES *privs, DWORD count)
+{
+ TOKEN_PRIVILEGES *privileges;
+ DWORD i;
+
+ if (!count)
+ {
+ *privileges_ret = NULL;
+ return TRUE;
+ }
+
+ privileges = (TOKEN_PRIVILEGES *)heap_alloc(FIELD_OFFSET(TOKEN_PRIVILEGES, Privileges) +
+ count * sizeof(LUID_AND_ATTRIBUTES));
+ if (!privileges)
+ {
+ SetLastError(ERROR_OUTOFMEMORY);
+ return FALSE;
+ }
+
+ privileges->PrivilegeCount = count;
+ for (i = 0; i < count; i++)
+ privileges->Privileges[i] = privs[i];
+
+ *privileges_ret = privileges;
+ return TRUE;
+}
+
/*************************************************************************
* CreateRestrictedToken (kernelbase.@)
*/
-BOOL WINAPI CreateRestrictedToken( HANDLE token, DWORD flags,
- DWORD disable_count, PSID_AND_ATTRIBUTES disable_sids,
- DWORD delete_count, PLUID_AND_ATTRIBUTES delete_privs,
- DWORD restrict_count, PSID_AND_ATTRIBUTES restrict_sids, PHANDLE ret )
+BOOL WINAPI CreateRestrictedToken( HANDLE baseToken, DWORD flags,
+ DWORD nDisableSids, PSID_AND_ATTRIBUTES disableSids,
+ DWORD nDeletePrivs, PLUID_AND_ATTRIBUTES deletePrivs,
+ DWORD nRestrictSids, PSID_AND_ATTRIBUTES restrictSids, PHANDLE newToken )
{
- TOKEN_TYPE type;
- SECURITY_IMPERSONATION_LEVEL level = SecurityAnonymous;
- DWORD size;
+ TOKEN_PRIVILEGES *delete_privs = NULL;
+ TOKEN_GROUPS *disable_groups = NULL;
+ TOKEN_GROUPS *restrict_sids = NULL;
+ BOOL ret = FALSE;
- FIXME("(%p, 0x%x, %u, %p, %u, %p, %u, %p, %p): stub\n",
- token, flags, disable_count, disable_sids, delete_count, delete_privs,
- restrict_count, restrict_sids, ret );
+ TRACE("(%p, 0x%x, %u, %p, %u, %p, %u, %p, %p)\n",
+ baseToken, flags, nDisableSids, disableSids,
+ nDeletePrivs, deletePrivs,
+ nRestrictSids, restrictSids,
+ newToken);
+
+ if (!allocate_groups(&disable_groups, disableSids, nDisableSids))
+ goto done;
+
+ if (!allocate_privileges(&delete_privs, deletePrivs, nDeletePrivs))
+ goto done;
+
+ if (!allocate_groups(&restrict_sids, restrictSids, nRestrictSids))
+ goto done;
+
+ ret = set_ntstatus(NtFilterToken(baseToken, flags, disable_groups, delete_privs, restrict_sids, newToken));
+
+done:
+ heap_free(disable_groups);
+ heap_free(delete_privs);
+ heap_free(restrict_sids);
+ return ret;
- size = sizeof(type);
- if (!GetTokenInformation( token, TokenType, &type, size, &size )) return FALSE;
- if (type == TokenImpersonation)
- {
- size = sizeof(level);
- if (!GetTokenInformation( token, TokenImpersonationLevel, &level, size, &size ))
- return FALSE;
- }
- return DuplicateTokenEx( token, MAXIMUM_ALLOWED, NULL, level, type, ret );
}
/******************************************************************************
--
2.20.1

View File

@@ -1 +0,0 @@
Fixes: [25834] Implement advapi32.CreateRestrictedToken

View File

@@ -1,38 +1,39 @@
From c8dc0ec6406e8449b59c219ede2e9bd88d8a56fa Mon Sep 17 00:00:00 2001
From d2e98b2054a5af671fd81ded32f2cf60a062312c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 00:26:03 +0200
Subject: [PATCH] server: Implement token elevation information.
---
dlls/ntdll/nt.c | 16 ++++++++++++----
server/protocol.def | 8 ++++++++
server/token.c | 22 +++++++++++++++++++---
dlls/ntdll/unix/security.c | 16 ++++++++++++----
server/protocol.def | 8 ++++++++
server/token.c | 22 +++++++++++++++++++---
3 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index cd271fde9c..b1dd999cf5 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -625,18 +625,26 @@ NTSTATUS WINAPI NtQueryInformationToken(
SERVER_END_REQ;
diff --git a/dlls/ntdll/unix/security.c b/dlls/ntdll/unix/security.c
index d063d43d6d4..03a81afa46e 100644
--- a/dlls/ntdll/unix/security.c
+++ b/dlls/ntdll/unix/security.c
@@ -390,19 +390,27 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
break;
case TokenElevationType:
+ SERVER_START_REQ( get_token_elevation_type )
{
TOKEN_ELEVATION_TYPE *elevation_type = tokeninfo;
TOKEN_ELEVATION_TYPE *type = info;
- FIXME("QueryInformationToken( ..., TokenElevationType, ...) semi-stub\n");
- *elevation_type = TokenElevationTypeFull;
- *type = TokenElevationTypeFull;
+ req->handle = wine_server_obj_handle( token );
+ status = wine_server_call( req );
+ if (status == STATUS_SUCCESS)
+ *elevation_type = reply->elevation;
+ *type = reply->elevation;
}
+ SERVER_END_REQ;
break;
case TokenElevation:
+ SERVER_START_REQ( get_token_elevation_type )
{
TOKEN_ELEVATION *elevation = tokeninfo;
TOKEN_ELEVATION *elevation = info;
- FIXME("QueryInformationToken( ..., TokenElevation, ...) semi-stub\n");
- elevation->TokenIsElevated = TRUE;
+ req->handle = wine_server_obj_handle( token );
@@ -42,13 +43,13 @@ index cd271fde9c..b1dd999cf5 100644
}
+ SERVER_END_REQ;
break;
case TokenSessionId:
{
diff --git a/server/protocol.def b/server/protocol.def
index 90af9df7f4..93afaabca1 100644
index ee07b1eca14..84f0b577d72 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3643,6 +3643,14 @@ struct handle_info
@@ -3566,6 +3566,14 @@ struct handle_info
@END
@@ -64,10 +65,10 @@ index 90af9df7f4..93afaabca1 100644
@REQ(create_completion)
unsigned int access; /* desired access to a port */
diff --git a/server/token.c b/server/token.c
index 6d193603b4..64f20e1b57 100644
index 38a4c203d54..14343637af5 100644
--- a/server/token.c
+++ b/server/token.c
@@ -112,6 +112,7 @@ struct token
@@ -110,6 +110,7 @@ struct token
ACL *default_dacl; /* the default DACL to assign to objects created by this user */
TOKEN_SOURCE source; /* source of the token */
int impersonation_level; /* impersonation level this token is capable of if non-primary token */
@@ -75,7 +76,7 @@ index 6d193603b4..64f20e1b57 100644
};
struct privilege
@@ -545,7 +546,7 @@ static struct token *create_token( unsigned primary, const SID *user,
@@ -552,7 +553,7 @@ static struct token *create_token( unsigned primary, const SID *user,
const LUID_AND_ATTRIBUTES *privs, unsigned int priv_count,
const ACL *default_dacl, TOKEN_SOURCE source,
const luid_t *modified_id,
@@ -84,7 +85,7 @@ index 6d193603b4..64f20e1b57 100644
{
struct token *token = alloc_object( &token_ops );
if (token)
@@ -567,6 +568,7 @@ static struct token *create_token( unsigned primary, const SID *user,
@@ -574,6 +575,7 @@ static struct token *create_token( unsigned primary, const SID *user,
token->impersonation_level = impersonation_level;
token->default_dacl = NULL;
token->primary_group = NULL;
@@ -92,7 +93,7 @@ index 6d193603b4..64f20e1b57 100644
/* copy user */
token->user = memdup( user, security_sid_len( user ));
@@ -682,7 +684,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
@@ -689,7 +691,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
token = create_token( primary, src_token->user, NULL, 0,
NULL, 0, src_token->default_dacl,
src_token->source, modified_id,
@@ -102,7 +103,7 @@ index 6d193603b4..64f20e1b57 100644
if (!token) return token;
/* copy groups */
@@ -888,7 +891,7 @@ struct token *token_create_admin( void )
@@ -895,7 +898,7 @@ struct token *token_create_admin( void )
static const TOKEN_SOURCE admin_source = {"SeMgr", {0, 0}};
token = create_token( TRUE, user_sid, admin_groups, ARRAY_SIZE( admin_groups ),
admin_privs, ARRAY_SIZE( admin_privs ), default_dacl,
@@ -111,7 +112,7 @@ index 6d193603b4..64f20e1b57 100644
/* we really need a primary group */
assert( token->primary_group );
}
@@ -1627,6 +1630,19 @@ DECL_HANDLER(get_token_statistics)
@@ -1634,6 +1637,19 @@ DECL_HANDLER(get_token_statistics)
}
}
@@ -132,5 +133,5 @@ index 6d193603b4..64f20e1b57 100644
{
struct token *token;
--
2.19.1
2.27.0

View File

@@ -1,19 +1,19 @@
From ae503e8e7eb8f4fcb9bf3e642458c2a1bba6ccaa Mon Sep 17 00:00:00 2001
From 6dc1b7d9e533379133857629bb9c09e1045a9020 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 7 Aug 2017 02:28:35 +0200
Subject: [PATCH] server: Implement token integrity level.
---
dlls/ntdll/nt.c | 23 ++++++++++++++---------
server/protocol.def | 7 +++++++
server/token.c | 30 +++++++++++++++++++++++++++---
dlls/ntdll/unix/security.c | 23 ++++++++++++++---------
server/protocol.def | 7 +++++++
server/token.c | 30 +++++++++++++++++++++++++++---
3 files changed, 48 insertions(+), 12 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index ca26ab15..8aab0a48 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -400,7 +400,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
diff --git a/dlls/ntdll/unix/security.c b/dlls/ntdll/unix/security.c
index 03a81afa46e..f0057116dee 100644
--- a/dlls/ntdll/unix/security.c
+++ b/dlls/ntdll/unix/security.c
@@ -172,7 +172,7 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
0, /* TokenAccessInformation */
0, /* TokenVirtualizationAllowed */
sizeof(DWORD), /* TokenVirtualizationEnabled */
@@ -22,9 +22,9 @@ index ca26ab15..8aab0a48 100644
0, /* TokenUIAccess */
0, /* TokenMandatoryPolicy */
0, /* TokenLogonSid */
@@ -659,18 +659,23 @@ NTSTATUS WINAPI NtQueryInformationToken(
}
@@ -428,18 +428,23 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
break;
case TokenIntegrityLevel:
+ SERVER_START_REQ( get_token_integrity )
{
@@ -32,14 +32,14 @@ index ca26ab15..8aab0a48 100644
- static const SID high_level = {SID_REVISION, 1, {SECURITY_MANDATORY_LABEL_AUTHORITY},
- {SECURITY_MANDATORY_HIGH_RID}};
-
TOKEN_MANDATORY_LABEL *tml = tokeninfo;
TOKEN_MANDATORY_LABEL *tml = info;
- PSID psid = tml + 1;
+ PSID sid = tml + 1;
+ DWORD sid_len = tokeninfolength < sizeof(*tml) ? 0 : tokeninfolength - sizeof(*tml);
+ DWORD sid_len = length < sizeof(*tml) ? 0 : length - sizeof(*tml);
- tml->Label.Sid = psid;
- tml->Label.Attributes = SE_GROUP_INTEGRITY | SE_GROUP_INTEGRITY_ENABLED;
- memcpy(psid, &high_level, sizeof(SID));
- memcpy( psid, &high_level, sizeof(SID) );
+ req->handle = wine_server_obj_handle( token );
+ wine_server_set_reply( req, sid, sid_len );
+ status = wine_server_call( req );
@@ -52,13 +52,13 @@ index ca26ab15..8aab0a48 100644
}
+ SERVER_END_REQ;
break;
case TokenAppContainerSid:
{
diff --git a/server/protocol.def b/server/protocol.def
index 11221d7d..1bfe3234 100644
index 84f0b577d72..4d37a0df348 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3405,6 +3405,13 @@ enum caret_state
@@ -3296,6 +3296,13 @@ enum caret_state
VARARG(sid,SID); /* the sid specified by which_sid from the token */
@END
@@ -73,10 +73,10 @@ index 11221d7d..1bfe3234 100644
obj_handle_t handle; /* handle to the token */
@REPLY
diff --git a/server/token.c b/server/token.c
index ccde0c2d..2d81118a 100644
index 7c510fbdad9..d267991f751 100644
--- a/server/token.c
+++ b/server/token.c
@@ -113,6 +113,7 @@ struct token
@@ -111,6 +111,7 @@ struct token
TOKEN_SOURCE source; /* source of the token */
int impersonation_level; /* impersonation level this token is capable of if non-primary token */
TOKEN_ELEVATION_TYPE elevation; /* elevation level */
@@ -84,7 +84,7 @@ index ccde0c2d..2d81118a 100644
};
struct privilege
@@ -546,7 +547,8 @@ static struct token *create_token( unsigned primary, const SID *user,
@@ -553,7 +554,8 @@ static struct token *create_token( unsigned primary, const SID *user,
const LUID_AND_ATTRIBUTES *privs, unsigned int priv_count,
const ACL *default_dacl, TOKEN_SOURCE source,
const luid_t *modified_id,
@@ -94,7 +94,7 @@ index ccde0c2d..2d81118a 100644
{
struct token *token = alloc_object( &token_ops );
if (token)
@@ -630,6 +632,7 @@ static struct token *create_token( unsigned primary, const SID *user,
@@ -637,6 +639,7 @@ static struct token *create_token( unsigned primary, const SID *user,
}
token->source = source;
@@ -102,7 +102,7 @@ index ccde0c2d..2d81118a 100644
}
return token;
}
@@ -685,7 +688,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
@@ -692,7 +695,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
NULL, 0, src_token->default_dacl,
src_token->source, modified_id,
impersonation_level,
@@ -112,7 +112,7 @@ index ccde0c2d..2d81118a 100644
if (!token) return token;
/* copy groups */
@@ -890,7 +894,7 @@ struct token *token_create_admin( void )
@@ -898,7 +902,7 @@ struct token *token_create_admin( void )
static const TOKEN_SOURCE admin_source = {"SeMgr", {0, 0}};
token = create_token( TRUE, user_sid, admin_groups, ARRAY_SIZE( admin_groups ),
admin_privs, ARRAY_SIZE( admin_privs ), default_dacl,
@@ -121,7 +121,7 @@ index ccde0c2d..2d81118a 100644
/* we really need a primary group */
assert( token->primary_group );
}
@@ -1524,6 +1528,26 @@ DECL_HANDLER(get_token_sid)
@@ -1532,6 +1536,26 @@ DECL_HANDLER(get_token_sid)
}
}
@@ -149,5 +149,5 @@ index ccde0c2d..2d81118a 100644
DECL_HANDLER(get_token_groups)
{
--
2.19.1
2.27.0

View File

@@ -1,4 +1,4 @@
From 90474eb9f6583f2e8fe0314cfa0b0dc04797833b Mon Sep 17 00:00:00 2001
From c47977a8bbd739483589d1f01cfece435be1c100 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 01:45:29 +0200
Subject: [PATCH] ntdll: Add function to create new tokens for elevation
@@ -14,10 +14,10 @@ Subject: [PATCH] ntdll: Add function to create new tokens for elevation
6 files changed, 117 insertions(+)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 1ebe07fc08c..7a19674b2f3 100644
index 0997c310110..8e3786e1972 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1586,6 +1586,9 @@
@@ -1600,6 +1600,9 @@
# Virtual memory
@ cdecl __wine_locked_recvmsg(long ptr long)
@@ -25,27 +25,27 @@ index 1ebe07fc08c..7a19674b2f3 100644
+@ cdecl __wine_create_default_token(long)
+
# Version
@ cdecl wine_get_version() NTDLL_wine_get_version
@ cdecl wine_get_build_id() NTDLL_wine_get_build_id
@ cdecl wine_get_version()
@ cdecl wine_get_build_id()
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 27e7141bc65..4baf8a3967b 100644
index 63ceac42e94..5a98501381b 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -107,6 +107,9 @@ extern int __wine_main_argc;
extern char **__wine_main_argv;
extern WCHAR **__wine_main_wargv;
@@ -67,6 +67,9 @@ extern void init_user_process_params(void) DECLSPEC_HIDDEN;
extern NTSTATUS restart_process( RTL_USER_PROCESS_PARAMETERS *params, NTSTATUS status ) DECLSPEC_HIDDEN;
extern void CDECL DECLSPEC_NORETURN signal_start_thread( CONTEXT *ctx ) DECLSPEC_HIDDEN;
+/* token */
+extern HANDLE CDECL __wine_create_default_token(BOOL admin);
+
/* server support */
extern const char *build_dir DECLSPEC_HIDDEN;
extern const char *data_dir DECLSPEC_HIDDEN;
extern BOOL is_wow64 DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 6c5f722b2a6..df81e061e7b 100644
index 77ba5b371e2..3e91a1fa9c4 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -119,6 +119,24 @@ HANDLE CDECL __wine_make_process_system(void)
@@ -72,6 +72,24 @@ HANDLE CDECL __wine_make_process_system(void)
return ret;
}
@@ -67,14 +67,14 @@ index 6c5f722b2a6..df81e061e7b 100644
+ return ret;
+}
+
static UINT process_error_mode;
#define UNIMPLEMENTED_INFO_CLASS(c) \
/***********************************************************************
* restart_process
*/
diff --git a/server/protocol.def b/server/protocol.def
index c53ceb50d50..947a3c971f5 100644
index 30a102d7b82..a9308904afc 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3755,6 +3755,14 @@ struct handle_info
@@ -3481,6 +3481,14 @@ struct handle_info
@END
@@ -215,5 +215,5 @@ index c4f1cd943c2..970ed1838da 100644
+ }
+}
--
2.26.2
2.28.0

View File

@@ -1,4 +1,4 @@
From 0e9d9a6aa1b65dae1c8dc34d6d5fb27aa73f96ea Mon Sep 17 00:00:00 2001
From 51cde3dff5de27d1aebc964a4802758534d56773 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 03:39:55 +0200
Subject: [PATCH] ntdll: Implement process token elevation through manifests.
@@ -12,10 +12,10 @@ Subject: [PATCH] ntdll: Implement process token elevation through manifests.
5 files changed, 67 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 51addaaf983..71efed5fa32 100644
index 6290cbcb4e6..9a8f13901b2 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -3903,6 +3903,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
@@ -3489,6 +3489,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
}
@@ -48,17 +48,17 @@ index 51addaaf983..71efed5fa32 100644
/***********************************************************************
* load_global_options
*/
@@ -4363,6 +4389,7 @@ void __wine_process_init(void)
's','y','s','t','e','m','3','2','\\',
@@ -3900,6 +3926,7 @@ void __wine_process_init(void)
'k','e','r','n','e','l','3','2','.','d','l','l',0};
void (WINAPI *kernel32_start_process)(LPTHREAD_START_ROUTINE,void*) = NULL;
RTL_USER_PROCESS_PARAMETERS *params;
+ ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION runlevel;
WINE_MODREF *wm;
NTSTATUS status;
ANSI_STRING func_name;
@@ -4466,6 +4493,16 @@ void __wine_process_init(void)
unix_funcs->virtual_set_large_address_space();
@@ -4021,6 +4048,16 @@ void __wine_process_init(void)
}
#endif
+ /* elevate process if necessary */
+ status = RtlQueryInformationActivationContext( 0, NULL, 0, RunlevelInformationInActivationContext,
@@ -74,11 +74,11 @@ index 51addaaf983..71efed5fa32 100644
RemoveEntryList( &wm->ldr.InLoadOrderLinks );
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderLinks );
diff --git a/server/process.c b/server/process.c
index 80a091b0c72..34010b301c3 100644
index fa8495511e0..df72efdecc8 100644
--- a/server/process.c
+++ b/server/process.c
@@ -1112,6 +1112,14 @@ struct process_snapshot *process_snap( int *count )
return snapshot;
@@ -1086,6 +1086,14 @@ int set_process_debug_flag( struct process *process, int flag )
return write_process_memory( process, process->peb + 2, 1, &data );
}
+/* replace the token of a process */
@@ -93,22 +93,22 @@ index 80a091b0c72..34010b301c3 100644
DECL_HANDLER(new_process)
{
diff --git a/server/process.h b/server/process.h
index 5b83e111a6f..dfe5c4e52d8 100644
index 0fdf070b78e..43e8cc1ad7e 100644
--- a/server/process.h
+++ b/server/process.h
@@ -139,6 +139,7 @@ extern void kill_debugged_processes( struct thread *debugger, int exit_code );
@@ -129,6 +129,7 @@ extern void kill_console_processes( struct thread *renderer, int exit_code );
extern void kill_debugged_processes( struct thread *debugger, int exit_code );
extern void detach_debugged_processes( struct thread *debugger );
extern struct process_snapshot *process_snap( int *count );
extern void enum_processes( int (*cb)(struct process*, void*), void *user);
+extern void replace_process_token( struct process *process, struct token *token );
/* console functions */
extern void inherit_console( struct thread *parent_thread, struct process *parent,
extern obj_handle_t inherit_console( struct thread *parent_thread, obj_handle_t handle,
diff --git a/server/protocol.def b/server/protocol.def
index d8618a5c964..89adc93305c 100644
index a9308904afc..8c40fba8d0a 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3762,6 +3762,13 @@ struct handle_info
@@ -3489,6 +3489,13 @@ struct handle_info
@END
@@ -145,5 +145,5 @@ index 970ed1838da..1c1d49989b3 100644
+ }
+}
--
2.26.2
2.28.0

View File

@@ -1,319 +0,0 @@
From 51830c6683b199e79cb9e782ee51555054a4da7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 6 Aug 2017 02:08:05 +0200
Subject: [PATCH] server: Implement support for creating processes using a
token.
---
dlls/kernelbase/process.c | 24 +++++++++++++-----------
dlls/ntdll/process.c | 3 ++-
server/process.c | 39 +++++++++++++++++++++++++++++++++++----
server/process.h | 2 +-
server/protocol.def | 1 +
server/request.c | 2 +-
server/security.h | 2 ++
server/token.c | 11 +++++++++++
8 files changed, 66 insertions(+), 18 deletions(-)
diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c
index a07dddb1f..99985ab89 100644
--- a/dlls/kernelbase/process.c
+++ b/dlls/kernelbase/process.c
@@ -242,7 +242,7 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename
/***********************************************************************
* create_nt_process
*/
-static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
+static NTSTATUS create_nt_process( HANDLE token, SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
RTL_USER_PROCESS_INFORMATION *info, HANDLE parent )
{
@@ -257,7 +257,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
status = RtlCreateUserProcess( &nameW, OBJ_CASE_INSENSITIVE, params,
psa ? psa->lpSecurityDescriptor : NULL,
tsa ? tsa->lpSecurityDescriptor : NULL,
- parent, inherit, 0, 0, info );
+ parent, inherit, 0, token, info );
RtlFreeUnicodeString( &nameW );
}
return status;
@@ -267,7 +267,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
/***********************************************************************
* create_vdm_process
*/
-static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
+static NTSTATUS create_vdm_process( HANDLE token, SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
RTL_USER_PROCESS_INFORMATION *info )
{
@@ -288,7 +288,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
winevdm, params->ImagePathName.Buffer, params->CommandLine.Buffer );
RtlInitUnicodeString( &params->ImagePathName, winevdm );
RtlInitUnicodeString( &params->CommandLine, newcmdline );
- status = create_nt_process( psa, tsa, inherit, flags, params, info, NULL );
+ status = create_nt_process( token, psa, tsa, inherit, flags, params, info, NULL );
HeapFree( GetProcessHeap(), 0, newcmdline );
return status;
}
@@ -297,7 +297,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
/***********************************************************************
* create_cmd_process
*/
-static NTSTATUS create_cmd_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
+static NTSTATUS create_cmd_process( HANDLE token, SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
RTL_USER_PROCESS_INFORMATION *info )
{
@@ -316,7 +316,7 @@ static NTSTATUS create_cmd_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
swprintf( newcmdline, len, L"%s /s/c \"%s\"", comspec, params->CommandLine.Buffer );
RtlInitUnicodeString( &params->ImagePathName, comspec );
RtlInitUnicodeString( &params->CommandLine, newcmdline );
- status = create_nt_process( psa, tsa, inherit, flags, params, info, NULL );
+ status = create_nt_process( token, psa, tsa, inherit, flags, params, info, NULL );
RtlFreeHeap( GetProcessHeap(), 0, newcmdline );
return status;
}
@@ -448,7 +448,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
TRACE( "app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
- if (token) FIXME( "Creating a process with a token is not yet implemented\n" );
+ /* FIXME: Starting a process which requires admin rights should fail
+ * with ERROR_ELEVATION_REQUIRED when no token is passed. */
+
if (new_token) FIXME( "No support for returning created process token\n" );
if (app_name)
@@ -521,7 +523,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
}
}
- status = create_nt_process( process_attr, thread_attr, inherit, flags, params, &rtl_info, parent );
+ status = create_nt_process( token, process_attr, thread_attr, inherit, flags, params, &rtl_info, parent );
switch (status)
{
case STATUS_SUCCESS:
@@ -530,7 +532,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
case STATUS_INVALID_IMAGE_NE_FORMAT:
case STATUS_INVALID_IMAGE_PROTECT:
TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(app_name) );
- status = create_vdm_process( process_attr, thread_attr, inherit, flags, params, &rtl_info );
+ status = create_vdm_process( token, process_attr, thread_attr, inherit, flags, params, &rtl_info );
break;
case STATUS_INVALID_IMAGE_NOT_MZ:
/* check for .com or .bat extension */
@@ -538,12 +540,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
if (!wcsicmp( p, L".com" ) || !wcsicmp( p, L".pif" ))
{
TRACE( "starting %s as DOS binary\n", debugstr_w(app_name) );
- status = create_vdm_process( process_attr, thread_attr, inherit, flags, params, &rtl_info );
+ status = create_vdm_process( token, process_attr, thread_attr, inherit, flags, params, &rtl_info );
}
else if (!wcsicmp( p, L".bat" ) || !wcsicmp( p, L".cmd" ))
{
TRACE( "starting %s as batch binary\n", debugstr_w(app_name) );
- status = create_cmd_process( process_attr, thread_attr, inherit, flags, params, &rtl_info );
+ status = create_cmd_process( token, process_attr, thread_attr, inherit, flags, params, &rtl_info );
}
break;
}
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index f3d9079f8..2fa553091 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -1667,7 +1667,7 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
RTL_USER_PROCESS_PARAMETERS *params,
SECURITY_DESCRIPTOR *process_descr,
SECURITY_DESCRIPTOR *thread_descr,
- HANDLE parent, BOOLEAN inherit, HANDLE debug, HANDLE exception,
+ HANDLE parent, BOOLEAN inherit, HANDLE debug, HANDLE token,
RTL_USER_PROCESS_INFORMATION *info )
{
NTSTATUS status;
@@ -1735,6 +1735,7 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
req->access = PROCESS_ALL_ACCESS;
req->cpu = pe_info.cpu;
req->info_size = startup_info_size;
+ req->token = wine_server_obj_handle( token );
wine_server_add_data( req, objattr, attr_len );
wine_server_add_data( req, startup_info, startup_info_size );
wine_server_add_data( req, params->Environment, env_size );
diff --git a/server/process.c b/server/process.c
index d6f71a774..aa66814d8 100644
--- a/server/process.c
+++ b/server/process.c
@@ -491,7 +491,7 @@ static void start_sigkill_timer( struct process *process )
/* create a new process */
/* if the function fails the fd is closed */
struct process *create_process( int fd, struct process *parent, int inherit_all,
- const struct security_descriptor *sd )
+ const struct security_descriptor *sd, struct token *token )
{
struct process *process;
@@ -568,7 +568,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
: alloc_handle_table( process, 0 );
/* Note: for security reasons, starting a new process does not attempt
* to use the current impersonation token for the new process */
- process->token = token_duplicate( parent->token, TRUE, 0, NULL, NULL, 0, NULL, 0 );
+ process->token = token_duplicate( token ? token : parent->token, TRUE, 0, NULL, NULL, 0, NULL, 0 );
process->affinity = parent->affinity;
}
if (!process->handles || !process->token) goto error;
@@ -1124,6 +1124,7 @@ DECL_HANDLER(new_process)
const struct security_descriptor *sd;
const struct object_attributes *objattr = get_req_object_attributes( &sd, &name, NULL );
struct process *process = NULL;
+ struct token *token = NULL;
struct process *parent;
struct thread *parent_thread = current;
int socket_fd = thread_get_inflight_fd( current, req->socket_fd );
@@ -1177,10 +1178,39 @@ DECL_HANDLER(new_process)
return;
}
+ if (req->token)
+ {
+ token = get_token_from_handle( req->token, TOKEN_QUERY | TOKEN_DUPLICATE | TOKEN_ASSIGN_PRIMARY );
+ if (!token)
+ {
+ close( socket_fd );
+ return;
+ }
+ if (!token_is_primary( token ))
+ {
+ set_error( STATUS_BAD_TOKEN_TYPE );
+ release_object( token );
+ close( socket_fd );
+ return;
+ }
+ }
+
+ if (!req->info_size) /* create an orphaned process */
+ {
+ if ((process = create_process( socket_fd, NULL, 0, sd, token )))
+ {
+ create_thread( -1, process, NULL );
+ release_object( process );
+ }
+ if (token) release_object( token );
+ return;
+ }
+
/* build the startup info for a new process */
if (!(info = alloc_object( &startup_info_ops )))
{
close( socket_fd );
+ if (token) release_object( token );
release_object( parent );
return;
}
@@ -1228,7 +1258,7 @@ DECL_HANDLER(new_process)
#undef FIXUP_LEN
}
- if (!(process = create_process( socket_fd, parent, req->inherit_all, sd ))) goto done;
+ if (!(process = create_process( socket_fd, parent, req->inherit_all, sd, token ))) goto done;
process->startup_info = (struct startup_info *)grab_object( info );
@@ -1289,6 +1319,7 @@ DECL_HANDLER(new_process)
reply->handle = alloc_handle_no_access_check( current->process, process, req->access, objattr->attributes );
done:
+ if (token) release_object( token );
if (process) release_object( process );
release_object( parent );
release_object( info );
@@ -1322,7 +1353,7 @@ DECL_HANDLER(exec_process)
close( socket_fd );
return;
}
- if (!(process = create_process( socket_fd, NULL, 0, NULL ))) return;
+ if (!(process = create_process( socket_fd, NULL, 0, NULL, NULL ))) return;
create_thread( -1, process, NULL );
release_object( process );
}
diff --git a/server/process.h b/server/process.h
index dfe5c4e52..61b83abf6 100644
--- a/server/process.h
+++ b/server/process.h
@@ -118,7 +118,7 @@ extern unsigned int alloc_ptid( void *ptr );
extern void free_ptid( unsigned int id );
extern void *get_ptid_entry( unsigned int id );
extern struct process *create_process( int fd, struct process *parent, int inherit_all,
- const struct security_descriptor *sd );
+ const struct security_descriptor *sd, struct token *token );
extern data_size_t init_process( struct thread *thread );
extern struct thread *get_process_first_thread( struct process *process );
extern struct process *get_process_from_id( process_id_t id );
diff --git a/server/protocol.def b/server/protocol.def
index 45ab670ea..c763da4ca 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -791,6 +791,7 @@ struct rawinput_device
unsigned int access; /* access rights for process object */
client_cpu_t cpu; /* CPU that the new process will use */
data_size_t info_size; /* size of startup info */
+ obj_handle_t token; /* token for the new process */
VARARG(objattr,object_attributes); /* object attributes */
VARARG(info,startup_info,info_size); /* startup information */
VARARG(env,unicode_str); /* environment for new process */
diff --git a/server/request.c b/server/request.c
index 200c2697d..f743b720a 100644
--- a/server/request.c
+++ b/server/request.c
@@ -582,7 +582,7 @@ static void master_socket_poll_event( struct fd *fd, int event )
int client = accept( get_unix_fd( master_socket->fd ), (struct sockaddr *) &dummy, &len );
if (client == -1) return;
fcntl( client, F_SETFL, O_NONBLOCK );
- if ((process = create_process( client, NULL, 0, NULL )))
+ if ((process = create_process( client, NULL, 0, NULL, NULL )))
{
create_thread( -1, process, NULL );
release_object( process );
diff --git a/server/security.h b/server/security.h
index 21e90ccf2..32dfe5f8d 100644
--- a/server/security.h
+++ b/server/security.h
@@ -67,6 +67,8 @@ extern const ACL *token_get_default_dacl( struct token *token );
extern const SID *token_get_user( struct token *token );
extern const SID *token_get_primary_group( struct token *token );
extern int token_sid_present( struct token *token, const SID *sid, int deny);
+extern struct token *get_token_from_handle( obj_handle_t handle, unsigned int access );
+extern int token_is_primary( struct token *token );
static inline const ACE_HEADER *ace_next( const ACE_HEADER *ace )
{
diff --git a/server/token.c b/server/token.c
index 181219d21..858ec25d7 100644
--- a/server/token.c
+++ b/server/token.c
@@ -845,6 +845,12 @@ int token_assign_label( struct token *token, PSID label )
return ret;
}
+struct token *get_token_from_handle( obj_handle_t handle, unsigned int access )
+{
+ return (struct token *)get_handle_obj( current->process, handle,
+ access, &token_ops );
+}
+
struct token *token_create_admin( void )
{
struct token *token = NULL;
@@ -1271,6 +1277,11 @@ const SID *token_get_primary_group( struct token *token )
return token->primary_group;
}
+int token_is_primary( struct token *token )
+{
+ return token->primary;
+}
+
int check_object_access(struct object *obj, unsigned int *access)
{
GENERIC_MAPPING mapping;
--
2.24.0

View File

@@ -1,17 +1,25 @@
From 6d4621ddba8139747345c05f6251bae9b3c68e39 Mon Sep 17 00:00:00 2001
From e34d019222909281390f83149be755a4145024c4 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 7 Aug 2017 15:28:33 +0200
Subject: ntdll: Add semi-stub for TokenLinkedToken info class.
Subject: [PATCH] ntdll: Add semi-stub for TokenLinkedToken info class.
---
dlls/ntdll/nt.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
dlls/ntdll/unix/security.c | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 6f2b24e6ba4..99dba58b426 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -366,7 +366,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
diff --git a/dlls/ntdll/unix/security.c b/dlls/ntdll/unix/security.c
index f0057116dee..2769e5f6a7b 100644
--- a/dlls/ntdll/unix/security.c
+++ b/dlls/ntdll/unix/security.c
@@ -138,6 +138,7 @@ NTSTATUS WINAPI NtDuplicateToken( HANDLE token, ACCESS_MASK access, OBJECT_ATTRI
return status;
}
+extern HANDLE CDECL __wine_create_default_token(BOOL admin);
/***********************************************************************
* NtQueryInformationToken (NTDLL.@)
@@ -166,7 +167,7 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
0, /* TokenAuditPolicy */
0, /* TokenOrigin */
sizeof(TOKEN_ELEVATION_TYPE), /* TokenElevationType */
@@ -20,14 +28,14 @@ index 6f2b24e6ba4..99dba58b426 100644
sizeof(TOKEN_ELEVATION), /* TokenElevation */
0, /* TokenHasRestrictions */
0, /* TokenAccessInformation */
@@ -607,6 +607,32 @@ NTSTATUS WINAPI NtQueryInformationToken(
}
@@ -401,6 +402,33 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
SERVER_END_REQ;
break;
+ case TokenLinkedToken:
+ SERVER_START_REQ( get_token_elevation_type )
+ {
+ TOKEN_LINKED_TOKEN *linked_token = tokeninfo;
+ TOKEN_LINKED_TOKEN *linked_token = info;
+ req->handle = wine_server_obj_handle( token );
+ status = wine_server_call( req );
+ if (status == STATUS_SUCCESS)
@@ -50,9 +58,10 @@ index 6f2b24e6ba4..99dba58b426 100644
+ }
+ SERVER_END_REQ;
+ break;
+
case TokenElevation:
SERVER_START_REQ( get_token_elevation_type )
{
--
2.13.1
2.27.0

View File

@@ -1,20 +1,21 @@
From 6d8fd34cabbcbc64062675be610fb8704fcdc3ec Mon Sep 17 00:00:00 2001
From a8915b8ebd4c06b0216fc82d1ba8d958a677eccf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 7 Aug 2017 03:33:26 +0200
Subject: [PATCH] server: Correctly assign security labels for tokens.
---
dlls/advapi32/tests/security.c | 21 ++++++++++-----------
server/process.c | 8 +-------
dlls/advapi32/tests/security.c | 21 +++++++++--------
server/named_pipe.c | 2 +-
server/process.c | 8 +------
server/security.h | 2 +-
server/token.c | 41 ++++++++++++++++++++++++-----------------
4 files changed, 36 insertions(+), 36 deletions(-)
server/token.c | 41 ++++++++++++++++++++--------------
5 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index bf4161c..0610ec7 100644
index 94f3ea4601a..ab572421a73 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -7186,7 +7186,6 @@ static void test_token_security_descriptor(void)
@@ -7105,7 +7105,6 @@ static void test_token_security_descriptor(void)
defaulted = TRUE;
ret = GetSecurityDescriptorDacl(sd2, &present, &acl2, &defaulted);
ok(ret, "GetSecurityDescriptorDacl failed with error %u\n", GetLastError());
@@ -22,7 +23,7 @@ index bf4161c..0610ec7 100644
ok(present, "DACL not present\n");
if (present)
@@ -7307,7 +7306,7 @@ static void test_token_security_descriptor(void)
@@ -7226,7 +7225,7 @@ static void test_token_security_descriptor(void)
ok(ret, "GetAce failed with error %u\n", GetLastError());
ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
"Unexpected ACE type %#x\n", ace->Header.AceType);
@@ -31,7 +32,7 @@ index bf4161c..0610ec7 100644
"Expected medium integrity level\n");
}
@@ -7360,8 +7359,8 @@ static void test_token_security_descriptor(void)
@@ -7279,8 +7278,8 @@ static void test_token_security_descriptor(void)
sacl = NULL;
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
@@ -42,7 +43,7 @@ index bf4161c..0610ec7 100644
if (sacl)
{
@@ -7410,8 +7409,8 @@ static void test_token_security_descriptor(void)
@@ -7329,8 +7328,8 @@ static void test_token_security_descriptor(void)
sacl = NULL;
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
@@ -53,7 +54,7 @@ index bf4161c..0610ec7 100644
if (sacl)
{
@@ -7475,8 +7474,8 @@ static void test_token_security_descriptor(void)
@@ -7394,8 +7393,8 @@ static void test_token_security_descriptor(void)
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
@@ -64,7 +65,7 @@ index bf4161c..0610ec7 100644
if (sacl)
{
@@ -7513,8 +7512,8 @@ static void test_token_security_descriptor(void)
@@ -7432,8 +7431,8 @@ static void test_token_security_descriptor(void)
sacl = NULL;
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
@@ -75,7 +76,7 @@ index bf4161c..0610ec7 100644
if (sacl)
{
@@ -7732,7 +7731,7 @@ static void test_child_token_sd_medium(void)
@@ -7652,7 +7651,7 @@ static void test_child_token_sd_medium(void)
ok(ret, "GetAce failed with error %u\n", GetLastError());
ok(ace_label->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
"Unexpected ACE type %#x\n", ace_label->Header.AceType);
@@ -84,11 +85,24 @@ index bf4161c..0610ec7 100644
"Expected medium integrity level\n");
memset(buffer_integrity, 0, sizeof(buffer_integrity));
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 4cd4d7dc4a8..06bf8402aea 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -1142,7 +1142,7 @@ static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *as
if (current->process->token) /* FIXME: use the client token */
{
struct token *token;
- if (!(token = token_duplicate( current->process->token, 0, SecurityImpersonation, NULL, NULL, 0, NULL, 0 )))
+ if (!(token = token_duplicate( current->process->token, 0, SecurityImpersonation, NULL, NULL, 0, NULL, 0, NULL )))
return 0;
if (current->token) release_object( current->token );
current->token = token;
diff --git a/server/process.c b/server/process.c
index b7c9da3..250f777 100644
index 31d5b96a25d..2c485831e33 100644
--- a/server/process.c
+++ b/server/process.c
@@ -562,17 +562,11 @@ struct process *create_process( int fd, struct thread *parent_thread, int inheri
@@ -577,17 +577,11 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
: alloc_handle_table( process, 0 );
/* Note: for security reasons, starting a new process does not attempt
* to use the current impersonation token for the new process */
@@ -108,7 +122,7 @@ index b7c9da3..250f777 100644
return process;
diff --git a/server/security.h b/server/security.h
index 32dfe5f..87377cc 100644
index 32dfe5f8db9..87377ccd673 100644
--- a/server/security.h
+++ b/server/security.h
@@ -59,7 +59,7 @@ extern int token_assign_label( struct token *token, PSID label );
@@ -121,10 +135,10 @@ index 32dfe5f..87377cc 100644
const LUID_AND_ATTRIBUTES *reqprivs,
unsigned int count, LUID_AND_ATTRIBUTES *usedprivs);
diff --git a/server/token.c b/server/token.c
index 5db97b4..bd251c7 100644
index 2f466aa1b25..23bc1cc13f7 100644
--- a/server/token.c
+++ b/server/token.c
@@ -668,7 +668,7 @@ static int filter_privilege( struct privilege *privilege, const LUID_AND_ATTRIBU
@@ -675,7 +675,7 @@ static int filter_privilege( struct privilege *privilege, const LUID_AND_ATTRIBU
struct token *token_duplicate( struct token *src_token, unsigned primary,
int impersonation_level, const struct security_descriptor *sd,
const LUID_AND_ATTRIBUTES *filter_privileges, unsigned int priv_count,
@@ -133,7 +147,7 @@ index 5db97b4..bd251c7 100644
{
const luid_t *modified_id =
primary || (impersonation_level == src_token->impersonation_level) ?
@@ -735,6 +735,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
@@ -742,6 +742,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
if (sd) default_set_sd( &token->obj, sd, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION );
@@ -146,7 +160,7 @@ index 5db97b4..bd251c7 100644
return token;
}
@@ -906,6 +912,12 @@ struct token *token_create_admin( void )
@@ -913,6 +919,12 @@ struct token *token_create_admin( void )
admin_source, NULL, -1, TokenElevationTypeFull, &high_label_sid );
/* we really need a primary group */
assert( token->primary_group );
@@ -159,7 +173,7 @@ index 5db97b4..bd251c7 100644
}
free( logon_sid );
@@ -964,6 +976,12 @@ static struct token *token_create_limited( void )
@@ -971,6 +983,12 @@ static struct token *token_create_limited( void )
admin_source, NULL, -1, TokenElevationTypeLimited, &medium_label_sid );
/* we really need a primary group */
assert( token->primary_group );
@@ -172,7 +186,7 @@ index 5db97b4..bd251c7 100644
}
free( logon_sid );
@@ -1432,7 +1450,8 @@ DECL_HANDLER(duplicate_token)
@@ -1439,7 +1457,8 @@ DECL_HANDLER(duplicate_token)
TOKEN_DUPLICATE,
&token_ops )))
{
@@ -182,7 +196,7 @@ index 5db97b4..bd251c7 100644
if (token)
{
unsigned int access = req->access ? req->access : get_handle_access( current->process, req->handle );
@@ -1462,7 +1481,7 @@ DECL_HANDLER(filter_token)
@@ -1469,7 +1488,7 @@ DECL_HANDLER(filter_token)
group_count = get_sid_count( filter_groups, get_req_data_size() - priv_count * sizeof(LUID_AND_ATTRIBUTES) );
token = token_duplicate( src_token, src_token->primary, src_token->impersonation_level, NULL,
@@ -191,7 +205,7 @@ index 5db97b4..bd251c7 100644
if (token)
{
unsigned int access = get_handle_access( current->process, req->handle );
@@ -1788,23 +1807,11 @@ DECL_HANDLER(set_token_default_dacl)
@@ -1795,23 +1814,11 @@ DECL_HANDLER(set_token_default_dacl)
DECL_HANDLER(create_token)
{
struct token *token;
@@ -218,5 +232,5 @@ index 5db97b4..bd251c7 100644
}
}
--
2.7.4
2.27.0

View File

@@ -1,4 +1,7 @@
Fixes: [40613] Basic implementation for token integrity levels and UAC handling
Fixes: [39262] Run explorer.exe as unevaluated process
Depends: advapi32-CreateRestrictedToken
Depends: Staging
# Broken due to ntdll.so <- ntdll.dll imports. This isn't particularly difficult
# to fix, but it was already broken for some more obscure reason, and the whole
# patch set needs to be rewritten anyway.
Disabled: true

View File

@@ -0,0 +1,346 @@
From 3478a4e41c07a66e7e913c54bcf5ad52e16a8fee Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 2 Oct 2020 11:29:24 -0500
Subject: [PATCH] bcrypt: Allow multiple backends to coexist.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/bcrypt/Makefile.in | 3 +-
dlls/bcrypt/bcrypt_internal.h | 3 +
dlls/bcrypt/gnutls.c | 32 ++++--
dlls/bcrypt/macos.c | 18 ++-
dlls/bcrypt/unixlib.c | 211 ++++++++++++++++++++++++++++++++++
5 files changed, 252 insertions(+), 15 deletions(-)
create mode 100644 dlls/bcrypt/unixlib.c
diff --git a/dlls/bcrypt/Makefile.in b/dlls/bcrypt/Makefile.in
index 24803fb2d7cb..46a20d473dd7 100644
--- a/dlls/bcrypt/Makefile.in
+++ b/dlls/bcrypt/Makefile.in
@@ -11,6 +11,7 @@ C_SRCS = \
macos.c \
md2.c \
sha256.c \
- sha512.c
+ sha512.c \
+ unixlib.c
RC_SRCS = version.rc
diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h
index eb1361115093..3c7110d05f84 100644
--- a/dlls/bcrypt/bcrypt_internal.h
+++ b/dlls/bcrypt/bcrypt_internal.h
@@ -218,4 +218,7 @@ struct key_funcs
NTSTATUS (CDECL *key_import_rsa)( struct key *, UCHAR *, ULONG );
};
+struct key_funcs *gnutls_lib_init(DWORD reason);
+struct key_funcs *macos_lib_init(DWORD reason);
+
#endif /* __BCRYPT_INTERNAL_H */
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index c065ac31fba3..9490ea8612a8 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -371,9 +371,12 @@ fail:
static void gnutls_uninitialize(void)
{
- pgnutls_global_deinit();
- dlclose( libgnutls_handle );
- libgnutls_handle = NULL;
+ if (libgnutls_handle)
+ {
+ pgnutls_global_deinit();
+ dlclose( libgnutls_handle );
+ libgnutls_handle = NULL;
+ }
}
struct buffer
@@ -1949,19 +1952,28 @@ static const struct key_funcs key_funcs =
key_import_rsa
};
-NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
+struct key_funcs * gnutls_lib_init( DWORD reason )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
- if (!gnutls_initialize()) return STATUS_DLL_NOT_FOUND;
- *(const struct key_funcs **)ptr_out = &key_funcs;
- break;
+ if (!gnutls_initialize()) return NULL;
+ return &key_funcs;
case DLL_PROCESS_DETACH:
gnutls_uninitialize();
- break;
}
- return STATUS_SUCCESS;
+ return NULL;
}
-#endif /* HAVE_GNUTLS_CIPHER_INIT */
+#else /* HAVE_GNUTLS_CIPHER_INIT */
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winbase.h"
+#include "winternl.h"
+
+struct key_funcs * gnutls_lib_init( DWORD reason )
+{
+ return NULL;
+}
+#endif
diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c
index 44906519cef0..2a88aec8362c 100644
--- a/dlls/bcrypt/macos.c
+++ b/dlls/bcrypt/macos.c
@@ -302,11 +302,21 @@ static const struct key_funcs key_funcs =
key_import_rsa
};
-NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
+struct key_funcs * macos_lib_init( DWORD reason )
{
- if (reason != DLL_PROCESS_ATTACH) return STATUS_SUCCESS;
- *(const struct key_funcs **)ptr_out = &key_funcs;
- return STATUS_SUCCESS;
+ if (reason != DLL_PROCESS_ATTACH) return NULL;
+ return &key_funcs;
}
+#else
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winbase.h"
+#include "winternl.h"
+
+struct key_funcs * macos_lib_init( DWORD reason )
+{
+ return NULL;
+}
#endif
diff --git a/dlls/bcrypt/unixlib.c b/dlls/bcrypt/unixlib.c
new file mode 100644
index 000000000000..9cbb25f5740c
--- /dev/null
+++ b/dlls/bcrypt/unixlib.c
@@ -0,0 +1,211 @@
+#if 0
+#pragma makedep unix
+#endif
+
+#include "config.h"
+#include "wine/port.h"
+
+#include <stdarg.h>
+
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winbase.h"
+#include "ntsecapi.h"
+#include "bcrypt.h"
+
+#include "bcrypt_internal.h"
+
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+#if defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 || defined(HAVE_GNUTLS_CIPHER_INIT)
+WINE_DEFAULT_DEBUG_CHANNEL(bcrypt);
+
+static NTSTATUS CDECL key_set_property( struct key *key, const WCHAR *prop, UCHAR *value, ULONG size, ULONG flags )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_symmetric_init( struct key *key )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static void CDECL key_symmetric_vector_reset( struct key *key )
+{
+ FIXME( "not implemented\n" );
+}
+
+static NTSTATUS CDECL key_symmetric_set_auth_data( struct key *key, UCHAR *auth_data, ULONG len )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_symmetric_encrypt( struct key *key, const UCHAR *input, ULONG input_len, UCHAR *output, ULONG output_len )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_symmetric_decrypt( struct key *key, const UCHAR *input, ULONG input_len, UCHAR *output, ULONG output_len )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_symmetric_get_tag( struct key *key, UCHAR *tag, ULONG len )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static void CDECL key_symmetric_destroy( struct key *key )
+{
+ FIXME( "not implemented\n" );
+}
+
+static NTSTATUS CDECL key_asymmetric_init( struct key *key )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_asymmetric_sign( struct key *key, void *padding, UCHAR *input, ULONG input_len, UCHAR *output,
+ ULONG output_len, ULONG *ret_len, ULONG flags )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_asymmetric_verify( struct key *key, void *padding, UCHAR *hash, ULONG hash_len,
+ UCHAR *signature, ULONG signature_len, DWORD flags )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_export_dsa_capi( struct key *key, UCHAR *buf, ULONG len, ULONG *ret_len )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_export_ecc( struct key *key, UCHAR *output, ULONG len, ULONG *ret_len )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_import_dsa_capi( struct key *key, UCHAR *buf, ULONG len )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_import_ecc( struct key *key, UCHAR *input, ULONG len )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_asymmetric_generate( struct key *key )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_asymmetric_duplicate( struct key *key_orig, struct key *key_copy )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static void CDECL key_asymmetric_destroy( struct key *key )
+{
+ FIXME( "not implemented\n" );
+}
+
+static NTSTATUS CDECL key_asymmetric_decrypt( struct key *key, UCHAR *input, ULONG input_len,
+ UCHAR *output, ULONG *output_len )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS CDECL key_import_rsa( struct key *key, UCHAR *input, ULONG input_len )
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static struct key_funcs key_funcs =
+{
+ key_set_property,
+ key_symmetric_init,
+ key_symmetric_vector_reset,
+ key_symmetric_set_auth_data,
+ key_symmetric_encrypt,
+ key_symmetric_decrypt,
+ key_symmetric_get_tag,
+ key_symmetric_destroy,
+ key_asymmetric_init,
+ key_asymmetric_generate,
+ key_asymmetric_decrypt,
+ key_asymmetric_duplicate,
+ key_asymmetric_sign,
+ key_asymmetric_verify,
+ key_asymmetric_destroy,
+ key_export_dsa_capi,
+ key_export_ecc,
+ key_import_dsa_capi,
+ key_import_ecc,
+ key_import_rsa,
+};
+
+NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
+{
+ struct key_funcs *gnutls_funcs = gnutls_lib_init(reason);
+ struct key_funcs *macos_funcs = macos_lib_init(reason);
+
+ if (reason == DLL_PROCESS_ATTACH)
+ {
+#define RESOLVE_FUNC(name) \
+ if (macos_funcs && macos_funcs->key_##name) \
+ key_funcs.key_##name = macos_funcs->key_##name; \
+ if (gnutls_funcs && gnutls_funcs->key_##name) \
+ key_funcs.key_##name = gnutls_funcs->key_##name;
+
+ RESOLVE_FUNC(set_property)
+ RESOLVE_FUNC(symmetric_init)
+ RESOLVE_FUNC(symmetric_vector_reset)
+ RESOLVE_FUNC(symmetric_set_auth_data)
+ RESOLVE_FUNC(symmetric_encrypt)
+ RESOLVE_FUNC(symmetric_decrypt)
+ RESOLVE_FUNC(symmetric_get_tag)
+ RESOLVE_FUNC(symmetric_destroy)
+ RESOLVE_FUNC(asymmetric_init)
+ RESOLVE_FUNC(asymmetric_generate)
+ RESOLVE_FUNC(asymmetric_decrypt)
+ RESOLVE_FUNC(asymmetric_duplicate)
+ RESOLVE_FUNC(asymmetric_sign)
+ RESOLVE_FUNC(asymmetric_verify)
+ RESOLVE_FUNC(asymmetric_destroy)
+ RESOLVE_FUNC(export_dsa_capi)
+ RESOLVE_FUNC(export_ecc)
+ RESOLVE_FUNC(import_dsa_capi)
+ RESOLVE_FUNC(import_ecc)
+ RESOLVE_FUNC(import_rsa)
+
+#undef RESOLVE_FUNC
+
+ *(struct key_funcs **)ptr_out = &key_funcs;
+ }
+
+ return STATUS_SUCCESS;
+}
+
+#endif
--
2.29.2

View File

@@ -1,4 +1,4 @@
From d0c4ac467f5e85e29ae407b29b6a93c85f375fd3 Mon Sep 17 00:00:00 2001
From 305131e59c071ca84e4447ab053b04bf4023fee8 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Tue, 7 Jan 2020 14:22:49 -0600
Subject: [PATCH] bcrypt: Implement BCRYPT_KDF_HASH.
@@ -6,24 +6,22 @@ Subject: [PATCH] bcrypt: Implement BCRYPT_KDF_HASH.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47699
Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
---
dlls/bcrypt/bcrypt_main.c | 110 +++++++++++++++++++++++++++++++++++++
dlls/bcrypt/tests/bcrypt.c | 2 +-
2 files changed, 111 insertions(+), 1 deletion(-)
dlls/bcrypt/bcrypt_main.c | 108 ++++++++++++++++++++++++++++++++++++-
dlls/bcrypt/tests/bcrypt.c | 3 +-
2 files changed, 108 insertions(+), 3 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 15b934247d..57d552a4c0 100644
index 0655c5dcfe81..70e914bd41f1 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1773,6 +1773,116 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE hSecret, LPCWSTR deriv_func
return STATUS_INVALID_HANDLE;
}
@@ -1993,7 +1993,113 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE handle, LPCWSTR kdf, BCrypt
if (!secret || secret->hdr.magic != MAGIC_SECRET) return STATUS_INVALID_HANDLE;
if (!kdf) return STATUS_INVALID_PARAMETER;
+ if (flags)
+ {
+ FIXME("flags ignored: %08x\n", flags);
+ }
- if (!(lstrcmpW( kdf, BCRYPT_KDF_RAW_SECRET )))
+ if (flags) FIXME("flags ignored: %08x\n", flags);
+
+ if (!(strcmpW(deriv_func, BCRYPT_KDF_HASH)))
+ if (!(lstrcmpW( kdf, BCRYPT_KDF_HASH )))
+ {
+ unsigned int i;
+ BCryptBuffer *hash_algorithm = NULL;
@@ -69,7 +67,7 @@ index 15b934247d..57d552a4c0 100644
+ {
+ for (i = 0; i < ARRAY_SIZE( builtin_algorithms ); i++)
+ {
+ if (!strcmpW( hash_algorithm->pvBuffer, builtin_algorithms[i].name))
+ if (!lstrcmpW( hash_algorithm->pvBuffer, builtin_algorithms[i].name))
+ {
+ hash_alg_id = i;
+ break;
@@ -127,15 +125,15 @@ index 15b934247d..57d552a4c0 100644
+
+ return STATUS_SUCCESS;
+ }
+ else
if (!(strcmpW(deriv_func, BCRYPT_KDF_RAW_SECRET)))
+ else if (!(lstrcmpW( kdf, BCRYPT_KDF_RAW_SECRET )))
{
ULONG n;
ULONG secret_length = secret->len;
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index d9509f2c49..edc59a8a97 100644
index 6be406dee21f..b13432523d15 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -2084,7 +2084,7 @@ static void test_ECDH(void)
@@ -2180,7 +2180,7 @@ static void test_ECDH(void)
raw_secret_end:
status = pBCryptDeriveKey(secret, BCRYPT_KDF_HASH, &hash_params, NULL, 0, &size, 0);
@@ -144,6 +142,14 @@ index d9509f2c49..edc59a8a97 100644
if (status != STATUS_SUCCESS)
{
@@ -2716,7 +2716,6 @@ static void test_SecretAgreement(void)
ok(status == STATUS_INVALID_PARAMETER, "got %08x\n", status);
status = pBCryptDeriveKey(secret, L"HASH", NULL, NULL, 0, &size, 0);
- todo_wine
ok(status == STATUS_SUCCESS, "got %08x\n", status);
status = pBCryptDestroyHash(secret);
--
2.24.1
2.29.2

Some files were not shown because too many files have changed in this diff Show More