Compare commits

..

175 Commits

Author SHA1 Message Date
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
Alistair Leslie-Hughes
8648971fa8 Release v5.10 2020-06-06 16:35:31 +10:00
Zebediah Figura
f1917e904a Rebase against 3cc3b445752902e07231900befc296f74ad6576e. 2020-06-05 15:06:03 -05:00
Paul Gofman
f12808c094 Updated winebuild-Fake_Dlls patchset. 2020-06-05 13:34:50 +03:00
Zebediah Figura
8a2765d125 Rebase against 3c72034b72014a087eae8d181252c67cb0782e28.
64-bit syscalls are broken.
2020-06-04 18:26:58 -05:00
Zebediah Figura
7b78338b07 Rebase against aba27fd5a3241635adb15fa7ef40aa43bf3978a1. 2020-06-04 00:08:14 -05:00
Alistair Leslie-Hughes
0db92c336f Updated d3d11-Deferred_Context patchset 2020-06-03 10:43:26 +10:00
Zebediah Figura
2fd3b9fdfd ntdll-RtlCreateUserThread: Fix a compiler warning. 2020-06-02 18:36:41 -05:00
Zebediah Figura
92d52c3f4c ntdll-Interrupt-0x2e: Fix a compiler warning. 2020-06-02 18:36:41 -05:00
Zebediah Figura
a4d98c48f9 Rebase against 48020f4846cca1a02f4e1dc037e2cc2068df5e9c. 2020-06-02 18:36:41 -05:00
Paul Gofman
676f261e5e Updated ntdll-ForceBottomUpAlloc patchset. 2020-06-02 21:29:16 +03:00
Alistair Leslie-Hughes
6387991cc0 Fixed rebase for x64 2020-06-02 14:04:28 +10:00
Zebediah Figura
c81093882b Rebase against 3c86adab766e3bc7c91da088c2dd6bc41a917055. 2020-06-01 22:31:00 -05:00
Alistair Leslie-Hughes
f132e60b9d Updated d3d11-Deferred_Context patch
Game: Trainz: A New Era.
2020-06-01 16:22:19 +10:00
Paul Gofman
934a09585a Updated winebuild-Fake_Dlls patchset. 2020-05-31 23:12:03 +03:00
Zebediah Figura
06877e55b1 Rebase against bf83d755d987fec552cd1dce30638c31c49ab760. 2020-05-29 19:13:43 -05:00
Alistair Leslie-Hughes
4e692b5301 Rebase against e48fabff525061c8eea9558084a97308cebe6b7b. 2020-05-28 08:46:43 +10:00
Alistair Leslie-Hughes
9ff4e2dc44 Update commit-rebase.sh
Make it work when tree already has patches applied.
2020-05-28 08:03:39 +10:00
Alistair Leslie-Hughes
76f206526a Fix commit sha 2020-05-28 08:02:14 +10:00
Alistair Leslie-Hughes
f3298432f0 Rebase against 87733a69f7448d25539cbc4fc37d2e93466f38de. 2020-05-27 10:10:56 +10:00
Alistair Leslie-Hughes
8be56c21f9 Rebase against 86e388c9182a4121eab35353bdfae3f0f4fd5a40. 2020-05-26 09:08:07 +10:00
Alistair Leslie-Hughes
543cee79a8 Added ntdll-RtlQueryRegistryValuesEx patchset 2020-05-24 18:38:23 +10:00
Alistair Leslie-Hughes
c6132bcb28 Added ntoskrnl.exe-KeGenericCallDpc 2020-05-24 17:47:21 +10:00
Alistair Leslie-Hughes
9ffacb6b09 Added ntoskrnl.exe-KeQueryActiveProcessorCountEx patchset 2020-05-24 17:46:14 +10:00
Alistair Leslie-Hughes
bca232f190 Add ntoskrnl.exe-KeRevertToUserAffinityThreadEx patchset 2020-05-24 17:41:57 +10:00
Alistair Leslie-Hughes
2263ec0d3d Add ntoskrnl.exe-KeSetSystemAffinityThreadEx patchset 2020-05-24 17:40:24 +10:00
Alistair Leslie-Hughes
2c7588eb2f Add ntoskrnl.exe-KdRefreshDebuggerNotPresent patchset 2020-05-24 17:38:27 +10:00
Alistair Leslie-Hughes
7b5a0e5a94 Release v5.9 2020-05-23 11:04:58 +10:00
Alistair Leslie-Hughes
bf85255a61 Added ntdll-SystemCodeIntegrityInformation patchset 2020-05-23 10:51:19 +10:00
Zebediah Figura
7f9b426cb9 Rebase against 056c9df854817670dc4fb9c095cba29c99089ac8. 2020-05-22 17:57:07 -05:00
Paul Gofman
a1bda115af Updated winebuild-Fake_Dlls patchset. 2020-05-22 19:56:58 +03:00
Zebediah Figura
033542b024 libs-Debug_Channel: Disable. 2020-05-21 21:48:19 -05:00
Zebediah Figura
1f7dd0ee12 winebuild-Fake_Dlls: Correct rebase. 2020-05-21 21:48:11 -05:00
Zebediah Figura
4501d49149 Rebase against b65ca133052ed9053e48c571155a764d4d711277. 2020-05-21 20:17:05 -05:00
Alistair Leslie-Hughes
5246a035e9 Rebase against fe4e6934a937645cea4fece505c0e1acaf2dfc07 2020-05-21 08:56:59 +10:00
Alistair Leslie-Hughes
fbe1ba5578 Rebase against 3bb824f98891e8eb907c9c652fe528373a17b10d 2020-05-20 08:48:22 +10:00
Alistair Leslie-Hughes
24cd5774cf Updated patches/patchinstall.sh 2020-05-19 12:57:14 +10:00
Zebediah Figura
307f8a782d Staging: Get rid of the wine_get_patches() ntdll export.
Nobody should ever programmatically care about this.
2020-05-18 19:31:47 -05:00
Zebediah Figura
bee49c0b29 patchinstall.py: Support --upstream-commit. 2020-05-18 19:30:10 -05:00
Zebediah Figura
4b2ca6b38e server-Object_Types: Fix a copy-paste error.
Introduced in b74293fbfe.

Thanks to Paul Gofman for finding this.
2020-05-18 19:30:10 -05:00
Zebediah Figura
762c0e7040 ntdll-avoid-fstatat: Remove patch set.
This was written for the Mac OS build machine maintained by Michael MĂĽller and
Sebastian Lackner. That machine is out of service as of Wine 5.8. The current
plan is to ensure the replacement has a recent enough SDK to use fstatat().
2020-05-18 19:30:10 -05:00
Zebediah Figura
0a85e3f331 Rebase against 3bb824f98891e8eb907c9c652fe528373a17b10d. 2020-05-18 19:30:09 -05:00
Zebediah Figura
68f3e40ff7 Rebase against 9e26bc811656ad8eb901bffa5528b9ce25d44bc3. 2020-05-15 17:29:14 -05:00
Zebediah Figura
cc185de9ef Rebase against 893080e4df5a45929320ebb88b8668eea316476c. 2020-05-14 19:00:49 -05:00
Alistair Leslie-Hughes
e30e225125 Rebase against debe646aa70f88b4c4aa0dc4f380d6db939e573e 2020-05-14 08:25:28 +10:00
Zebediah Figura
d58990f6ac Rebase against 26b26a2e0efcb776e7b0115f15580d2507b10400. 2020-05-12 18:03:01 -05:00
Alistair Leslie-Hughes
3e3661298c Rebase against b071d37b8017ff34a29f1555ab6630d4b88d1838 2020-05-12 08:21:46 +10:00
Alistair Leslie-Hughes
7d92cd315b Release v5.8 2020-05-09 15:46:18 +10:00
Paul Gofman
3931c93628 Updated ntdll-WRITECOPY patchset.
Get the guard with STAGING_WRITECOPY env var back as the
patchset is currently causing some regressions.
2020-05-08 19:06:51 +03:00
Alistair Leslie-Hughes
813de5d6f8 Rebase against 148fc1adb53aa1d78a67b2a0ee5ea8058d92589a 2020-05-07 10:22:41 +10:00
Zebediah Figura
dfc3b0f583 Rebase against 1976685a0f57bdec939228d73f6252c68ccb8f80. 2020-05-05 16:17:09 -05:00
Zebediah Figura
3e39e3132b Fix a couple of errors. 2020-05-04 22:44:11 -05:00
Alistair Leslie-Hughes
76ba9d2387 Rebase against 4e2ad334b5881af7661be4d6df3c51aae92ca4a2 2020-05-04 22:19:25 -05:00
Zebediah Figura
d4918b4305 kernel32-Named_Pipe: Remove patch set.
We have had complete message mode named pipe support for multiple years now, and PIPE_NOWAIT for a while too.
2020-05-04 22:19:25 -05:00
Paul Gofman
dcd4faf1c9 Updated winebuild-Fake_Dlls patchset.
Fix Apple code path after ntdll-User_Shared_Data update.
2020-05-04 22:19:24 -05:00
Zebediah Figura
7557b3e2eb Revert "winebuild-Fake_Dlls: Get rid of the separate path for Mac OS."
This reverts commit 4147635dfc.
2020-05-04 22:19:24 -05:00
Zebediah Figura
4b12c5a4e3 Revert "Updated winebuild-Fake_Dlls, ntdll-Syscall_Emulation patchsets."
This reverts commit ca73dc62cd.
2020-05-04 22:19:24 -05:00
Paul Gofman
ca73dc62cd Updated winebuild-Fake_Dlls, ntdll-Syscall_Emulation patchsets.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49065
2020-05-01 14:36:17 +03:00
Zebediah Figura
4147635dfc winebuild-Fake_Dlls: Get rid of the separate path for Mac OS. 2020-04-30 18:58:33 -05:00
Zebediah Figura
4e6a477acd ntdll-User_Shared_Data: Replace with new wineserver-based implementation. 2020-04-30 18:14:40 -05:00
Zebediah Figura
169c49055d Rebase against 0c27d244f76ad90301c5db09d738b3a0389bcdac. 2020-04-30 17:39:18 -05:00
Alistair Leslie-Hughes
7b0b95ee53 Rebase against cf8a6eb2769d2c4ba5bb837d29db89f6b88706ae 2020-04-30 08:28:10 +10:00
Paul Gofman
1785a56934 Updated ntdll-NtSetLdtEntries patchset.
Fixed a test failure.
2020-04-29 17:18:02 +03:00
Paul Gofman
f2d1cc1a8c Updated wined3d-Indexed_Vertex_Blending patchset.
Fix crash in 'Raiden 3 Digital Edition'.
2020-04-29 15:22:03 +03:00
Zebediah Figura
8a46f19ece Rebase against 7ccc45f754a39a425ecc2358a4cfc5675ff11ffb. 2020-04-28 17:41:41 -05:00
Paul Gofman
d33cdb84fd Updated ntdll-WRITECOPY patchset.
Added patches by Andrew Wesie which complete the implementation
and remove the configuration option that was previously
disabled by default.
2020-04-28 14:55:04 +03:00
Zebediah Figura
69a4e4baa2 Rebase against 28ec2795186c7db83637b3b17e4fa95095ebb77d. 2020-04-27 16:42:51 -05:00
Alistair Leslie-Hughes
2ad422ff4d Release v5.7 2020-04-25 21:49:25 +10:00
Paul Gofman
a8b95783eb Added ntdll-FLS_Callbacks patchset. 2020-04-25 13:12:04 +03:00
Zebediah Figura
4581daea3b Rebase against c44e0cf60ad1a967d80fafb427974332b35a0071. 2020-04-24 16:35:33 -05:00
Paul Gofman
77d29cbee9 Updated ntdll-Syscall_Emulation patchset. 2020-04-24 13:43:49 +03:00
Zebediah Figura
f90eb74f8d Rebase against 28bc1bb463eb4075c6a113ba5c279a0506c6daea. 2020-04-23 23:15:23 -05:00
Zebediah Figura
abc772e286 Add missing server object operations to struct context.
Missed by yesterday's rebase.
2020-04-23 10:57:26 -05:00
Zebediah Figura
2c2eabb5c0 Rebase against f52b33c63064aa59f48a9c10d624e3508da55b88. 2020-04-22 17:09:11 -05:00
Paul Gofman
75637c26ea Updated ntdll-Syscall_Emulation patchset. 2020-04-22 19:14:29 +03:00
Alistair Leslie-Hughes
4e0031b058 Rebase against f65cfbfe9b20e38537c7cb8608e7f411c9e8b725 2020-04-22 08:35:52 +10:00
Alistair Leslie-Hughes
0d8d1f0447 Rebase against f31a29b8d1ea478af28f14cdaf3db1515a932853 2020-04-21 08:19:34 +10:00
Alistair Leslie-Hughes
029c249e78 Rebase against 59987bc9ecdd0dbafd768a95c21a14884bc77c07 2020-04-18 14:54:07 +10:00
Zebediah Figura
8d4d0a840e user32-rawinput-mouse: Don't send raw input messages when there's no windows or sinks to receive them.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48946
2020-04-16 17:55:20 -05:00
Zebediah Figura
767b90c5dd Rebase against c18152630362c1bff1813fe8ad5c75ffb8dbb7cf. 2020-04-16 17:42:47 -05:00
Alistair Leslie-Hughes
a23c076055 Rebase against dc214bfad723efeea96a5d33eb7fc0802dc34be9 2020-04-15 10:14:15 +10:00
Paul Gofman
e2c2447841 Updated ntdll-Syscall_Emulation patchset. 2020-04-14 14:32:16 +03:00
Alistair Leslie-Hughes
4861c47f2b Remove macos compile patch
Fixed upstream.
2020-04-14 16:27:59 +10:00
Zebediah Figura
437038604a Rebase against 5e75310837e5ec77ebc361d689ea3279fa49ebac. 2020-04-13 18:10:11 -05:00
508 changed files with 23232 additions and 36363 deletions

View File

@@ -79,4 +79,33 @@ 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
---------
As many of you may or may not know, 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
us, 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/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.
As this is a volunteer project which is separate from WINE and CodeWeavers, any expenses
for applications, games, or hardware which we do not own comes out of pocket. This is the
reason this patreon has been created. 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, as mentioned this project is completely voluntary. However the
proceeds from Patreon are most definitely appreciated, and go towards helping us with
obtaining the various hardware and software mentioned. 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.
For anyone interested, wine-staging Patreon can be found here:
https://www.patreon.com/winestaging

View File

@@ -1,4 +1,4 @@
From 494fc3abe1eddabcf7cede677ee907284e89eea8 Mon Sep 17 00:00:00 2001
From a349cc8bdcc3a083ea507dbbdeba9053e3a338e4 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 22 Mar 2016 23:08:30 +0100
Subject: [PATCH] include: Check element type in CONTAINING_RECORD and similar
@@ -11,7 +11,7 @@ Subject: [PATCH] include: Check element type in CONTAINING_RECORD and similar
3 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/include/wine/list.h b/include/wine/list.h
index b4d681fe..287ad394 100644
index b4d681fe0f3..287ad394fae 100644
--- a/include/wine/list.h
+++ b/include/wine/list.h
@@ -228,7 +228,13 @@ static inline void list_move_head( struct list *dst, struct list *src )
@@ -31,7 +31,7 @@ index b4d681fe..287ad394 100644
#endif /* __WINE_SERVER_LIST_H */
diff --git a/include/wine/rbtree.h b/include/wine/rbtree.h
index dc50b5e7..8130deb5 100644
index 8aae29c8c10..330b3e8fbc9 100644
--- a/include/wine/rbtree.h
+++ b/include/wine/rbtree.h
@@ -23,8 +23,14 @@
@@ -52,10 +52,10 @@ index dc50b5e7..8130deb5 100644
struct wine_rb_entry
{
diff --git a/include/winnt.h b/include/winnt.h
index 2b489382..a156efc4 100644
index 46e17c546a7..d5c65d2017b 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -760,8 +760,14 @@ typedef struct _MEMORY_BASIC_INFORMATION
@@ -793,8 +793,14 @@ typedef struct _MEMORY_BASIC_INFORMATION
#define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
#define RTL_SIZEOF_THROUGH_FIELD(type, field) (FIELD_OFFSET(type, field) + RTL_FIELD_SIZE(type, field))
@@ -70,8 +70,8 @@ index 2b489382..a156efc4 100644
+ ((type *)((PCHAR)(address) - offsetof(type, field)))
+#endif
#define ARRAYSIZE(x) (sizeof(x) / sizeof((x)[0]))
#ifdef __WINESRC__
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
--
2.20.1
2.26.2

View File

@@ -1,18 +1,18 @@
From 9e585de1f2f28e1ef18c1edca875779c491375cb Mon Sep 17 00:00:00 2001
From aa9cb874b1fb89601d6a5a735b442b8a7aa7b3aa 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.
---
dlls/kernel32/process.c | 10 ++++++++++
1 file changed, 10 insertions(+)
dlls/kernel32/process.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 36ed82bff8c..b8a677c5485 100644
index 8f506fcf1320..45bfe7fe7b5d 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -65,6 +65,7 @@
@@ -60,6 +60,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(process);
WINE_DECLARE_DEBUG_CHANNEL(relay);
@@ -20,7 +20,15 @@ index 36ed82bff8c..b8a677c5485 100644
typedef struct
{
@@ -997,6 +998,15 @@ void WINAPI start_process( LPTHREAD_START_ROUTINE entry, PEB *peb )
@@ -125,6 +126,7 @@ static inline DWORD call_process_entry( PEB *peb, LPTHREAD_START_ROUTINE entry )
}
#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
{
@@ -37,5 +45,5 @@ index 36ed82bff8c..b8a677c5485 100644
being_debugged = FALSE;
--
2.23.0
2.26.2

View File

@@ -1,17 +1,31 @@
From 05ca39b029f8f710ca53aeafc36384fd39fd6b89 Mon Sep 17 00:00:00 2001
From c097870c69720ece3874ad4ff987408a8c24ffb2 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.
---
libs/wine/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
dlls/ntdll/Makefile.in | 2 +-
libs/wine/Makefile.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
index ebf607e9d43..de93445d4e3 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 4833eb5..3cfa4f4 100644
index fe2a2b45e58..1e55a6b1f46 100644
--- a/libs/wine/Makefile.in
+++ b/libs/wine/Makefile.in
@@ -31,7 +31,7 @@ libwine_LDFLAGS = $(LIBWINE_LDFLAGS)
@@ -100,7 +100,7 @@ libwine_LDFLAGS = $(LIBWINE_LDFLAGS)
libwine_DEPS = $(LIBWINE_DEPENDS)
version.c: dummy
@@ -21,5 +35,5 @@ index 4833eb5..3cfa4f4 100644
dummy:
.PHONY: dummy
--
1.9.1
2.26.2

View File

@@ -1,66 +1,33 @@
From 63d2046a8f4388fbc7c12a07ae5f412fccc1b202 Mon Sep 17 00:00:00 2001
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.
---
dlls/ntdll/misc.c | 8 ++++++++
dlls/ntdll/ntdll.spec | 1 +
include/wine/library.h | 1 +
libs/wine/config.c | 6 ++++++
libs/wine/wine.map | 1 +
loader/main.c | 42 +++++++++++++++++++++++++++++++++++++++++-
6 files changed, 58 insertions(+), 1 deletion(-)
4 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
index c29a1c26c26..8906e194272 100644
--- a/dlls/ntdll/misc.c
+++ b/dlls/ntdll/misc.c
@@ -60,6 +60,14 @@ const char * CDECL NTDLL_wine_get_version(void)
return wine_get_version();
}
+/*********************************************************************
+ * wine_get_patches (NTDLL.@)
+ */
+const void * CDECL NTDLL_wine_get_patches(void)
+{
+ return wine_get_patches();
+}
+
/*********************************************************************
* wine_get_build_id (NTDLL.@)
*/
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index e61a2578da5..52db67fd978 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1571,6 +1571,7 @@
# Version
@ cdecl wine_get_version() NTDLL_wine_get_version
+@ cdecl wine_get_patches() NTDLL_wine_get_patches
@ cdecl wine_get_build_id() NTDLL_wine_get_build_id
@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version
diff --git a/include/wine/library.h b/include/wine/library.h
index f338c4da190..1f992da6062 100644
index 090b8349559..b8a4a2df576 100644
--- a/include/wine/library.h
+++ b/include/wine/library.h
@@ -47,6 +47,7 @@ extern const char *wine_get_data_dir(void);
extern const char *wine_get_server_dir(void);
extern const char *wine_get_user_name(void);
@@ -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 2a3314cbfda..5b66c063db6 100644
index f5b4c0de9af..e52739d55ad 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -504,6 +504,12 @@ const char *wine_get_version(void)
@@ -515,6 +515,12 @@ const char *wine_get_version(void)
return PACKAGE_VERSION;
}
@@ -74,22 +41,22 @@ index 2a3314cbfda..5b66c063db6 100644
const char *wine_get_build_id(void)
{
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
index 7ea849b908e..a7359ee7872 100644
index 1143b129734..55f874d3e74 100644
--- a/libs/wine/wine.map
+++ b/libs/wine/wine.map
@@ -22,6 +22,7 @@ WINE_1.0
wine_get_server_dir;
wine_get_user_name;
@@ -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 407c897892d..d97d6b28bf8 100644
index 0e6b6f66b50..24bcfff8c4c 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -53,7 +53,8 @@ static void check_command_line( int argc, char *argv[] )
@@ -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"
@@ -99,7 +66,7 @@ index 407c897892d..d97d6b28bf8 100644
if (argc <= 1)
{
@@ -70,6 +71,45 @@ static void check_command_line( int argc, char *argv[] )
@@ -72,6 +73,45 @@ static void check_command_line( int argc, char *argv[] )
printf( "%s\n", wine_get_build_id() );
exit(0);
}
@@ -146,5 +113,5 @@ index 407c897892d..d97d6b28bf8 100644
--
2.25.1
2.26.2

View File

@@ -1,29 +1,43 @@
From 1eb8acd819f9eee8fdf154d0ef43881008265916 Mon Sep 17 00:00:00 2001
From 1b222275e7faf71ae1e5c94e297004055ec6f82f 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.
Subject: [PATCH] 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(-)
dlls/ntdll/ntdll.spec | 2 +-
dlls/ntdll/unix/security.c | 64 +++++++++++++++++++++++++++++
include/winnt.h | 5 +++
include/winternl.h | 1 +
server/named_pipe.c | 2 +-
server/process.c | 2 +-
server/protocol.def | 10 +++++
server/security.h | 4 +-
server/token.c | 84 +++++++++++++++++++++++++++++++++++++-
9 files changed, 168 insertions(+), 6 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(
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index a3bc57716da..f604c8a3c35 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -208,7 +208,7 @@
# @ stub NtEnumerateSystemEnvironmentValuesEx
@ stdcall -syscall NtEnumerateValueKey(long long long ptr long ptr)
@ stub NtExtendSection
-# @ stub NtFilterToken
+@ stdcall -syscall NtFilterToken(long long ptr ptr ptr ptr)
@ stdcall -syscall NtFindAtom(ptr long ptr)
@ stdcall -syscall NtFlushBuffersFile(long ptr)
@ stdcall -syscall NtFlushInstructionCache(long ptr long)
diff --git a/dlls/ntdll/unix/security.c b/dlls/ntdll/unix/security.c
index daecc5e0591..d063d43d6d4 100644
--- a/dlls/ntdll/unix/security.c
+++ b/dlls/ntdll/unix/security.c
@@ -604,6 +604,70 @@ NTSTATUS WINAPI NtAdjustPrivilegesToken( HANDLE token, BOOLEAN disable, TOKEN_PR
}
/******************************************************************************
+ * NtFilterToken [NTDLL.@]
+ * ZwFilterToken [NTDLL.@]
+/***********************************************************************
+ * NtFilterToken (NTDLL.@)
+ */
+NTSTATUS WINAPI NtFilterToken( HANDLE token, ULONG flags, TOKEN_GROUPS *disable_sids,
+ TOKEN_PRIVILEGES *privileges, TOKEN_GROUPS *restrict_sids,
@@ -52,14 +66,18 @@ index c3f5df3..59a08de 100644
+ BYTE *tmp;
+
+ for (i = 0; i < disable_sids->GroupCount; i++)
+ sids_len += RtlLengthSid( disable_sids->Groups[i].Sid );
+ {
+ SID *sid = disable_sids->Groups[i].Sid;
+ sids_len += offsetof( SID, SubAuthority[sid->SubAuthorityCount] );
+ }
+
+ sids = RtlAllocateHeap( GetProcessHeap(), 0, sids_len );
+ sids = malloc( 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 );
+ SID *sid = disable_sids->Groups[i].Sid;
+ len = offsetof( SID, SubAuthority[sid->SubAuthorityCount] );
+ memcpy( tmp, disable_sids->Groups[i].Sid, len );
+ }
+ }
@@ -76,32 +94,20 @@ index c3f5df3..59a08de 100644
+ }
+ SERVER_END_REQ;
+
+ RtlFreeHeap( GetProcessHeap(), 0, sids );
+ free( sids );
+ return status;
+}
+
+/******************************************************************************
* NtOpenProcessToken [NTDLL.@]
* ZwOpenProcessToken [NTDLL.@]
+
+
/***********************************************************************
* NtPrivilegeCheck (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
index e1cf78420a6..da17fe3e330 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -3904,6 +3904,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
@@ -4221,6 +4221,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
TOKEN_ADJUST_SESSIONID | \
TOKEN_ADJUST_DEFAULT )
@@ -114,10 +120,10 @@ index 16d96d8..4e238f9 100644
#define _SECURITY_DEFINED
diff --git a/include/winternl.h b/include/winternl.h
index c84e6d7..288f93e 100644
index b3fbb90feff..4687a410ca4 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2303,6 +2303,7 @@ NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES
@@ -2749,6 +2749,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);
@@ -125,11 +131,24 @@ index c84e6d7..288f93e 100644
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/named_pipe.c b/server/named_pipe.c
index b259abb8de4..4cd4d7dc4a8 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 )))
+ if (!(token = token_duplicate( current->process->token, 0, SecurityImpersonation, NULL, NULL, 0, NULL, 0 )))
return 0;
if (current->token) release_object( current->token );
current->token = token;
diff --git a/server/process.c b/server/process.c
index f8739d0..71d9d6d 100644
index 5e587b28cbe..406167e825b 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
@@ -577,7 +577,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 */
@@ -139,10 +158,10 @@ index f8739d0..71d9d6d 100644
}
if (!process->handles || !process->token) goto error;
diff --git a/server/protocol.def b/server/protocol.def
index 35824ae..6ee6d28 100644
index a121c371c19..ee07b1eca14 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3356,6 +3356,16 @@ enum caret_state
@@ -3263,6 +3263,16 @@ enum caret_state
obj_handle_t new_handle; /* duplicated handle */
@END
@@ -160,10 +179,10 @@ index 35824ae..6ee6d28 100644
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
index 606dbb2ab2c..6c337143c3d 100644
--- a/server/security.h
+++ b/server/security.h
@@ -55,7 +55,9 @@ extern const PSID security_high_label_sid;
@@ -56,7 +56,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,
@@ -175,10 +194,10 @@ index 873bbc6..bc4a8f6 100644
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
index 2fa95e17aaf..38a4c203d54 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 )
@@ -285,6 +285,19 @@ static int acl_is_valid( const ACL *acl, data_size_t size )
return TRUE;
}
@@ -198,7 +217,7 @@ index 0810a61..2f6a467 100644
/* 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,
@@ -626,8 +639,36 @@ static struct token *create_token( unsigned primary, const SID *user,
return token;
}
@@ -236,7 +255,7 @@ index 0810a61..2f6a467 100644
{
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,
@@ -663,6 +704,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
return NULL;
}
memcpy( newgroup, group, size );
@@ -249,7 +268,7 @@ index 0810a61..2f6a467 100644
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,
@@ -674,11 +721,14 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
/* copy privileges */
LIST_FOR_EACH_ENTRY( privilege, &src_token->privileges, struct privilege, entry )
@@ -264,7 +283,7 @@ index 0810a61..2f6a467 100644
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)
@@ -1311,7 +1361,7 @@ DECL_HANDLER(duplicate_token)
TOKEN_DUPLICATE,
&token_ops )))
{
@@ -273,7 +292,7 @@ index 0810a61..2f6a467 100644
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)
@@ -1321,6 +1371,36 @@ DECL_HANDLER(duplicate_token)
}
}
@@ -311,5 +330,5 @@ index 0810a61..2f6a467 100644
DECL_HANDLER(check_token_privileges)
{
--
2.7.4
2.27.0

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 8fe522dadc480b57415a7b63e0752de113851231 Mon Sep 17 00:00:00 2001
From cdf1f84a65198df1ac4162f868f35971e5e1a2a1 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 853da5c3fcf..33c1355c8b5 100644
index f604c8a3c35..850a40412d0 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1569,6 +1569,9 @@
@@ -1599,6 +1599,9 @@
# Virtual memory
@ cdecl __wine_locked_recvmsg(long ptr long)
@@ -25,27 +25,27 @@ index 853da5c3fcf..33c1355c8b5 100644
+@ cdecl __wine_create_default_token(long)
+
# Version
@ cdecl wine_get_version() NTDLL_wine_get_version
@ cdecl wine_get_patches() NTDLL_wine_get_patches
@ cdecl wine_get_version()
@ cdecl wine_get_build_id()
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index b62239de5b4..d494dc71263 100644
index 1f27cd100a7..769d6facc9f 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -96,6 +96,9 @@ extern int __wine_main_argc;
extern char **__wine_main_argv;
extern WCHAR **__wine_main_wargv;
@@ -68,6 +68,9 @@ extern void init_locale( HMODULE module ) DECLSPEC_HIDDEN;
extern void init_user_process_params(void) DECLSPEC_HIDDEN;
extern NTSTATUS restart_process( RTL_USER_PROCESS_PARAMETERS *params, NTSTATUS status ) DECLSPEC_HIDDEN;
+/* token */
+extern HANDLE CDECL __wine_create_default_token(BOOL admin);
+
/* server support */
extern timeout_t server_start_time DECLSPEC_HIDDEN;
extern unsigned int server_cpus DECLSPEC_HIDDEN;
extern BOOL is_wow64 DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 6d506c85306..9940e6cf7c9 100644
index 77ba5b371e2..3e91a1fa9c4 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -124,6 +124,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 6d506c85306..9940e6cf7c9 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 efacadac42b..434cd11baf0 100644
index 4d37a0df348..56b52dd2231 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3749,6 +3749,14 @@ struct handle_info
@@ -3581,6 +3581,14 @@ struct handle_info
@END
@@ -215,5 +215,5 @@ index c4f1cd943c2..970ed1838da 100644
+ }
+}
--
2.26.0
2.27.0

View File

@@ -1,4 +1,4 @@
From 6a09d34647aa517e45bc0bb20a92d0d94a1da888 Mon Sep 17 00:00:00 2001
From f058e0e1425aab869a1a7d0db0446944af9bc8d6 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 2f203447e..7c5dd308b 100644
index 6290cbcb4e6..9a8f13901b2 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -3804,6 +3804,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 2f203447e..7c5dd308b 100644
/***********************************************************************
* load_global_options
*/
@@ -4233,6 +4259,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;
@@ -4324,6 +4351,16 @@ void __wine_process_init(void)
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,
@@ -71,14 +71,14 @@ index 2f203447e..7c5dd308b 100644
+ }
+
/* the main exe needs to be the first in the load order list */
RemoveEntryList( &wm->ldr.InLoadOrderModuleList );
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList );
RemoveEntryList( &wm->ldr.InLoadOrderLinks );
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderLinks );
diff --git a/server/process.c b/server/process.c
index 4c7da9223..d6f71a774 100644
index 7875db09801..d7334ffc959 100644
--- a/server/process.c
+++ b/server/process.c
@@ -1107,6 +1107,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 4c7da9223..d6f71a774 100644
DECL_HANDLER(new_process)
{
diff --git a/server/process.h b/server/process.h
index 5b83e111a..dfe5c4e52 100644
index 3944a67d571..3cbf70fda21 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, struct process *parent,
diff --git a/server/protocol.def b/server/protocol.def
index 6022e1715..45ab670ea 100644
index b84d1d10004..65bcb99d486 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3755,6 +3755,13 @@ struct handle_info
@@ -3526,6 +3526,13 @@ struct handle_info
@END
@@ -123,10 +123,10 @@ index 6022e1715..45ab670ea 100644
@REQ(create_completion)
unsigned int access; /* desired access to a port */
diff --git a/server/token.c b/server/token.c
index fcab79955..181219d21 100644
index 970ed1838da..1c1d49989b3 100644
--- a/server/token.c
+++ b/server/token.c
@@ -1806,3 +1806,17 @@ DECL_HANDLER(create_token)
@@ -1804,3 +1804,17 @@ DECL_HANDLER(create_token)
release_object( token );
}
}
@@ -145,5 +145,5 @@ index fcab79955..181219d21 100644
+ }
+}
--
2.24.0
2.27.0

View File

@@ -1,4 +1,4 @@
From 51830c6683b199e79cb9e782ee51555054a4da7c Mon Sep 17 00:00:00 2001
From 9c61f6acfa2c43e43f07fae1a5cd447573b9529b 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
@@ -6,20 +6,20 @@ Subject: [PATCH] server: Implement support for creating processes using a
---
dlls/kernelbase/process.c | 24 +++++++++++++-----------
dlls/ntdll/process.c | 3 ++-
dlls/ntdll/unix/process.c | 1 +
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(-)
8 files changed, 65 insertions(+), 17 deletions(-)
diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c
index a07dddb1f..99985ab89 100644
index a3b168543fc..b5c8b47239d 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
@@ -244,7 +244,7 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename
/***********************************************************************
* create_nt_process
*/
@@ -28,7 +28,7 @@ index a07dddb1f..99985ab89 100644
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
@@ -259,7 +259,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,
@@ -37,7 +37,7 @@ index a07dddb1f..99985ab89 100644
RtlFreeUnicodeString( &nameW );
}
return status;
@@ -267,7 +267,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
@@ -269,7 +269,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
/***********************************************************************
* create_vdm_process
*/
@@ -46,7 +46,7 @@ index a07dddb1f..99985ab89 100644
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
@@ -290,7 +290,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 );
@@ -55,7 +55,7 @@ index a07dddb1f..99985ab89 100644
HeapFree( GetProcessHeap(), 0, newcmdline );
return status;
}
@@ -297,7 +297,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
@@ -299,7 +299,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
/***********************************************************************
* create_cmd_process
*/
@@ -64,7 +64,7 @@ index a07dddb1f..99985ab89 100644
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
@@ -318,7 +318,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 );
@@ -73,7 +73,7 @@ index a07dddb1f..99985ab89 100644
RtlFreeHeap( GetProcessHeap(), 0, newcmdline );
return status;
}
@@ -448,7 +448,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
@@ -450,7 +450,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
TRACE( "app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
@@ -84,7 +84,7 @@ index a07dddb1f..99985ab89 100644
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
@@ -523,7 +525,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
}
}
@@ -93,7 +93,7 @@ index a07dddb1f..99985ab89 100644
switch (status)
{
case STATUS_SUCCESS:
@@ -530,7 +532,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
@@ -532,7 +534,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) );
@@ -102,7 +102,7 @@ index a07dddb1f..99985ab89 100644
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
@@ -540,12 +542,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) );
@@ -117,21 +117,12 @@ index a07dddb1f..99985ab89 100644
}
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;
diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c
index cca6c2747bf..379a0036b63 100644
--- a/dlls/ntdll/unix/process.c
+++ b/dlls/ntdll/unix/process.c
@@ -827,6 +827,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_
req->access = process_access;
req->cpu = pe_info.cpu;
req->info_size = startup_info_size;
+ req->token = wine_server_obj_handle( token );
@@ -139,10 +130,10 @@ index f3d9079f8..2fa553091 100644
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
index 52604ec4d61..047916ffd09 100644
--- a/server/process.c
+++ b/server/process.c
@@ -491,7 +491,7 @@ static void start_sigkill_timer( struct process *process )
@@ -499,7 +499,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,
@@ -151,7 +142,7 @@ index d6f71a774..aa66814d8 100644
{
struct process *process;
@@ -568,7 +568,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
@@ -576,7 +576,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 */
@@ -160,7 +151,7 @@ index d6f71a774..aa66814d8 100644
process->affinity = parent->affinity;
}
if (!process->handles || !process->token) goto error;
@@ -1124,6 +1124,7 @@ DECL_HANDLER(new_process)
@@ -1132,6 +1132,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;
@@ -168,7 +159,7 @@ index d6f71a774..aa66814d8 100644
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)
@@ -1185,10 +1186,39 @@ DECL_HANDLER(new_process)
return;
}
@@ -208,7 +199,7 @@ index d6f71a774..aa66814d8 100644
release_object( parent );
return;
}
@@ -1228,7 +1258,7 @@ DECL_HANDLER(new_process)
@@ -1236,7 +1266,7 @@ DECL_HANDLER(new_process)
#undef FIXUP_LEN
}
@@ -217,7 +208,7 @@ index d6f71a774..aa66814d8 100644
process->startup_info = (struct startup_info *)grab_object( info );
@@ -1289,6 +1319,7 @@ DECL_HANDLER(new_process)
@@ -1297,6 +1327,7 @@ DECL_HANDLER(new_process)
reply->handle = alloc_handle_no_access_check( current->process, process, req->access, objattr->attributes );
done:
@@ -225,7 +216,7 @@ index d6f71a774..aa66814d8 100644
if (process) release_object( process );
release_object( parent );
release_object( info );
@@ -1322,7 +1353,7 @@ DECL_HANDLER(exec_process)
@@ -1330,7 +1361,7 @@ DECL_HANDLER(exec_process)
close( socket_fd );
return;
}
@@ -235,7 +226,7 @@ index d6f71a774..aa66814d8 100644
release_object( process );
}
diff --git a/server/process.h b/server/process.h
index dfe5c4e52..61b83abf6 100644
index dfe5c4e52d8..61b83abf693 100644
--- a/server/process.h
+++ b/server/process.h
@@ -118,7 +118,7 @@ extern unsigned int alloc_ptid( void *ptr );
@@ -248,10 +239,10 @@ index dfe5c4e52..61b83abf6 100644
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
index 901c380b721..8c86967609f 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -791,6 +791,7 @@ struct rawinput_device
@@ -801,6 +801,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 */
@@ -260,7 +251,7 @@ index 45ab670ea..c763da4ca 100644
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
index 4c1f30a5fe7..321bb6cfa81 100644
--- a/server/request.c
+++ b/server/request.c
@@ -582,7 +582,7 @@ static void master_socket_poll_event( struct fd *fd, int event )
@@ -273,7 +264,7 @@ index 200c2697d..f743b720a 100644
create_thread( -1, process, NULL );
release_object( process );
diff --git a/server/security.h b/server/security.h
index 21e90ccf2..32dfe5f8d 100644
index 21e90ccf23f..32dfe5f8db9 100644
--- a/server/security.h
+++ b/server/security.h
@@ -67,6 +67,8 @@ extern const ACL *token_get_default_dacl( struct token *token );
@@ -286,10 +277,10 @@ index 21e90ccf2..32dfe5f8d 100644
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
index 1c1d49989b3..2f466aa1b25 100644
--- a/server/token.c
+++ b/server/token.c
@@ -845,6 +845,12 @@ int token_assign_label( struct token *token, PSID label )
@@ -843,6 +843,12 @@ int token_assign_label( struct token *token, PSID label )
return ret;
}
@@ -302,7 +293,7 @@ index 181219d21..858ec25d7 100644
struct token *token_create_admin( void )
{
struct token *token = NULL;
@@ -1271,6 +1277,11 @@ const SID *token_get_primary_group( struct token *token )
@@ -1269,6 +1275,11 @@ const SID *token_get_primary_group( struct token *token )
return token->primary_group;
}
@@ -315,5 +306,5 @@ index 181219d21..858ec25d7 100644
{
GENERIC_MAPPING mapping;
--
2.24.0
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,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,4 +1,4 @@
From 830d2641a7e23474b3ef4ee52e42e6b4f2cd388b Mon Sep 17 00:00:00 2001
From 2674bbd626b4a9e46e5ab729cb47c81950efefea 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 BCryptSecretAgreement with libgcrypt.
@@ -7,20 +7,20 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
configure.ac | 14 ++
dlls/bcrypt/Makefile.in | 1 +
dlls/bcrypt/bcrypt_internal.h | 13 ++
dlls/bcrypt/bcrypt_main.c | 86 +++++++++--
dlls/bcrypt/bcrypt_internal.h | 6 +
dlls/bcrypt/bcrypt_main.c | 54 ++++++-
dlls/bcrypt/gcrypt.c | 264 ++++++++++++++++++++++++++++++++++
dlls/bcrypt/gnutls.c | 9 ++
dlls/bcrypt/macos.c | 6 +
dlls/bcrypt/tests/bcrypt.c | 2 +-
8 files changed, 384 insertions(+), 11 deletions(-)
8 files changed, 350 insertions(+), 6 deletions(-)
create mode 100644 dlls/bcrypt/gcrypt.c
diff --git a/configure.ac b/configure.ac
index 47d2b750c01..2dfa2ebcb51 100644
index 928f8ebd1b1..f9db147e7d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,7 @@ AC_ARG_WITH(faudio, AS_HELP_STRING([--without-faudio],[do not use FAudio (XAu
@@ -47,6 +47,7 @@ AC_ARG_WITH(faudio, AS_HELP_STRING([--without-faudio],[do not use FAudio (XAu
AC_ARG_WITH(float-abi, AS_HELP_STRING([--with-float-abi=abi],[specify the ABI (soft|softfp|hard) for ARM platforms]))
AC_ARG_WITH(fontconfig,AS_HELP_STRING([--without-fontconfig],[do not use fontconfig]))
AC_ARG_WITH(freetype, AS_HELP_STRING([--without-freetype],[do not use the FreeType library]))
@@ -28,7 +28,7 @@ index 47d2b750c01..2dfa2ebcb51 100644
AC_ARG_WITH(gettext, AS_HELP_STRING([--without-gettext],[do not use gettext]))
AC_ARG_WITH(gettextpo, AS_HELP_STRING([--with-gettextpo],[use the GetTextPO library to rebuild po files]),
[if test "x$withval" = "xno"; then ac_cv_header_gettext_po_h=no; fi])
@@ -1989,6 +1990,19 @@ WINE_NOTICE_WITH(vkd3d,[test "x$ac_cv_lib_soname_vkd3d" = "x"],
@@ -2033,6 +2034,19 @@ WINE_NOTICE_WITH(vkd3d,[test "x$ac_cv_lib_soname_vkd3d" = "x"],
[vkd3d ${notice_platform}development files not found (or too old), Direct3D 12 won't be supported.])
test "x$ac_cv_lib_soname_vkd3d" != "x" || enable_d3d12=${enable_d3d12:-no}
@@ -61,7 +61,7 @@ index dd6d4a76640..ea3486a4002 100644
macos.c \
md2.c \
diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h
index 5cc2c249da8..b16dfbdcd2b 100644
index 43be170d77f..6c93ed78389 100644
--- a/dlls/bcrypt/bcrypt_internal.h
+++ b/dlls/bcrypt/bcrypt_internal.h
@@ -25,6 +25,9 @@
@@ -74,40 +74,28 @@ index 5cc2c249da8..b16dfbdcd2b 100644
#elif HAVE_COMMONCRYPTO_COMMONCRYPTOR_H
#include <AvailabilityMacros.h>
#include <CommonCrypto/CommonCryptor.h>
@@ -157,6 +160,12 @@ struct algorithm
ULONG flags;
};
+struct secret
+{
@@ -243,6 +246,8 @@ struct key
struct secret
{
struct object hdr;
+ UCHAR *data;
+ ULONG len;
+};
+
#if defined(HAVE_GNUTLS_CIPHER_INIT)
struct key_symmetric
{
@@ -251,6 +260,7 @@ NTSTATUS key_destroy( struct key * ) DECLSPEC_HIDDEN;
BOOL key_is_symmetric( struct key * ) DECLSPEC_HIDDEN;
};
NTSTATUS get_alg_property( const struct algorithm *, const WCHAR *, UCHAR *, ULONG, ULONG * ) DECLSPEC_HIDDEN;
@@ -264,6 +269,7 @@ NTSTATUS key_export_dsa_capi( struct key *, UCHAR *, ULONG, ULONG * ) DECLSPEC_H
NTSTATUS key_export_ecc( struct key *, UCHAR *, ULONG, ULONG * ) DECLSPEC_HIDDEN;
NTSTATUS key_import_dsa_capi( struct key *, UCHAR *, ULONG ) DECLSPEC_HIDDEN;
NTSTATUS key_import_ecc( struct key *, UCHAR *, ULONG ) DECLSPEC_HIDDEN;
+NTSTATUS compute_secret_ecc (struct key *pubkey_in, struct key *privkey_in, struct secret *secret) DECLSPEC_HIDDEN;
BOOL is_zero_vector( const UCHAR *, ULONG ) DECLSPEC_HIDDEN;
BOOL is_equal_vector( const UCHAR *, ULONG, const UCHAR *, ULONG ) DECLSPEC_HIDDEN;
@@ -258,4 +268,7 @@ BOOL is_equal_vector( const UCHAR *, ULONG, const UCHAR *, ULONG ) DECLSPEC_HIDD
BOOL gnutls_initialize(void) DECLSPEC_HIDDEN;
void gnutls_uninitialize(void) DECLSPEC_HIDDEN;
+BOOL gcrypt_initialize(void) DECLSPEC_HIDDEN;
+void gcrypt_uninitialize(void) DECLSPEC_HIDDEN;
+
#endif /* __BCRYPT_INTERNAL_H */
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index c2939ea815a..15b934247d8 100644
index bea2001a677..65c28ca63e2 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1349,6 +1349,12 @@ NTSTATUS key_import_ecc( struct key *key, UCHAR *input, ULONG len )
@@ -1421,6 +1421,12 @@ NTSTATUS key_import_ecc( struct key *key, UCHAR *input, ULONG len )
ERR( "support for keys not available at build time\n" );
return STATUS_NOT_IMPLEMENTED;
}
@@ -120,74 +108,60 @@ index c2939ea815a..15b934247d8 100644
#endif
NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HANDLE *handle,
@@ -1714,27 +1720,81 @@ NTSTATUS WINAPI BCryptDeriveKeyPBKDF2( BCRYPT_ALG_HANDLE handle, UCHAR *pwd, ULO
return STATUS_SUCCESS;
}
-NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE handle, BCRYPT_KEY_HANDLE key, BCRYPT_SECRET_HANDLE *secret, ULONG flags)
+NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE hPrivKey, BCRYPT_KEY_HANDLE hPubKey, BCRYPT_SECRET_HANDLE *secret_out, ULONG flags)
{
- FIXME( "%p, %p, %p, %08x\n", handle, key, secret, flags );
+ struct key *privkey = hPrivKey;
+ struct key *pubkey = hPubKey;
+ struct secret *secret;
@@ -1838,8 +1844,9 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H
struct key *privkey = privatekey;
struct key *pubkey = publickey;
struct secret *secret;
+ NTSTATUS status;
- if(secret)
- *secret = (BCRYPT_SECRET_HANDLE *)0xDEADFEED;
+ TRACE( "%p, %p, %p, %08x\n", hPrivKey, hPubKey, secret_out, flags );
- FIXME( "%p, %p, %p, %08x\n", privatekey, publickey, handle, flags );
+ TRACE( "%p, %p, %p, %08x\n", privatekey, publickey, handle, flags );
- return STATUS_SUCCESS;
+ secret = heap_alloc( sizeof(*secret) );
+
+ if ((status = compute_secret_ecc(privkey, pubkey, secret)))
if (!privkey || privkey->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
if (!pubkey || pubkey->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
@@ -1848,7 +1855,16 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H
if (!(secret = heap_alloc_zero( sizeof(*secret) ))) return STATUS_NO_MEMORY;
secret->hdr.magic = MAGIC_SECRET;
- *handle = secret;
+ if ((status = compute_secret_ecc( privkey, pubkey, secret )))
+ {
+ heap_free(secret);
+ *secret_out = NULL;
+ heap_free( secret );
+ *handle = NULL;
+ }
+ else
+ {
+ *secret_out = secret;
+ *handle = secret;
+ }
+
+ return status;
}
-NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE secret)
+NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE hSecret)
{
- FIXME( "%p\n", secret );
+ struct secret *secret = hSecret;
+
+ TRACE( "%p\n", hSecret );
+
+ if (!hSecret)
+ {
+ return STATUS_INVALID_HANDLE;
+ }
+
+ heap_free(secret->data);
+ heap_free(secret);
+
return STATUS_SUCCESS;
}
-NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE secret, LPCWSTR kdf, BCryptBufferDesc *parameter,
+NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE hSecret, LPCWSTR deriv_func, BCryptBufferDesc *parameter,
PUCHAR derived, ULONG derived_size, ULONG *result, ULONG flags)
@@ -1856,10 +1872,11 @@ NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE handle)
{
struct secret *secret = handle;
- FIXME( "%p\n", handle );
+ TRACE( "%p\n", handle );
if (!secret || secret->hdr.magic != MAGIC_SECRET) return STATUS_INVALID_HANDLE;
secret->hdr.magic = 0;
+ heap_free( secret->data );
heap_free( secret );
return STATUS_SUCCESS;
}
@@ -1869,12 +1886,33 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE handle, LPCWSTR kdf, BCrypt
{
struct secret *secret = handle;
- FIXME( "%p, %s, %p, %p, %d, %p, %08x\n", secret, debugstr_w(kdf), parameter, derived, derived_size, result, flags );
+ TRACE( "%p, %s, %p, %p, %d, %p, %08x\n", secret, debugstr_w(kdf), parameter, derived, derived_size, result, flags );
if (!secret || secret->hdr.magic != MAGIC_SECRET) return STATUS_INVALID_HANDLE;
if (!kdf) return STATUS_INVALID_PARAMETER;
- return STATUS_INTERNAL_ERROR;
+ struct secret *secret = hSecret;
+
+ TRACE( "%p, %s, %p, %p, %d, %p, %08x\n", secret, debugstr_w(deriv_func), parameter, derived, derived_size, result, flags );
+
+ if (!hSecret)
+ {
+ return STATUS_INVALID_HANDLE;
+ }
+
+ if (!(strcmpW(deriv_func, BCRYPT_KDF_RAW_SECRET)))
+ if (!(strcmpW( kdf, BCRYPT_KDF_RAW_SECRET )))
+ {
+ ULONG n;
+ ULONG secret_length = secret->len;
@@ -207,12 +181,12 @@ index c2939ea815a..15b934247d8 100644
+ *result = n;
+ return STATUS_SUCCESS;
+ }
+ FIXME( "Derivation function %s not supported.\n", debugstr_w(deriv_func) );
+ FIXME( "Derivation function %s not supported.\n", debugstr_w(kdf) );
+ return STATUS_NOT_IMPLEMENTED;
}
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
@@ -1746,6 +1806,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
@@ -1886,6 +1924,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
DisableThreadLibraryCalls( hinst );
#ifdef HAVE_GNUTLS_CIPHER_INIT
gnutls_initialize();
@@ -222,7 +196,7 @@ index c2939ea815a..15b934247d8 100644
#endif
break;
@@ -1753,6 +1816,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
@@ -1893,6 +1934,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
if (reserved) break;
#ifdef HAVE_GNUTLS_CIPHER_INIT
gnutls_uninitialize();
@@ -234,7 +208,7 @@ index c2939ea815a..15b934247d8 100644
}
diff --git a/dlls/bcrypt/gcrypt.c b/dlls/bcrypt/gcrypt.c
new file mode 100644
index 00000000000..d7ed6eeddf3
index 00000000000..f882d61def8
--- /dev/null
+++ b/dlls/bcrypt/gcrypt.c
@@ -0,0 +1,264 @@
@@ -503,10 +477,10 @@ index 00000000000..d7ed6eeddf3
+}
+#endif
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index 1d78b9f4d1f..59c98eed0cc 100644
index 19a00e2ee25..1e075fe9994 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -1297,4 +1297,13 @@ NTSTATUS key_destroy( struct key *key )
@@ -1585,4 +1585,13 @@ NTSTATUS key_destroy( struct key *key )
heap_free( key );
return STATUS_SUCCESS;
}
@@ -521,10 +495,10 @@ index 1d78b9f4d1f..59c98eed0cc 100644
+
#endif
diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c
index 9ff9772c15a..4851603819c 100644
index 7f902535b8f..6c2a41a0725 100644
--- a/dlls/bcrypt/macos.c
+++ b/dlls/bcrypt/macos.c
@@ -268,4 +268,10 @@ NTSTATUS key_destroy( struct key *key )
@@ -279,4 +279,10 @@ NTSTATUS key_destroy( struct key *key )
heap_free( key );
return STATUS_SUCCESS;
}
@@ -536,10 +510,10 @@ index 9ff9772c15a..4851603819c 100644
+}
#endif
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index f7404057fa8..d9509f2c49b 100644
index eb7a72e0ff4..a351aacf1f5 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -2067,7 +2067,7 @@ static void test_ECDH(void)
@@ -2068,7 +2068,7 @@ static void test_ECDH(void)
goto raw_secret_end;
}
@@ -549,5 +523,5 @@ index f7404057fa8..d9509f2c49b 100644
if (status != STATUS_SUCCESS)
{
--
2.17.1
2.27.0

View File

@@ -1,4 +1,4 @@
From d0c4ac467f5e85e29ae407b29b6a93c85f375fd3 Mon Sep 17 00:00:00 2001
From d232882c571a14f4da8a134071a2125805ebd41f 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/bcrypt_main.c | 108 ++++++++++++++++++++++++++++++++++++-
dlls/bcrypt/tests/bcrypt.c | 2 +-
2 files changed, 111 insertions(+), 1 deletion(-)
2 files changed, 108 insertions(+), 2 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 15b934247d..57d552a4c0 100644
index 65c28ca63e2..6e7b52e93b0 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;
}
@@ -1891,7 +1891,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 (!(strcmpW( kdf, BCRYPT_KDF_RAW_SECRET )))
+ if (flags) FIXME("flags ignored: %08x\n", flags);
+
+ if (!(strcmpW(deriv_func, BCRYPT_KDF_HASH)))
+ if (!(strcmpW( kdf, BCRYPT_KDF_HASH )))
+ {
+ unsigned int i;
+ BCryptBuffer *hash_algorithm = NULL;
@@ -127,15 +125,15 @@ index 15b934247d..57d552a4c0 100644
+
+ return STATUS_SUCCESS;
+ }
+ else
if (!(strcmpW(deriv_func, BCRYPT_KDF_RAW_SECRET)))
+ else if (!(strcmpW( 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 a351aacf1f5..5333b879817 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -2084,7 +2084,7 @@ static void test_ECDH(void)
@@ -2085,7 +2085,7 @@ static void test_ECDH(void)
raw_secret_end:
status = pBCryptDeriveKey(secret, BCRYPT_KDF_HASH, &hash_params, NULL, 0, &size, 0);
@@ -145,5 +143,5 @@ index d9509f2c49..edc59a8a97 100644
if (status != STATUS_SUCCESS)
{
--
2.24.1
2.27.0

View File

@@ -1,27 +1,26 @@
From ddc5f6fd9dde7a5cdde0be59d4a9db9e086400a9 Mon Sep 17 00:00:00 2001
From 3497a2faa4ebab67b65bcf99d4ed56baa70ddf96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 12 Jul 2014 23:58:19 +0200
Subject: comctl32: Preserve custom colors between subitems. (v2)
Subject: [PATCH] comctl32: Preserve custom colors between subitems. (v2)
---
dlls/comctl32/listview.c | 20 +++++++++-----------
dlls/comctl32/tests/listview.c | 23 ++++++++++++++++++++---
2 files changed, 29 insertions(+), 14 deletions(-)
dlls/comctl32/listview.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 56e2563..a35f5f2 100644
index dba16d13a4c..35cab333b7b 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -1072,7 +1072,7 @@ static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRA
COLORREF backcolor, textcolor;
@@ -1063,7 +1063,7 @@ static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, const NMLVCUS
textcolor = cd->clrText;
/* apparently, for selected items, we have to override the returned values */
- if (!SubItem)
+ if (!SubItem || (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT))
{
if (lpnmlvcd->nmcd.uItemState & CDIS_SELECTED)
if (cd->nmcd.uItemState & CDIS_SELECTED)
{
@@ -4784,6 +4784,7 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
@@ -4786,6 +4786,7 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
while (iterator_next(subitems))
{
DWORD subitemstage = CDRF_DODEFAULT;
@@ -29,15 +28,9 @@ index 56e2563..a35f5f2 100644
/* We need to query for each subitem, item's data (subitem == 0) is already here at this point */
if (subitems->nItem)
@@ -4810,19 +4811,16 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
@@ -4813,13 +4814,15 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
if (cdsubitemmode & CDRF_NOTIFYSUBITEMDRAW)
subitemstage = notify_customdraw(infoPtr, CDDS_SUBITEM | CDDS_ITEMPREPAINT, &nmlvcd);
- else
- {
- nmlvcd.clrTextBk = infoPtr->clrTextBk;
- nmlvcd.clrText = infoPtr->clrText;
- }
- if (subitems->nItem == 0 || (cdmode & CDRF_NOTIFYITEMDRAW))
- prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE);
@@ -57,5 +50,5 @@ index 56e2563..a35f5f2 100644
if (subitemstage & CDRF_NOTIFYPOSTPAINT)
subitemstage = notify_customdraw(infoPtr, CDDS_SUBITEM | CDDS_ITEMPOSTPAINT, &nmlvcd);
--
2.9.0
2.27.0

View File

@@ -1,4 +1,4 @@
From 8a5768bc4dc64dd9a0df5d7b781a569622b8c9b6 Mon Sep 17 00:00:00 2001
From 38d4fa059ffd4ecba4e7d04e2a5edd2bcff3c7df Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 27 Aug 2014 00:31:23 +0200
Subject: [PATCH] configure: Also add the absolute RPATH when linking against
@@ -9,11 +9,11 @@ Subject: [PATCH] configure: Also add the absolute RPATH when linking against
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index e6acb786a4d..bd3fe968839 100644
index c88013910af..a7f1866bf0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -956,10 +956,10 @@ case $host_os in
WINEPRELOADER_LDFLAGS="-static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000"
@@ -969,10 +969,10 @@ case $host_os in
WINEPRELOADER_LDFLAGS="-static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7d400000"
WINE_TRY_CFLAGS([-Wl,--rpath,\$ORIGIN/../lib],
- [LDRPATH_INSTALL="-Wl,--rpath,\\\$\$ORIGIN/\`\$(MAKEDEP) -R \${bindir} \${libdir}\`"
@@ -26,5 +26,5 @@ index e6acb786a4d..bd3fe968839 100644
WINE_TRY_CFLAGS([-Wl,--enable-new-dtags],
--
2.20.1
2.27.0

View File

@@ -1,4 +1,4 @@
From c01cbb5811cb9de58a0c3fa7822382f45900b435 Mon Sep 17 00:00:00 2001
From 929513c89e71d0675dd2c80a29ddf94f2c331dd8 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Fri, 27 Sep 2019 16:26:04 +0300
Subject: [PATCH] d3d11/tests: Add a basic test for drawing with deferred
@@ -9,10 +9,10 @@ Subject: [PATCH] d3d11/tests: Add a basic test for drawing with deferred
1 file changed, 81 insertions(+), 19 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 7f11a59d0cb..c63bae8bbab 100644
index 214b9b164988..26c9f8555ff6 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -1692,10 +1692,11 @@ static void release_test_context_(unsigned int line, struct d3d11_test_context *
@@ -1691,10 +1691,11 @@ static void release_test_context_(unsigned int line, struct d3d11_test_context *
ok_(__FILE__, line)(!ref, "Device has %u references left.\n", ref);
}
@@ -27,7 +27,7 @@ index 7f11a59d0cb..c63bae8bbab 100644
{
static const D3D11_INPUT_ELEMENT_DESC default_layout_desc[] =
{
@@ -1764,14 +1765,14 @@ static void draw_quad_vs_(unsigned int line, struct d3d11_test_context *context,
@@ -1763,14 +1764,14 @@ static void draw_quad_vs_(unsigned int line, struct d3d11_test_context *context,
if (!context->vb)
context->vb = create_buffer(device, D3D11_BIND_VERTEX_BUFFER, sizeof(quad), quad);
@@ -47,7 +47,7 @@ index 7f11a59d0cb..c63bae8bbab 100644
}
#define draw_quad_z(context, z) draw_quad_z_(__LINE__, context, z)
@@ -1807,19 +1808,27 @@ static void draw_quad_z_(unsigned int line, struct d3d11_test_context *context,
@@ -1806,19 +1807,27 @@ static void draw_quad_z_(unsigned int line, struct d3d11_test_context *context,
(ID3D11Resource *)context->vs_cb, 0, NULL, &data, 0, 0);
ID3D11DeviceContext_VSSetConstantBuffers(context->immediate_context, 0, 1, &context->vs_cb);
@@ -81,7 +81,7 @@ index 7f11a59d0cb..c63bae8bbab 100644
{
static const DWORD ps_color_code[] =
{
@@ -1856,12 +1865,12 @@ static void draw_color_quad_(unsigned int line, struct d3d11_test_context *conte
@@ -1855,12 +1864,12 @@ static void draw_color_quad_(unsigned int line, struct d3d11_test_context *conte
if (!context->ps_cb)
context->ps_cb = create_buffer(device, D3D11_BIND_CONSTANT_BUFFER, sizeof(*color), NULL);
@@ -98,7 +98,7 @@ index 7f11a59d0cb..c63bae8bbab 100644
}
static void test_create_device(void)
@@ -2088,6 +2097,59 @@ static void test_create_device(void)
@@ -2087,6 +2096,59 @@ static void test_create_device(void)
DestroyWindow(window);
}
@@ -158,19 +158,19 @@ index 7f11a59d0cb..c63bae8bbab 100644
static void test_device_interfaces(const D3D_FEATURE_LEVEL feature_level)
{
struct device_desc device_desc;
@@ -29639,11 +29701,11 @@ START_TEST(d3d11)
@@ -30114,11 +30176,11 @@ START_TEST(d3d11)
}
print_adapter_info();
-
queue_test(test_create_device);
queue_for_each_feature_level(test_device_interfaces);
queue_test(test_get_immediate_context);
queue_test(test_immediate_context);
queue_test(test_create_deferred_context);
+ queue_test(test_draw_deferred_context);
queue_test(test_create_texture1d);
queue_test(test_texture1d_interfaces);
queue_test(test_create_texture2d);
--
2.17.1
2.26.2

View File

@@ -0,0 +1,44 @@
From 2537d783b525e7ec2239b87b17916d15e0130add Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 1 Jun 2020 16:34:54 +1000
Subject: [PATCH] d3d11: Implement ID3D11Device2 GetImmediateContext1
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=41636
---
dlls/d3d11/device.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index a649be2f8ea..28100c2f9db 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -7174,9 +7174,24 @@ static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext1(ID3D11Device2 *i
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext1(ID3D11Device2 *iface, UINT flags,
ID3D11DeviceContext1 **context)
{
- FIXME("iface %p, flags %#x, context %p stub!\n", iface, flags, context);
+ struct d3d11_deferred_context *object;
- return E_NOTIMPL;
+ TRACE("iface %p, flags %#x, context %p.\n", iface, flags, context);
+
+ if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
+ return E_OUTOFMEMORY;
+
+ object->ID3D11DeviceContext1_iface.lpVtbl = &d3d11_deferred_context_vtbl;
+ object->device = (ID3D11Device *)iface;
+ object->refcount = 1;
+
+ list_init(&object->commands);
+
+ ID3D11Device2_AddRef(iface);
+ wined3d_private_store_init(&object->private_store);
+
+ return ID3D11DeviceContext1_QueryInterface(&object->ID3D11DeviceContext1_iface,
+ &IID_ID3D11DeviceContext, (void**)context);
}
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateBlendState1(ID3D11Device2 *iface,
--
2.26.2

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