Compare commits

...

157 Commits
v2.3 ... v2.9

Author SHA1 Message Date
Sebastian Lackner
907f73aa4b Release 2.9. 2017-05-29 15:54:33 +02:00
Sebastian Lackner
76c2635a7a user32-Mouse_Message_Hwnd: Add back a missing return statement (thanks Dmitry). 2017-05-29 12:25:31 +02:00
Sebastian Lackner
5d31795ffc Added patch to implement support for layered window regions. 2017-05-29 08:46:07 +02:00
Sebastian Lackner
5cc0023094 wine.inf-Performance: Add 'Counters' to the perflib key as an alias for 'Counter'. 2017-05-29 03:40:40 +02:00
Sebastian Lackner
6e372d0550 Added patch to handle /dontskip parameter in dxdiag. 2017-05-29 01:12:35 +02:00
Sebastian Lackner
4d5cc8b76f Added patch to check for 'Brian Paul' to detect Mesa gl_vendor. 2017-05-28 23:34:20 +02:00
Sebastian Lackner
d7d4fde17e winebuild-Fake_Dlls: Do not use get_alignment for .balign instructions.
Spotted by Michael MĂĽller.
2017-05-28 21:52:48 +02:00
Sebastian Lackner
033c4b149f ntdll-NtQueryVirtualMemory: Skip get_dll_info wineserver call if address does not have VPROT_IMAGE permissions. 2017-05-28 16:16:15 +02:00
Sebastian Lackner
f957d2a812 Added patches to silence two noisy d3d11 FIXMEs. 2017-05-28 15:56:46 +02:00
Sebastian Lackner
7e80ff15e2 wined3d-QUERY_Stubs: Update patchset and add implementation for WINED3D_QUERY_TYPE_PIPELINE_STATISTICS. 2017-05-28 15:56:45 +02:00
Sebastian Lackner
43973275f2 ntdll-NtQueryVirtualMemory: Update patchset and return proper Nt paths. 2017-05-28 15:55:40 +02:00
Sebastian Lackner
70d09b1977 Added patch to implement opening files through nt device paths. 2017-05-27 18:47:06 +02:00
Sebastian Lackner
527b456839 ntoskrnl-Stubs: Remove some invalid Fixes lines. 2017-05-27 18:20:53 +02:00
Sebastian Lackner
cf4e195b49 Added patch to implement ntoskrnl.ExInterlockedPopEntrySList. 2017-05-27 18:02:35 +02:00
Sebastian Lackner
b7f1c682f3 Added patch to fix crash when a device driver segfaults during an open file request. 2017-05-27 17:46:03 +02:00
Sebastian Lackner
1a5a9b3087 gdi32-MultiMonitor: Update patchset and return more reasonable display DeviceID. 2017-05-27 04:23:12 +02:00
Sebastian Lackner
e5fb1dda8d Added patch to pass correct index to shader_glsl_ffp_vertex_lighting_footer. 2017-05-27 03:25:08 +02:00
Sebastian Lackner
27d1ed8f59 winebuild-Fake_Dlls: Use .balign instead of .fill.
Also remove the ntdll-Interrupt-0x2e dependency, which is no longer necessary.
2017-05-26 10:07:56 +02:00
Sebastian Lackner
857e9c1cd4 Rebase against 799230c78ab102fa0034cb4477ce1be78c456a87. 2017-05-26 04:26:33 +02:00
Sebastian Lackner
0a60add605 winebuild-Fake_Dlls: Merge several further improvements. 2017-05-25 21:59:41 +02:00
Sebastian Lackner
d36701371e Added patch with stub for ntdll.NtContinue. 2017-05-25 05:57:44 +02:00
Sebastian Lackner
b2904214bb winebuild-Fake_Dlls: Added patch to fix relocation information in fake dlls. 2017-05-25 05:52:41 +02:00
Michael MĂĽller
871cee39d0 winebuild-Fake_Dlls: Fill alignment with zero bytes. 2017-05-25 05:52:41 +02:00
Sebastian Lackner
0c46d1e8a2 Rebase against 8967e87c8a890aed7a81051c2d372f065e825bb2. 2017-05-25 03:05:27 +02:00
Sebastian Lackner
91f6a8ad80 Rebase against ef267f115f76a3041e0da4a0f0dbd7ffb4a022e1. 2017-05-25 01:24:35 +02:00
Sebastian Lackner
8b1d3d07ab Rebase against b8a8e1bde9382897927945ec0b58b8a2fcfcfe59. 2017-05-24 23:55:00 +02:00
Sebastian Lackner
2ca6aebfaa Rebase against 3f01ab4c39ffa50e26916a5f33d82dec1a2e42dc. 2017-05-20 00:45:45 +02:00
Sebastian Lackner
81571a4cb5 Rebase against 53bf72e266532f2f0533a0dfd7e90a25d7b6d901. 2017-05-19 22:31:19 +02:00
Sebastian Lackner
51dc575ef3 Rebase against 9baceabb88e2aeb90a32bb5f6923107904ed58ea. 2017-05-18 05:32:56 +02:00
Sebastian Lackner
73573b1dff kernel32-MoveFile: Fix a regression when copying addon to cache directory. 2017-05-17 16:45:13 +02:00
Sebastian Lackner
142cc2eda5 Rebase against 66c7b37a9819195d40f5ab053268548c4370fb06. 2017-05-17 01:00:41 +02:00
Sebastian Lackner
ebabcd69b5 Rebase against be12c5bc4f189901541fdca41da267f8a0ef873d. 2017-05-16 23:01:26 +02:00
Sebastian Lackner
20d1f21514 Release 2.8. 2017-05-16 14:17:16 +02:00
Sebastian Lackner
7ad2ee4c60 winebuild-Fake_Dlls: Avoid conflict with 16-bit code. 2017-05-16 04:52:55 +02:00
Sebastian Lackner
d00088e0fa winebuild-Fake_Dlls: Try to fix build failure on OSX. 2017-05-16 03:25:43 +02:00
Sebastian Lackner
633cceca94 user32-GetAutoRotationState: Remove definition file. 2017-05-16 01:31:39 +02:00
Sebastian Lackner
46006c692a Rename windowscodecs-Metadata -> windowscodecs-MetadataQueryParser. 2017-05-16 00:26:55 +02:00
Sebastian Lackner
d56994dbfa Added patches with multiple improvements for propsys functions. 2017-05-16 00:22:58 +02:00
Sebastian Lackner
5e70613512 Added patch to implement a basic security property tab. 2017-05-15 22:51:33 +02:00
Sebastian Lackner
6a14f80fdc Added patch with various improvements for fake dlls. 2017-05-15 21:07:42 +02:00
Sebastian Lackner
5d38a0fed0 ntdll-User_Shared_Data: Fix test failures on WinXP. 2017-05-14 00:48:30 +02:00
Sebastian Lackner
8748402001 Rebase against 4eaaf06ce4e5d7424eec2cf303c8256610544b39. 2017-05-13 01:14:10 +02:00
Sebastian Lackner
171d05fffe wined3d-CSMT_Main: Get rid of unnecessary wait. 2017-05-12 03:47:26 +02:00
Sebastian Lackner
975205155e Rebase against b77688102a84e1c7b7278340c46f53db3e1cda00. 2017-05-12 00:36:30 +02:00
Sebastian Lackner
d6c145fbf5 server-Debug_Registers: Remove bug reference.
The issue is mentioned in bug 32515, but Steam cache
validation still fails with this patch applied.
2017-05-11 03:36:48 +02:00
Sebastian Lackner
3207980517 Rebase against 0647abc5071913506e681bfc5239f9a6078dca54. 2017-05-11 01:46:17 +02:00
Sebastian Lackner
1bbe50aae8 Rebase against 8ef79b023a06f00ca6ab37afb8089d358b277d73. 2017-05-10 03:29:09 +02:00
Sebastian Lackner
bb180d38cc d3d11-Deferred_Context: Merge two patches. 2017-05-09 19:55:51 +02:00
Sebastian Lackner
c542f2432d Rebase against b6a4b2f593503a105dde01e7bd11ffdde243117a. 2017-05-09 05:33:36 +02:00
Sebastian Lackner
a36a97233a wined3d-CSMT_Main: Merge two patches. 2017-05-08 13:07:44 +02:00
Sebastian Lackner
f8e955a95a ntdll-User_Shared_Data: Add a missing CDECL. 2017-05-06 20:14:20 +02:00
Sebastian Lackner
d966bece72 Added patch to implement some additional windowscodecs metadata functions. 2017-05-06 17:04:02 +02:00
Sebastian Lackner
1447b56eeb Added patch to reset debug registers when creating threads. 2017-05-06 02:13:58 +02:00
Sebastian Lackner
afe018692b Added patch to fix some test failures in d3dx9_36/math tests. 2017-05-06 02:08:18 +02:00
Sebastian Lackner
52b5c90303 Rebase against 9f55292085392579568ff81b8adb926b32a8d99a. 2017-05-06 02:06:45 +02:00
Sebastian Lackner
4a4ebec642 dxva2-Video_Decoder: Remove dependency on winecfg-Staging patchset. 2017-05-05 20:34:33 +02:00
Sebastian Lackner
35ea3890a7 Add a separate script to plot patchset dependency graph. 2017-05-05 20:33:54 +02:00
Sebastian Lackner
26438ad74c Added patch to update user_shared_data timers. 2017-05-05 13:37:34 +02:00
Sebastian Lackner
31212d2845 Rebase against 10db51d5c26f0a71956989ecff83da90f4d94fda. 2017-05-05 02:26:52 +02:00
Sebastian Lackner
a08b6b2b62 Added patch for initial implementation of advapi32.BuildSecurityDescriptorW. 2017-05-05 00:25:14 +02:00
Sebastian Lackner
9985fe9035 Added patch to implement TokenIntegrityLevel stub in NtSetInformationToken. 2017-05-04 21:31:38 +02:00
Sebastian Lackner
3aa965e97f Added patch to implement TokenLogonSid stub in NtQueryInformationToken. 2017-05-04 21:27:41 +02:00
Sebastian Lackner
2e479e0954 Added patch to implement semi-stub for ntdll.NtCreateThreadEx. 2017-05-04 21:24:17 +02:00
Sebastian Lackner
9fe12a2175 Added patch to avoid crash if context_reacquire is called with NULL context. 2017-05-04 02:56:03 +02:00
Sebastian Lackner
d7c0a975ea Rebase against 8753a1b271795d2f977b41a814de7e4ace780d2e. 2017-05-04 02:13:14 +02:00
Sebastian Lackner
eb4a245bbb Rebase against b1203af6ba44ff8858ee9ca50fc05f4f3f633892. 2017-05-03 05:45:47 +02:00
Sebastian Lackner
5282f297be bcrypt-Improvements: Fix BCryptEncrypt with AES_GCM and no input and no output. 2017-05-02 18:36:51 +02:00
Sebastian Lackner
1446da2c50 fonts-Tahoma: Regenerate tahoma.ttf with ancient fontconfig.
To keep the changes small and to ensure the resulting TTF file
is better compatible with Windows.
2017-05-02 18:36:25 +02:00
Sebastian Lackner
2db34eca39 Rebase against 7cd7f14696dc3fb7aa41ef253ad144d458304a28. 2017-05-02 12:57:50 +02:00
Sebastian Lackner
d80c4a83fd Release 2.7. 2017-05-02 04:51:49 +02:00
Sebastian Lackner
0c62a31ae7 Added patch for U+FB01 and U+FB02 glyphs in Tahoma font. 2017-05-02 03:19:58 +02:00
Sebastian Lackner
6acc999e64 windowscodecs-TIFF_Support: Fix pixel format descriptors. 2017-05-02 02:22:42 +02:00
Sebastian Lackner
e0ec571af4 dmusic-SynthPort_IKsControl: Remote a Fixes line. 2017-05-02 01:27:48 +02:00
Sebastian Lackner
2c4db4ada1 Added patch to fix Param2 in SPFILENOTIFY_FILEINCABINET handler. 2017-05-02 01:26:37 +02:00
Sebastian Lackner
46bcbf913f Added patch to fix test failure in dmloader tests. 2017-05-01 19:50:27 +02:00
Sebastian Lackner
1d7d9cf626 kernel32-Locale_Definitions: Disable patchset which causes a test failure. 2017-05-01 18:34:32 +02:00
Sebastian Lackner
4e8721c714 ntdll-ProcessImageFileNameWin32: Fix test failures. 2017-05-01 18:20:51 +02:00
Sebastian Lackner
affad837a0 Rebase against 07cf14dc928a1a00baecbbc7ca5a6f3fe680238c. 2017-04-28 23:28:40 +02:00
Sebastian Lackner
c00520d3f8 Added patch to fix handling of ShowWindow when window is already visible. 2017-04-28 15:30:12 +02:00
Sebastian Lackner
bf3ff21ed7 Rebase against ae600c0b2c5b63d0c32a19f44629c204d1a0fc51. 2017-04-28 04:10:08 +02:00
Sebastian Lackner
18b192b7bd kernel32-Named_Pipe: Comment Fixes lines. 2017-04-27 01:26:18 +02:00
Sebastian Lackner
d3c3d2ab96 Rebase against 6f99cf01e1b88c9bb09fe6b9bff3443514db5ae2. 2017-04-27 01:22:20 +02:00
Sebastian Lackner
229bb38973 Rebase against 89ef7b59f548a76960b2278d819a8f915c81e132. 2017-04-26 04:01:25 +02:00
Sebastian Lackner
af6b4ace35 Rebase against e49feb63f489141c08a967a9c47930559e1de4f7. 2017-04-25 03:08:33 +02:00
Sebastian Lackner
e3e7950f4f kernel32-SetFileInformationByHandle: Remove patch with unnecessary include file change. 2017-04-24 16:50:23 +02:00
Sebastian Lackner
b6c2991af1 iexplore-Revert_ProductVersion: Remove deprecated patchset. 2017-04-24 16:31:33 +02:00
Sebastian Lackner
447795d20e wined3d-Revert_Pixel_Center_Offset: Remove deprecated patchset. 2017-04-24 02:27:04 +02:00
Sebastian Lackner
8fd38e80cd ntdll-Virtual_Memory_Stack: Delete disabled patchset. 2017-04-24 00:37:49 +02:00
Sebastian Lackner
7492968519 ntdll-Syscall_Wrappers: Delete disabled patchset. 2017-04-24 00:36:03 +02:00
Sebastian Lackner
c0304d7976 Exagear: Delete disabled patchset. 2017-04-24 00:18:25 +02:00
Sebastian Lackner
075da187c7 Rebase against cced5dfbde8b685022dd74e666f8ad4ea8473453. 2017-04-22 14:57:30 +02:00
Sebastian Lackner
89777bdb23 Rebase against 6c7760f2175e241b330cde0a902c96d9007922e0. 2017-04-21 13:20:03 +02:00
Sebastian Lackner
bd070a400c Rebase against f7402accc40b66140be4d27c5ad1b2fee8532dfc. 2017-04-20 02:16:00 +02:00
Sebastian Lackner
a65b6fa780 Release 2.6. 2017-04-19 10:54:39 +02:00
Sebastian Lackner
92bc06bd9e winecfg-Unmounted_Devices: Fix another compile issue on OSX. 2017-04-19 04:48:29 +02:00
Sebastian Lackner
2b4120187b Compiler_Warnings: Fix compililation error on OSX. 2017-04-19 04:04:24 +02:00
Sebastian Lackner
5dcd52a67f wined3d-CSMT_Main: Reenable patchset. 2017-04-19 01:34:24 +02:00
Sebastian Lackner
10837badd4 wined3d-Accounting: Do not use context on the main thread. 2017-04-17 00:43:21 +02:00
Sebastian Lackner
c9b2336f64 Added patch to implement support for recent OSMesa versions. 2017-04-16 19:19:34 +02:00
Sebastian Lackner
a06d982751 winecfg-Unmounted_Devices: Avoid access violation when autodetecting devices in winecfg. 2017-04-16 17:54:19 +02:00
Sebastian Lackner
e963b417b3 Added patches to fix error handling issues in wined3d. 2017-04-14 17:46:52 +02:00
Sebastian Lackner
079da46f96 Added patch to fix compilation with recent versions of gcc. 2017-04-14 16:02:12 +02:00
Sebastian Lackner
3003efacdb Rebase against 709935314458bd0ce27aab3986ae98cc556cb663. 2017-04-14 15:28:19 +02:00
Sebastian Lackner
14acf51a2d Rebase against aa1580398e4c9eda851d475213e07d865d9238bd. 2017-04-13 11:52:28 +02:00
Sebastian Lackner
830a8b9975 Rebase against d6557e812984e010a989a3360039453eb978bd12. 2017-04-13 11:06:17 +02:00
Sebastian Lackner
4a75337774 Rebase against 9e35dd15454be28c487b0f1bebefbbe530b2aca4. 2017-04-12 09:52:27 +02:00
Sebastian Lackner
b113596b6c Rebase against 692656467729c5548c45244aa05ca946620afa72. 2017-04-12 07:03:43 +02:00
Sebastian Lackner
e5d2247213 Rebase against 61a1a266faa9fa7c959136b0ab0b5d7e01326878. 2017-04-11 05:15:20 +02:00
Sebastian Lackner
fbc61357d3 Rebase against 0128e1a18f25848e6f47146580a8f0db69687dd6. 2017-04-10 22:39:05 +02:00
Sebastian Lackner
d06996cabd Rebase against 35ca862025fa14065d4ebed761783de225cb6690. 2017-04-10 18:41:57 +02:00
Sebastian Lackner
e4ac3ea735 Rebase against 8b1737c0fdf1d3d905bea281d9241f1f48f333e9. 2017-04-10 07:36:39 +02:00
Sebastian Lackner
25bd49ecb6 Release 2.5. 2017-04-09 19:53:42 +02:00
Sebastian Lackner
7a2c0d03d7 Added patch for dummy apiset in PEB struct. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
c081ded2be Added patch to add missing initialization in create_glyphrunanalysis. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
c372796653 kernel32-SetFileCompletionNotificationModes: Update patchset for server-side named pipes. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
8568fe0a24 oleaut32-OleLoadPicture: Update patchset and fix a regression. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
6897c8b67b Added patch to implement and use hash links when looking up LDR module. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
0844f36738 Added patch to implement stub for ntdll.RtlGetUnloadEventTraceEx. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
b9a9f51c59 Added patch to implement NtSuspendProcess and NtResumeProcess. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
2dd39323aa Added patch to implement more stub classes in NtQueryInformationJobObject. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
4f7c521e11 Added patch to implement FileNameInformation in NtQueryInformationFile for named pipes. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
a16c4ffd33 Added patch to return failure when handling http redirect without hostname. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
35d020002f README.md: Update link to installation instructions. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
a781d341a5 Rebase against 64e4a03a92498abea428dc567372f3996fa9dc3a. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
3a8de0f3f4 Rebase against 63bcfa3354edd910ee52b8134af191f7a774b701. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
e2750d967a Rebase against 42ed54b5d8e67aeb647d5a4fc8af7c8962285c7f. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
a127f84245 patchupdate.py: Add support to exclude individual files. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
e3753add9b Rebase against ec8485ec10e3c27b89ec5f1289bc8a3cdad5f3f6. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
55ab42ece0 Rebase against 5b4f8a385b46a8a8a8b09b8ca6578aa7b7995a1e. 2017-04-09 16:14:41 +02:00
Sebastian Lackner
4232441093 Release 2.4. 2017-03-21 02:14:59 +01:00
Sebastian Lackner
912df91ba1 windowscodecs-TIFF_Support: Fix order of pixel formats in gdiplus. 2017-03-20 19:09:27 +01:00
Sebastian Lackner
12f8688fc5 Added patch to improve performance of bilinear bitmap scaling. 2017-03-20 18:01:06 +01:00
Sebastian Lackner
3e2e449d4e Added patch to treat lpResults as optional in gdi32.GetCharacterPlacement. 2017-03-20 17:40:32 +01:00
Sebastian Lackner
3f05773e20 Added patch to fill process virtual memory counters in NtQuerySystemInformation. 2017-03-20 17:34:45 +01:00
Sebastian Lackner
a47000e41c Added patch with multiple fixes for owner-drawn and sorted listbox. 2017-03-20 16:49:38 +01:00
Sebastian Lackner
e92999d7d5 Added patch to add Vendor field in Win32_ComputerSystemProduct. 2017-03-20 05:54:30 +01:00
Sebastian Lackner
687f25d6bb ntdll-Interrupt-0x2e: Add reference to bug report. 2017-03-19 23:06:32 +01:00
Sebastian Lackner
8ef379ecc8 Added patch to implement querying for object types and their indices. 2017-03-19 22:27:07 +01:00
Sebastian Lackner
d79b66338e Added patch to implement stub handler for int 0x2e. 2017-03-19 20:32:29 +01:00
Sebastian Lackner
82cd676a72 Added patch to return user/kernel times for threads and processes in NtQuerySystemInformation. 2017-03-19 20:01:39 +01:00
Sebastian Lackner
da78da9cdd Added patch to silence noisy FIXME about unimplemented D3DPROCESSVERTICES_UPDATEEXTENTS. 2017-03-19 19:11:24 +01:00
Sebastian Lackner
b9b5da4780 Added patch to fix status code when querying too large memory address. 2017-03-19 17:54:21 +01:00
Sebastian Lackner
444ec16851 Added patches to mark LDR data as initialized. 2017-03-19 17:52:25 +01:00
Sebastian Lackner
76b749edc9 Rebase against 6a05069a43f1a8f0e69c4cedd134f8d7400b8a95. 2017-03-19 01:38:27 +01:00
Sebastian Lackner
a56b7a18c3 Rebase against a5031391f40c6196b9baccbf69f5ccbe3b59e17c. 2017-03-18 17:10:07 +01:00
Sebastian Lackner
5a5b6e862b Rebase against c3b108e54b99eff3942c44eef5aa89c1dbcebd91. 2017-03-16 17:13:47 +01:00
Sebastian Lackner
06da0acbdc Rebase against 2cc730b4ad148382093d67f15d40134aee05d058. 2017-03-15 16:16:43 +01:00
Sebastian Lackner
efdf5d2bc2 Rebase against f8031d06486761b1068a5b4fa8572d08efdfb8f1. 2017-03-14 03:37:18 +01:00
Sebastian Lackner
543b9eaae1 Rebase against 4b1445940d47870895b7fa87b7d69d12abe701ef. 2017-03-11 21:57:58 +01:00
Sebastian Lackner
ce5620a1a4 Added patch to return correct thread creation time in SystemProcessInformation. 2017-03-11 00:21:26 +01:00
Sebastian Lackner
05a282feff Added patch to implement IO stats for SystemPerformanceInformation in NtQuerySystemInformation. 2017-03-11 00:11:02 +01:00
Sebastian Lackner
ab34c856c3 Added patch to implement ProcessImageFileNameWin32 info class. 2017-03-10 23:09:57 +01:00
Sebastian Lackner
9a9fb0c9f8 Rebase against be0e05604a5560e26757d161708c2c3dae717834. 2017-03-10 04:53:06 +01:00
Sebastian Lackner
0ef6532241 Rebase against 1ddf2b4db8c42da36bdccd43dc336eee6ba03cce. 2017-03-10 03:25:38 +01:00
Sebastian Lackner
3b1cd79e05 Rebase against 9eecacbeb1561218d4870c83f89a233cabbf7e0c. 2017-03-08 22:56:02 +01:00
Sebastian Lackner
37b0772439 Rebase against 3f50319ec384730360d16dd79d703adafaa953fc. 2017-03-07 02:12:41 +01:00
Sebastian Lackner
3b947eae95 ntoskrnl-InStackQueuedSpinLock: Use the correct macro. 2017-03-06 22:06:33 +01:00
340 changed files with 17368 additions and 22076 deletions

View File

@@ -13,7 +13,7 @@ Installation
Ready-to-use packages for Wine Staging are available for a variety of Linux
distributions and for Mac OS X. Just follow the
[installation instructions](https://github.com/wine-compholio/wine-staging/wiki/Installation)
[installation instructions](https://wine-staging.com/installation.html)
for your operating system.
On most distributions the `wine-staging` package is installed to

View File

@@ -0,0 +1,26 @@
From 43628d9b1905396ff6442e4f1e07c9dd48739b19 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 14 Apr 2017 15:57:18 +0200
Subject: ole32: Fix compilation with recent versions of gcc.
---
dlls/ole32/storage32.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h
index 4fcfd9c362..2b23ab8eb8 100644
--- a/dlls/ole32/storage32.h
+++ b/dlls/ole32/storage32.h
@@ -526,6 +526,9 @@ StgStreamImpl* StgStreamImpl_Construct(
/******************************************************************************
* Endian conversion macros
*/
+#undef htole32
+#undef htole16
+
#ifdef WORDS_BIGENDIAN
#define htole32(x) RtlUlongByteSwap(x)
--
2.12.2

View File

@@ -1,4 +1,4 @@
From 35e7be609df3c37eded9a3fd117ba0cef02f24c7 Mon Sep 17 00:00:00 2001
From b6b1e5da04ed867251253410e37d412109a4cec2 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Fri, 8 Aug 2014 19:33:14 -0600
Subject: Appease the blessed version of gcc (4.5) when -Werror is enabled.
@@ -12,10 +12,10 @@ Subject: Appease the blessed version of gcc (4.5) when -Werror is enabled.
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 55140c6..2facbfb 100644
index c8a6a1fa5a8..0261d3708e6 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -12034,7 +12034,7 @@ static void yuv_layout_test(void)
@@ -12304,7 +12304,7 @@ static void yuv_layout_test(void)
IDirect3D9 *d3d;
D3DCOLOR color;
DWORD ref_color;
@@ -25,7 +25,7 @@ index 55140c6..2facbfb 100644
IDirect3DDevice9 *device;
ULONG refcount;
diff --git a/dlls/netapi32/netapi32.c b/dlls/netapi32/netapi32.c
index bb61e7f..cf4c466 100644
index 278d4528b01..1c5f110b828 100644
--- a/dlls/netapi32/netapi32.c
+++ b/dlls/netapi32/netapi32.c
@@ -780,7 +780,7 @@ static NET_API_STATUS share_info_to_samba( DWORD level, const BYTE *buf, unsigne
@@ -38,7 +38,7 @@ index bb61e7f..cf4c466 100644
if (servername && !(server = strdup_unixcp( servername ))) return ERROR_OUTOFMEMORY;
diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c
index 14eac39..ebff9f1 100644
index 2ecb111e218..b285705509c 100644
--- a/dlls/winealsa.drv/mmdevdrv.c
+++ b/dlls/winealsa.drv/mmdevdrv.c
@@ -359,7 +359,7 @@ static WCHAR *construct_device_id(EDataFlow flow, const WCHAR *chunk1, const cha
@@ -51,11 +51,11 @@ index 14eac39..ebff9f1 100644
static const WCHAR dashW[] = {' ','-',' ',0};
static const size_t dashW_len = (sizeof(dashW) / sizeof(*dashW)) - 1;
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 44e7090..429ae90 100644
index ce960853362..f4275d8dd48 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -6893,7 +6893,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
GLuint vs_id = 0;
@@ -9316,7 +9316,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
GLuint ds_id = 0;
GLuint gs_id = 0;
GLuint ps_id = 0;
- struct list *ps_list, *vs_list;
@@ -64,10 +64,10 @@ index 44e7090..429ae90 100644
struct wined3d_string_buffer *tmp_name;
diff --git a/tools/makedep.c b/tools/makedep.c
index d8cf2f5..280f62f 100644
index add722f80a9..24b06bbfcb2 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -1559,7 +1559,7 @@ static const char *get_make_variable( const struct makefile *make, const char *n
@@ -1608,7 +1608,7 @@ static const char *get_make_variable( const struct makefile *make, const char *n
static char *get_expanded_make_variable( const struct makefile *make, const char *name )
{
const char *var;
@@ -77,5 +77,5 @@ index d8cf2f5..280f62f 100644
var = get_make_variable( make, name );
if (!var) return NULL;
--
2.6.2
2.12.2

View File

@@ -1,287 +0,0 @@
From 472184e5801de5d1fb92d275d9c0c7e840c9a0bf Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 11 Nov 2014 03:11:33 +0100
Subject: ntdll: Implement emulation of SIDT instruction when using Exagear.
---
configure.ac | 8 ++
dlls/ntdll/signal_i386.c | 223 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 231 insertions(+)
diff --git a/configure.ac b/configure.ac
index 1e6bba3..43bf0db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,7 @@ AC_ARG_ENABLE(win16, AS_HELP_STRING([--disable-win16],[do not include Win16 supp
AC_ARG_ENABLE(win64, AS_HELP_STRING([--enable-win64],[build a Win64 emulator on AMD64 (won't run Win32 binaries)]))
AC_ARG_ENABLE(tests, AS_HELP_STRING([--disable-tests],[do not build the regression tests]))
AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode],[enable maintainer-specific build rules]))
+AC_ARG_ENABLE(exagear-compat, AS_HELP_STRING([--enable-exagear-compat],[use workarounds for known problems in the Exagear emulator]))
AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa sound support]),
[if test "x$withval" = "xno"; then ac_cv_header_sys_asoundlib_h=no; ac_cv_header_alsa_asoundlib_h=no; fi])
@@ -364,6 +365,13 @@ WINE_WARNING_WITH(gettext,[test "$MSGFMT" = false],
[gettext tools not found (or too old), translations won't be built.],
[enable_po])
+dnl **** Enable Exagear workarounds ****
+
+if test "x$enable_exagear_compat" = "xyes"
+then
+ AC_DEFINE(EXAGEAR_COMPAT, 1, [Define if you want to enable Exagear emulator workarounds])
+fi
+
dnl **** Check for some libraries ****
dnl Check for -li386 for NetBSD and OpenBSD
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index ee8855a..4269329 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -96,6 +96,14 @@ typedef struct
BYTE Reserved4[96];
} XMM_SAVE_AREA32;
+#include "pshpack1.h"
+struct idtr
+{
+ WORD limit;
+ BYTE *base;
+};
+#include "poppack.h"
+
/***********************************************************************
* signal context platform-specific definitions
*/
@@ -1898,6 +1906,213 @@ static inline DWORD get_fpu_code( const CONTEXT *context )
}
+#ifdef EXAGEAR_COMPAT
+
+/***********************************************************************
+ * INSTR_GetOperandAddr
+ *
+ * Return the address of an instruction operand (from the mod/rm byte).
+ */
+static BYTE *INSTR_GetOperandAddr( CONTEXT *context, const BYTE *instr,
+ int long_addr, int segprefix, int *len )
+{
+ int mod, rm, base = 0, index = 0, ss = 0, off;
+
+#define GET_VAL(val,type) \
+ { *val = *(type *)instr; instr += sizeof(type); *len += sizeof(type); }
+
+ *len = 0;
+ GET_VAL( &mod, BYTE );
+ rm = mod & 7;
+ mod >>= 6;
+
+ if (mod == 3)
+ {
+ switch(rm)
+ {
+ case 0: return (BYTE *)&context->Eax;
+ case 1: return (BYTE *)&context->Ecx;
+ case 2: return (BYTE *)&context->Edx;
+ case 3: return (BYTE *)&context->Ebx;
+ case 4: return (BYTE *)&context->Esp;
+ case 5: return (BYTE *)&context->Ebp;
+ case 6: return (BYTE *)&context->Esi;
+ case 7: return (BYTE *)&context->Edi;
+ }
+ }
+
+ if (long_addr)
+ {
+ if (rm == 4)
+ {
+ BYTE sib;
+ GET_VAL( &sib, BYTE );
+ rm = sib & 7;
+ ss = sib >> 6;
+ switch((sib >> 3) & 7)
+ {
+ case 0: index = context->Eax; break;
+ case 1: index = context->Ecx; break;
+ case 2: index = context->Edx; break;
+ case 3: index = context->Ebx; break;
+ case 4: index = 0; break;
+ case 5: index = context->Ebp; break;
+ case 6: index = context->Esi; break;
+ case 7: index = context->Edi; break;
+ }
+ }
+
+ switch(rm)
+ {
+ case 0: base = context->Eax; break;
+ case 1: base = context->Ecx; break;
+ case 2: base = context->Edx; break;
+ case 3: base = context->Ebx; break;
+ case 4: base = context->Esp; break;
+ case 5: base = context->Ebp; break;
+ case 6: base = context->Esi; break;
+ case 7: base = context->Edi; break;
+ }
+ switch (mod)
+ {
+ case 0:
+ if (rm == 5) /* special case: ds:(disp32) */
+ {
+ GET_VAL( &base, DWORD );
+ }
+ break;
+
+ case 1: /* 8-bit disp */
+ GET_VAL( &off, BYTE );
+ base += (signed char)off;
+ break;
+
+ case 2: /* 32-bit disp */
+ GET_VAL( &off, DWORD );
+ base += (signed long)off;
+ break;
+ }
+ }
+ else /* short address */
+ {
+ switch(rm)
+ {
+ case 0: /* ds:(bx,si) */
+ base = LOWORD(context->Ebx) + LOWORD(context->Esi);
+ break;
+ case 1: /* ds:(bx,di) */
+ base = LOWORD(context->Ebx) + LOWORD(context->Edi);
+ break;
+ case 2: /* ss:(bp,si) */
+ base = LOWORD(context->Ebp) + LOWORD(context->Esi);
+ break;
+ case 3: /* ss:(bp,di) */
+ base = LOWORD(context->Ebp) + LOWORD(context->Edi);
+ break;
+ case 4: /* ds:(si) */
+ base = LOWORD(context->Esi);
+ break;
+ case 5: /* ds:(di) */
+ base = LOWORD(context->Edi);
+ break;
+ case 6: /* ss:(bp) */
+ base = LOWORD(context->Ebp);
+ break;
+ case 7: /* ds:(bx) */
+ base = LOWORD(context->Ebx);
+ break;
+ }
+
+ switch(mod)
+ {
+ case 0:
+ if (rm == 6) /* special case: ds:(disp16) */
+ {
+ GET_VAL( &base, WORD );
+ }
+ break;
+
+ case 1: /* 8-bit disp */
+ GET_VAL( &off, BYTE );
+ base += (signed char)off;
+ break;
+
+ case 2: /* 16-bit disp */
+ GET_VAL( &off, WORD );
+ base += (signed short)off;
+ break;
+ }
+ base &= 0xffff;
+ }
+ /* FIXME: we assume that all segments have a base of 0 */
+ return (BYTE *)(base + (index << ss));
+#undef GET_VAL
+}
+
+
+/***********************************************************************
+ * check_invalid_instr
+ *
+ * Support for instructions not implemented by Exagear.
+ */
+static inline BOOL check_invalid_instr( CONTEXT *context )
+{
+ const BYTE *instr;
+ unsigned int prefix_count = 0;
+ int len, long_addr = 1;
+
+ if (!wine_ldt_is_system( context->SegCs )) return FALSE;
+ instr = (BYTE *)context->Eip;
+
+ for (;;) switch (*instr)
+ {
+ /* instruction prefixes */
+ case 0x2e: /* %cs: */
+ case 0x36: /* %ss: */
+ case 0x3e: /* %ds: */
+ case 0x26: /* %es: */
+ case 0x64: /* %fs: */
+ case 0x65: /* %gs: */
+ case 0x66: /* opcode size */
+ case 0x67: /* addr size */
+ case 0xf0: /* lock */
+ case 0xf2: /* repne */
+ case 0xf3: /* repe */
+ if (++prefix_count >= 15) return FALSE;
+ if (*instr == 0x67) long_addr = !long_addr; /* addr size */
+ instr++;
+ continue;
+ case 0x0f: /* extended instruction */
+ switch (instr[1])
+ {
+ case 0x01:
+ if (((instr[2] >> 3) & 7) == 1) /* sidt m */
+ {
+ struct idtr ret;
+ BYTE *addr;
+
+ if ((instr[2] >> 6) == 3) return FALSE; /* loading to register not allowed */
+ addr = INSTR_GetOperandAddr( context, instr + 2, long_addr, 0, &len );
+
+ /* fake IDT structure */
+ ret.limit = 0xfff;
+ ret.base = (void *)0xff000000;
+ memcpy(addr, &ret, sizeof(ret));
+
+ context->Eip += prefix_count + len + 2;
+ return TRUE;
+ }
+ break;
+ }
+ return FALSE;
+ default:
+ return FALSE;
+ }
+}
+
+#endif /* EXAGEAR_COMPAT */
+
+
/**********************************************************************
* raise_segv_exception
*/
@@ -1907,6 +2122,14 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context
switch(rec->ExceptionCode)
{
+#ifdef EXAGEAR_COMPAT
+ case EXCEPTION_ILLEGAL_INSTRUCTION:
+ {
+ if (check_invalid_instr( context ))
+ goto done;
+ }
+ break;
+#endif
case EXCEPTION_ACCESS_VIOLATION:
if (rec->NumberParameters == 2)
{
--
2.7.1

View File

@@ -1,51 +0,0 @@
From 5a4827d5c16aefd82029583710b9032a2356917b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 22 Nov 2014 05:49:30 +0100
Subject: ntdll: Fix issues with write watches when using Exagear.
---
dlls/ntdll/virtual.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index f7aae0b..3fa2027 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1558,6 +1558,26 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack )
{
void *page = ROUND_ADDR( addr, page_mask );
BYTE *vprot = &view->prot[((const char *)page - (const char *)view->base) >> page_shift];
+#ifdef EXAGEAR_COMPAT
+ /* Exagear doesn't correctly set err, so always check for write watches, and
+ * retry after removing the VPROT_WRITEWATCH or VPROT_WRITECOPY flag. In
+ * contrary to the general implementation below this is not completely race-
+ * condition safe. When multiple threads trigger the write watch at the same
+ * time only the first thread will properly continue the execution, the rest
+ * will crash. */
+ if ((view->protect & VPROT_WRITEWATCH) && (*vprot & VPROT_WRITEWATCH))
+ {
+ *vprot &= ~VPROT_WRITEWATCH;
+ VIRTUAL_SetProt( view, page, page_size, *vprot );
+ if (VIRTUAL_GetUnixProt( *vprot ) & PROT_WRITE) ret = STATUS_SUCCESS;
+ }
+ if (*vprot & VPROT_WRITECOPY)
+ {
+ *vprot = (*vprot & ~VPROT_WRITECOPY) | VPROT_WRITE;
+ VIRTUAL_SetProt( view, page, page_size, *vprot );
+ if (VIRTUAL_GetUnixProt( *vprot ) & PROT_WRITE) ret = STATUS_SUCCESS;
+ }
+#else
if (err & EXCEPTION_WRITE_FAULT)
{
if ((view->protect & VPROT_WRITEWATCH) && (*vprot & VPROT_WRITEWATCH))
@@ -1573,6 +1593,7 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack )
/* ignore fault if page is writable now */
if (VIRTUAL_GetUnixProt( *vprot ) & PROT_WRITE) ret = STATUS_SUCCESS;
}
+#endif
if (!on_signal_stack && (*vprot & VPROT_GUARD))
{
VIRTUAL_SetProt( view, page, page_size, *vprot & ~VPROT_GUARD );
--
2.2.2

View File

@@ -1,25 +0,0 @@
From 67cc0e23b26d5d9abda7eb771dc2bec309cb8650 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 23 Nov 2014 22:33:51 +0100
Subject: server: Don't attempt to use ptrace when running with Exagear.
---
server/ptrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/ptrace.c b/server/ptrace.c
index cb436b6..fb29b5a 100644
--- a/server/ptrace.c
+++ b/server/ptrace.c
@@ -531,7 +531,7 @@ void get_selector_entry( struct thread *thread, int entry, unsigned int *base,
#if defined(linux) && (defined(HAVE_SYS_USER_H) || defined(HAVE_ASM_USER_H)) \
- && (defined(__i386__) || defined(__x86_64__))
+ && (defined(__i386__) || defined(__x86_64__)) && !defined(EXAGEAR_COMPAT)
#ifdef HAVE_SYS_USER_H
#include <sys/user.h>
--
2.1.3

View File

@@ -1,2 +0,0 @@
Depends: ntdll-WRITECOPY
Disabled: true

View File

@@ -1,4 +1,4 @@
From fdc085e009942fa89ef5f0cd4104ab78c9d80b1b Mon Sep 17 00:00:00 2001
From bee5e0baac722c66ad8c1034a65a2cecfe74716e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 5 Mar 2017 23:50:06 +0100
Subject: advapi32: Implement LsaLookupPrivilegeName.
@@ -12,20 +12,20 @@ Subject: advapi32: Implement LsaLookupPrivilegeName.
5 files changed, 60 insertions(+), 10 deletions(-)
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index 3000973265c..2c599c8bd92 100644
index 078bb8fc25..124f527282 100644
--- a/dlls/advapi32/advapi32.spec
+++ b/dlls/advapi32/advapi32.spec
@@ -446,7 +446,7 @@
@ stdcall LsaLookupNames2(ptr long long ptr ptr ptr)
@@ -469,7 +469,7 @@
@ stdcall LsaLookupNames(long long ptr ptr ptr)
@ stdcall LsaLookupNames2(ptr long long ptr ptr ptr)
@ stub LsaLookupPrivilegeDisplayName
-# @ stub LsaLookupPrivilegeName
+@ stdcall LsaLookupPrivilegeName(long ptr ptr)
# @ stub LsaLookupPrivilegeValue
@ stdcall LsaLookupSids(ptr long ptr ptr ptr)
# @ stub LsaManageSidNameMapping
# @ stub LsaLookupSids2
diff --git a/dlls/advapi32/advapi32_misc.h b/dlls/advapi32/advapi32_misc.h
index d116ecb836e..ecb07f635a6 100644
index d116ecb836..ecb07f635a 100644
--- a/dlls/advapi32/advapi32_misc.h
+++ b/dlls/advapi32/advapi32_misc.h
@@ -68,4 +68,6 @@ static inline WCHAR *strdupAW( const char *src )
@@ -36,10 +36,10 @@ index d116ecb836e..ecb07f635a6 100644
+
#endif /* __WINE_ADVAPI32MISC_H */
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
index 0f2167d19ab..6a7a69a9eb7 100644
index 479201bfc1..ceb3b05c05 100644
--- a/dlls/advapi32/lsa.c
+++ b/dlls/advapi32/lsa.c
@@ -1012,3 +1012,41 @@ NTSTATUS WINAPI LsaUnregisterPolicyChangeNotification(
@@ -973,3 +973,41 @@ NTSTATUS WINAPI LsaUnregisterPolicyChangeNotification(
FIXME("(%d,%p) stub\n", class, event);
return STATUS_SUCCESS;
}
@@ -82,7 +82,7 @@ index 0f2167d19ab..6a7a69a9eb7 100644
+ return STATUS_SUCCESS;
+}
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index b0b368d6abf..24ec3099713 100644
index e36792cff4..3bc8f48b19 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -1840,7 +1840,7 @@ static const WCHAR SE_IMPERSONATE_NAME_W[] =
@@ -146,7 +146,7 @@ index b0b368d6abf..24ec3099713 100644
}
}
diff --git a/include/ntsecapi.h b/include/ntsecapi.h
index 2bb3d312e43..0bf0eca43ed 100644
index 2bb3d312e4..0bf0eca43e 100644
--- a/include/ntsecapi.h
+++ b/include/ntsecapi.h
@@ -370,6 +370,7 @@ NTSTATUS WINAPI LsaLookupNames(LSA_HANDLE,ULONG,PLSA_UNICODE_STRING,PLSA_REFEREN

View File

@@ -1,4 +1,4 @@
From 01efac6b4fa338715ad775c147a6bfc42e0bc38e Mon Sep 17 00:00:00 2001
From 63d642a1af3ccc579123cb8fd13959ab5e9136dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 6 Mar 2017 00:01:53 +0100
Subject: advapi32: Add stub for LsaLookupPrivilegeDisplayName.
@@ -9,23 +9,23 @@ Subject: advapi32: Add stub for LsaLookupPrivilegeDisplayName.
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index 2c599c8bd92..ce1838d8c5a 100644
index 124f527282..0b03cec3f5 100644
--- a/dlls/advapi32/advapi32.spec
+++ b/dlls/advapi32/advapi32.spec
@@ -445,7 +445,7 @@
@@ -468,7 +468,7 @@
# @ stub LsaICLookupSidsWithCreds
@ stdcall LsaLookupNames2(ptr long long ptr ptr ptr)
@ stdcall LsaLookupNames(long long ptr ptr ptr)
@ stdcall LsaLookupNames2(ptr long long ptr ptr ptr)
-@ stub LsaLookupPrivilegeDisplayName
+@ stdcall LsaLookupPrivilegeDisplayName(long ptr ptr ptr)
@ stdcall LsaLookupPrivilegeName(long ptr ptr)
# @ stub LsaLookupPrivilegeValue
@ stdcall LsaLookupSids(ptr long ptr ptr ptr)
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
index 6a7a69a9eb7..fdb238f74b2 100644
index ceb3b05c05..c2e02fb462 100644
--- a/dlls/advapi32/lsa.c
+++ b/dlls/advapi32/lsa.c
@@ -45,6 +45,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(advapi);
@@ -44,6 +44,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(advapi);
return FailureCode; \
}
@@ -38,7 +38,7 @@ index 6a7a69a9eb7..fdb238f74b2 100644
static void dumpLsaAttributes(const LSA_OBJECT_ATTRIBUTES *oa)
{
if (oa)
@@ -1050,3 +1056,18 @@ NTSTATUS WINAPI LsaLookupPrivilegeName(
@@ -1011,3 +1017,18 @@ NTSTATUS WINAPI LsaLookupPrivilegeName(
*name = priv_unicode;
return STATUS_SUCCESS;
}

View File

@@ -0,0 +1,268 @@
From 994fe46f1b68d851d285a29cce904bd9f22540ea Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Tue, 2 May 2017 00:59:49 -0500
Subject: advapi32: Implement BuildSecurityDescriptorW.
---
dlls/advapi32/security.c | 218 +++++++++++++++++++++++++++++++++++------------
1 file changed, 164 insertions(+), 54 deletions(-)
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index 24ec3099713..82bb6689d43 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -58,6 +58,7 @@ static BOOL ParseStringSecurityDescriptorToSecurityDescriptor(
SECURITY_DESCRIPTOR_RELATIVE* SecurityDescriptor,
LPDWORD cBytes);
static DWORD ParseAclStringFlags(LPCWSTR* StringAcl);
+static DWORD trustee_to_sid(DWORD nDestinationSidLength, PSID pDestinationSid, PTRUSTEEW pTrustee);
typedef struct _ACEFLAG
{
@@ -1264,16 +1265,122 @@ DWORD WINAPI BuildSecurityDescriptorW(
IN ULONG cCountOfAccessEntries,
IN PEXPLICIT_ACCESSW pListOfAccessEntries,
IN ULONG cCountOfAuditEntries,
- IN PEXPLICIT_ACCESSW pListofAuditEntries,
+ IN PEXPLICIT_ACCESSW pListOfAuditEntries,
IN PSECURITY_DESCRIPTOR pOldSD,
IN OUT PULONG lpdwBufferLength,
OUT PSECURITY_DESCRIPTOR* pNewSD)
{
- FIXME("(%p,%p,%d,%p,%d,%p,%p,%p,%p) stub!\n",pOwner,pGroup,
- cCountOfAccessEntries,pListOfAccessEntries,cCountOfAuditEntries,
- pListofAuditEntries,pOldSD,lpdwBufferLength,pNewSD);
+ SECURITY_DESCRIPTOR desc;
+ NTSTATUS status;
+ DWORD ret = ERROR_SUCCESS;
+
+ TRACE("(%p,%p,%d,%p,%d,%p,%p,%p,%p)\n", pOwner, pGroup,
+ cCountOfAccessEntries, pListOfAccessEntries, cCountOfAuditEntries,
+ pListOfAuditEntries, pOldSD, lpdwBufferLength, pNewSD);
- return ERROR_CALL_NOT_IMPLEMENTED;
+ if (pOldSD)
+ {
+ SECURITY_DESCRIPTOR_CONTROL control;
+ DWORD desc_size, dacl_size = 0, sacl_size = 0, owner_size = 0, group_size = 0;
+ PACL dacl = NULL, sacl = NULL;
+ PSID owner = NULL, group = NULL;
+ DWORD revision;
+
+ if ((status = RtlGetControlSecurityDescriptor( pOldSD, &control, &revision )) != STATUS_SUCCESS)
+ return RtlNtStatusToDosError( status );
+ if (!(control & SE_SELF_RELATIVE))
+ return ERROR_INVALID_SECURITY_DESCR;
+
+ desc_size = sizeof(desc);
+ status = RtlSelfRelativeToAbsoluteSD( pOldSD, &desc, &desc_size, dacl, &dacl_size, sacl, &sacl_size,
+ owner, &owner_size, group, &group_size );
+ if (status == STATUS_BUFFER_TOO_SMALL)
+ {
+ if (dacl_size)
+ dacl = LocalAlloc( LMEM_FIXED, dacl_size );
+ if (sacl_size)
+ sacl = LocalAlloc( LMEM_FIXED, sacl_size );
+ if (owner_size)
+ owner = LocalAlloc( LMEM_FIXED, owner_size );
+ if (group_size)
+ group = LocalAlloc( LMEM_FIXED, group_size );
+
+ desc_size = sizeof(desc);
+ status = RtlSelfRelativeToAbsoluteSD( pOldSD, &desc, &desc_size, dacl, &dacl_size, sacl, &sacl_size,
+ owner, &owner_size, group, &group_size );
+ }
+ if (status != STATUS_SUCCESS)
+ {
+ LocalFree( dacl );
+ LocalFree( sacl );
+ LocalFree( owner );
+ LocalFree( group );
+ return RtlNtStatusToDosError( status );
+ }
+ }
+ else
+ {
+ if ((status = RtlCreateSecurityDescriptor( &desc, SECURITY_DESCRIPTOR_REVISION )) != STATUS_SUCCESS)
+ return RtlNtStatusToDosError( status );
+ }
+
+ if (pOwner)
+ {
+ LocalFree( desc.Owner );
+ desc.Owner = LocalAlloc( LMEM_FIXED, sizeof(MAX_SID) );
+ if ((ret = trustee_to_sid( sizeof(MAX_SID), desc.Owner, pOwner )))
+ goto done;
+ }
+
+ if (pGroup)
+ {
+ LocalFree( desc.Group );
+ desc.Group = LocalAlloc( LMEM_FIXED, sizeof(MAX_SID) );
+ if ((ret = trustee_to_sid( sizeof(MAX_SID), desc.Group, pGroup )))
+ goto done;
+ }
+
+ if (pListOfAccessEntries)
+ {
+ PACL new_dacl;
+
+ if ((ret = SetEntriesInAclW( cCountOfAccessEntries, pListOfAccessEntries, desc.Dacl, &new_dacl )))
+ goto done;
+
+ LocalFree( desc.Dacl );
+ desc.Dacl = new_dacl;
+ desc.Control |= SE_DACL_PRESENT;
+ }
+
+ if (pListOfAuditEntries)
+ {
+ PACL new_sacl;
+
+ if ((ret = SetEntriesInAclW( cCountOfAuditEntries, pListOfAuditEntries, desc.Sacl, &new_sacl )))
+ goto done;
+
+ LocalFree( desc.Sacl );
+ desc.Sacl = new_sacl;
+ desc.Control |= SE_SACL_PRESENT;
+ }
+
+ *lpdwBufferLength = RtlLengthSecurityDescriptor( &desc );
+ *pNewSD = LocalAlloc( LMEM_FIXED, *lpdwBufferLength );
+
+ if ((status = RtlMakeSelfRelativeSD( &desc, *pNewSD, lpdwBufferLength )) != STATUS_SUCCESS)
+ {
+ ret = RtlNtStatusToDosError( status );
+ LocalFree( *pNewSD );
+ *pNewSD = NULL;
+ }
+
+done:
+ /* free absolute descriptor */
+ LocalFree( desc.Owner );
+ LocalFree( desc.Group );
+ LocalFree( desc.Sacl );
+ LocalFree( desc.Dacl );
+ return ret;
}
/******************************************************************************
@@ -3766,6 +3873,56 @@ static void free_trustee_name(TRUSTEE_FORM form, WCHAR *trustee_nameW)
}
}
+static DWORD trustee_to_sid( DWORD nDestinationSidLength, PSID pDestinationSid, PTRUSTEEW pTrustee )
+{
+ if (pTrustee->MultipleTrusteeOperation == TRUSTEE_IS_IMPERSONATE)
+ {
+ WARN("bad multiple trustee operation %d\n", pTrustee->MultipleTrusteeOperation);
+ return ERROR_INVALID_PARAMETER;
+ }
+
+ switch (pTrustee->TrusteeForm)
+ {
+ case TRUSTEE_IS_SID:
+ if (!CopySid(nDestinationSidLength, pDestinationSid, pTrustee->ptstrName))
+ {
+ WARN("bad sid %p\n", pTrustee->ptstrName);
+ return ERROR_INVALID_PARAMETER;
+ }
+ break;
+ case TRUSTEE_IS_NAME:
+ {
+ DWORD sid_size = nDestinationSidLength;
+ DWORD domain_size = MAX_COMPUTERNAME_LENGTH + 1;
+ SID_NAME_USE use;
+ if (!strcmpW( pTrustee->ptstrName, CURRENT_USER ))
+ {
+ if (!lookup_user_account_name( pDestinationSid, &sid_size, NULL, &domain_size, &use ))
+ {
+ return GetLastError();
+ }
+ }
+ else if (!LookupAccountNameW(NULL, pTrustee->ptstrName, pDestinationSid, &sid_size, NULL, &domain_size, &use))
+ {
+ WARN("bad user name %s\n", debugstr_w(pTrustee->ptstrName));
+ return ERROR_INVALID_PARAMETER;
+ }
+ break;
+ }
+ case TRUSTEE_IS_OBJECTS_AND_SID:
+ FIXME("TRUSTEE_IS_OBJECTS_AND_SID unimplemented\n");
+ break;
+ case TRUSTEE_IS_OBJECTS_AND_NAME:
+ FIXME("TRUSTEE_IS_OBJECTS_AND_NAME unimplemented\n");
+ break;
+ default:
+ WARN("bad trustee form %d\n", pTrustee->TrusteeForm);
+ return ERROR_INVALID_PARAMETER;
+ }
+
+ return ERROR_SUCCESS;
+}
+
/******************************************************************************
* SetEntriesInAclA [ADVAPI32.@]
*/
@@ -3861,56 +4018,9 @@ DWORD WINAPI SetEntriesInAclW( ULONG count, PEXPLICIT_ACCESSW pEntries,
pEntries[i].Trustee.TrusteeForm, pEntries[i].Trustee.TrusteeType,
pEntries[i].Trustee.ptstrName);
- if (pEntries[i].Trustee.MultipleTrusteeOperation == TRUSTEE_IS_IMPERSONATE)
- {
- WARN("bad multiple trustee operation %d for trustee %d\n", pEntries[i].Trustee.MultipleTrusteeOperation, i);
- ret = ERROR_INVALID_PARAMETER;
- goto exit;
- }
-
- switch (pEntries[i].Trustee.TrusteeForm)
- {
- case TRUSTEE_IS_SID:
- if (!CopySid(FIELD_OFFSET(SID, SubAuthority[SID_MAX_SUB_AUTHORITIES]),
- ppsid[i], pEntries[i].Trustee.ptstrName))
- {
- WARN("bad sid %p for trustee %d\n", pEntries[i].Trustee.ptstrName, i);
- ret = ERROR_INVALID_PARAMETER;
- goto exit;
- }
- break;
- case TRUSTEE_IS_NAME:
- {
- DWORD sid_size = FIELD_OFFSET(SID, SubAuthority[SID_MAX_SUB_AUTHORITIES]);
- DWORD domain_size = MAX_COMPUTERNAME_LENGTH + 1;
- SID_NAME_USE use;
- if (!strcmpW( pEntries[i].Trustee.ptstrName, CURRENT_USER ))
- {
- if (!lookup_user_account_name( ppsid[i], &sid_size, NULL, &domain_size, &use ))
- {
- ret = GetLastError();
- goto exit;
- }
- }
- else if (!LookupAccountNameW(NULL, pEntries[i].Trustee.ptstrName, ppsid[i], &sid_size, NULL, &domain_size, &use))
- {
- WARN("bad user name %s for trustee %d\n", debugstr_w(pEntries[i].Trustee.ptstrName), i);
- ret = ERROR_INVALID_PARAMETER;
- goto exit;
- }
- break;
- }
- case TRUSTEE_IS_OBJECTS_AND_SID:
- FIXME("TRUSTEE_IS_OBJECTS_AND_SID unimplemented\n");
- break;
- case TRUSTEE_IS_OBJECTS_AND_NAME:
- FIXME("TRUSTEE_IS_OBJECTS_AND_NAME unimplemented\n");
- break;
- default:
- WARN("bad trustee form %d for trustee %d\n", pEntries[i].Trustee.TrusteeForm, i);
- ret = ERROR_INVALID_PARAMETER;
+ ret = trustee_to_sid( FIELD_OFFSET(SID, SubAuthority[SID_MAX_SUB_AUTHORITIES]), ppsid[i], &pEntries[i].Trustee);
+ if (ret)
goto exit;
- }
/* Note: we overestimate the ACL size here as a tradeoff between
* instructions (simplicity) and memory */
--
2.12.2

View File

@@ -0,0 +1,69 @@
From 63082c3863d8be466ed14f532653ddf35e40328a Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 5 May 2017 00:18:50 +0200
Subject: advapi32/tests: Add basic tests for BuildSecurityDescriptor.
---
dlls/advapi32/tests/security.c | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index d6ea3a19fad..c591f7b6e5f 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -7489,6 +7489,44 @@ static void test_child_token_sd(void)
HeapFree(GetProcessHeap(), 0, sd);
}
+static void test_BuildSecurityDescriptorW(void)
+{
+ SECURITY_DESCRIPTOR old_sd, *new_sd, *rel_sd;
+ ULONG new_sd_size;
+ DWORD buf_size;
+ char buf[1024];
+ BOOL success;
+ DWORD ret;
+
+ InitializeSecurityDescriptor(&old_sd, SECURITY_DESCRIPTOR_REVISION);
+
+ buf_size = sizeof(buf);
+ rel_sd = (SECURITY_DESCRIPTOR *)buf;
+ success = MakeSelfRelativeSD(&old_sd, rel_sd, &buf_size);
+ ok(success, "MakeSelfRelativeSD failed with %u\n", GetLastError());
+
+ new_sd = NULL;
+ new_sd_size = 0;
+ ret = BuildSecurityDescriptorW(NULL, NULL, 0, NULL, 0, NULL, NULL, &new_sd_size, (void **)&new_sd);
+ ok(ret == ERROR_SUCCESS, "BuildSecurityDescriptor failed with %u\n", ret);
+ ok(new_sd != NULL, "expected new_sd != NULL\n");
+ ok(new_sd_size == sizeof(old_sd), "expected new_sd_size == sizeof(old_sd), got %u\n", new_sd_size);
+ LocalFree(new_sd);
+
+ new_sd = (void *)0xdeadbeef;
+ ret = BuildSecurityDescriptorW(NULL, NULL, 0, NULL, 0, NULL, &old_sd, &new_sd_size, (void **)&new_sd);
+ ok(ret == ERROR_INVALID_SECURITY_DESCR, "expected ERROR_INVALID_SECURITY_DESCR, got %u\n", ret);
+ ok(new_sd == (void *)0xdeadbeef, "expected new_sd == 0xdeadbeef, got %p\n", new_sd);
+
+ new_sd = NULL;
+ new_sd_size = 0;
+ ret = BuildSecurityDescriptorW(NULL, NULL, 0, NULL, 0, NULL, rel_sd, &new_sd_size, (void **)&new_sd);
+ ok(ret == ERROR_SUCCESS, "BuildSecurityDescriptor failed with %u\n", ret);
+ ok(new_sd != NULL, "expected new_sd != NULL\n");
+ ok(new_sd_size == sizeof(old_sd), "expected new_sd_size == sizeof(old_sd), got %u\n", new_sd_size);
+ LocalFree(new_sd);
+}
+
START_TEST(security)
{
init();
@@ -7542,6 +7580,7 @@ START_TEST(security)
test_pseudo_tokens();
test_maximum_allowed();
test_GetExplicitEntriesFromAclW();
+ test_BuildSecurityDescriptorW();
/* must be the last test, modifies process token */
test_token_security_descriptor();
--
2.12.2

View File

@@ -0,0 +1,2 @@
Fixes: Initial implementation of advapi32.BuildSecurityDescriptorW
Depends: server-LABEL_SECURITY_INFORMATION

View File

@@ -1,65 +0,0 @@
From 97744349e9a23aa024910d87a89bd94652db4914 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 15 Jan 2016 13:07:09 +0100
Subject: api-ms-win-core-quirks-l1-1-0: Add dll.
---
configure.ac | 1 +
dlls/api-ms-win-core-quirks-l1-1-0/Makefile.in | 1 +
.../api-ms-win-core-quirks-l1-1-0.spec | 8 ++++++++
tools/make_specfiles | 4 ++++
4 files changed, 14 insertions(+)
create mode 100644 dlls/api-ms-win-core-quirks-l1-1-0/Makefile.in
create mode 100644 dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
diff --git a/configure.ac b/configure.ac
index 84316f9..e826dd0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2720,6 +2720,7 @@ WINE_CONFIG_DLL(api-ms-win-core-processthreads-l1-1-2)
WINE_CONFIG_DLL(api-ms-win-core-profile-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-core-psapi-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-core-psapi-obsolete-l1-1-0)
+WINE_CONFIG_DLL(api-ms-win-core-quirks-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-core-realtime-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-core-registry-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-core-registryuserspecific-l1-1-0)
diff --git a/dlls/api-ms-win-core-quirks-l1-1-0/Makefile.in b/dlls/api-ms-win-core-quirks-l1-1-0/Makefile.in
new file mode 100644
index 0000000..9486e8b
--- /dev/null
+++ b/dlls/api-ms-win-core-quirks-l1-1-0/Makefile.in
@@ -0,0 +1 @@
+MODULE = api-ms-win-core-quirks-l1-1-0.dll
diff --git a/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec b/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
new file mode 100644
index 0000000..54ce373
--- /dev/null
+++ b/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
@@ -0,0 +1,8 @@
+@ stub QuirkGetData
+@ stub QuirkGetData2
+@ stdcall QuirkIsEnabled(ptr) kernelbase.QuirkIsEnabled
+@ stub QuirkIsEnabled2
+@ stub QuirkIsEnabled3
+@ stub QuirkIsEnabledForPackage
+@ stub QuirkIsEnabledForPackage2
+@ stub QuirkIsEnabledForProcess
diff --git a/tools/make_specfiles b/tools/make_specfiles
index eba8548..609f7a0 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -239,6 +239,10 @@ my @dll_groups =
"api-ms-win-core-bem-l1-1-0",
],
[
+ "kernelbase",
+ "api-ms-win-core-quirks-l1-1-0",
+ ],
+ [
"ole32",
"api-ms-win-downlevel-ole32-l1-1-0",
"api-ms-win-core-com-l1-1-0",
--
2.9.0

View File

@@ -1,4 +1,4 @@
From 08231829bbfa686e537a0c94f3aa4ede92a7817b Mon Sep 17 00:00:00 2001
From 23e58d6cb2f258da259a1efce72fd2e1d58a530b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 17:12:45 +0100
Subject: ext-ms-win-appmodel-usercontext-l1-1-0: Add dll and add stub for
@@ -15,20 +15,20 @@ Subject: ext-ms-win-appmodel-usercontext-l1-1-0: Add dll and add stub for
create mode 100644 dlls/ext-ms-win-appmodel-usercontext-l1-1-0/main.c
diff --git a/configure.ac b/configure.ac
index bdd390c..6264ede 100644
index 1d1846dbb7..e9cf69d3fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3020,6 +3020,7 @@ WINE_CONFIG_DLL(esent)
@@ -3045,6 +3045,7 @@ WINE_CONFIG_DLL(esent)
WINE_CONFIG_DLL(evr)
WINE_CONFIG_DLL(explorerframe,,[clean])
WINE_CONFIG_TEST(dlls/explorerframe/tests)
+WINE_CONFIG_DLL(ext-ms-win-appmodel-usercontext-l1-1-0)
WINE_CONFIG_DLL(ext-ms-win-authz-context-l1-1-0)
WINE_CONFIG_DLL(ext-ms-win-domainjoin-netjoin-l1-1-0)
WINE_CONFIG_DLL(ext-ms-win-gdi-dc-create-l1-1-1)
WINE_CONFIG_DLL(ext-ms-win-gdi-dc-l1-2-0)
diff --git a/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/Makefile.in b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/Makefile.in
new file mode 100644
index 0000000..16eee75
index 0000000000..16eee7588f
--- /dev/null
+++ b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/Makefile.in
@@ -0,0 +1,4 @@
@@ -38,7 +38,7 @@ index 0000000..16eee75
+ main.c
diff --git a/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/ext-ms-win-appmodel-usercontext-l1-1-0.spec b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/ext-ms-win-appmodel-usercontext-l1-1-0.spec
new file mode 100644
index 0000000..7642d15
index 0000000000..7642d156c9
--- /dev/null
+++ b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/ext-ms-win-appmodel-usercontext-l1-1-0.spec
@@ -0,0 +1,3 @@
@@ -47,7 +47,7 @@ index 0000000..7642d15
+@ stub UserContextExtSetToken
diff --git a/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/main.c b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/main.c
new file mode 100644
index 0000000..7a9e75f
index 0000000000..7a9e75f710
--- /dev/null
+++ b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/main.c
@@ -0,0 +1,35 @@
@@ -87,5 +87,5 @@ index 0000000..7a9e75f
+ return S_OK;
+}
--
2.9.0
2.12.2

View File

@@ -1,58 +0,0 @@
From d0688788458f243ccef2c337d7ab8f59ead75a3b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 4 Feb 2016 06:19:57 +0100
Subject: kernelbase: Add stub for QuirkIsEnabled3.
---
.../api-ms-win-core-quirks-l1-1-0.spec | 2 +-
dlls/kernelbase/kernelbase.spec | 2 +-
dlls/kernelbase/misc.c | 10 ++++++++++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec b/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
index 54ce373..1485512 100644
--- a/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
+++ b/dlls/api-ms-win-core-quirks-l1-1-0/api-ms-win-core-quirks-l1-1-0.spec
@@ -2,7 +2,7 @@
@ stub QuirkGetData2
@ stdcall QuirkIsEnabled(ptr) kernelbase.QuirkIsEnabled
@ stub QuirkIsEnabled2
-@ stub QuirkIsEnabled3
+@ stdcall QuirkIsEnabled3(ptr ptr) kernelbase.QuirkIsEnabled3
@ stub QuirkIsEnabledForPackage
@ stub QuirkIsEnabledForPackage2
@ stub QuirkIsEnabledForProcess
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index 8fdb80d..c0b2594 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1189,7 +1189,7 @@
@ stub QuirkGetData2
@ stdcall QuirkIsEnabled(ptr)
@ stub QuirkIsEnabled2
-@ stub QuirkIsEnabled3
+@ stdcall QuirkIsEnabled3(ptr ptr)
@ stub QuirkIsEnabledForPackage
@ stub QuirkIsEnabledForPackage2
@ stub QuirkIsEnabledForPackage3
diff --git a/dlls/kernelbase/misc.c b/dlls/kernelbase/misc.c
index be1591a..e703e6d 100644
--- a/dlls/kernelbase/misc.c
+++ b/dlls/kernelbase/misc.c
@@ -35,3 +35,13 @@ BOOL WINAPI QuirkIsEnabled(void *arg)
FIXME("(%p): stub\n", arg);
return FALSE;
}
+
+/***********************************************************************
+ * QuirkIsEnabled3 (KERNELBASE.@)
+ */
+BOOL WINAPI QuirkIsEnabled3(void *arg1, void *arg2)
+{
+ static int once;
+ if (!once++) FIXME("(%p, %p): stub\n", arg1, arg2);
+ return FALSE;
+}
--
2.7.1

View File

@@ -1,14 +1,14 @@
From aefdbc0fabb66052164ecd45fecfb0b947a130ac Mon Sep 17 00:00:00 2001
From 0c9c23711c9608551eebd1d60159e2fe523347f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 12 Apr 2016 01:02:34 +0200
Subject: uiautomationcore: Add dll and stub some functions.
---
dlls/uiautomationcore/Makefile.in | 1 +
dlls/uiautomationcore/uia_main.c | 89 ++++++++++++++++++++++++++++-
dlls/uiautomationcore/uiautomationcore.spec | 14 +++--
include/uiautomationcoreapi.h | 16 ++++++
4 files changed, 114 insertions(+), 6 deletions(-)
dlls/uiautomationcore/uia_main.c | 57 +++++++++++++++++++++++++----
dlls/uiautomationcore/uiautomationcore.spec | 6 +++
include/uiautomationcoreapi.h | 9 +++--
4 files changed, 61 insertions(+), 12 deletions(-)
diff --git a/dlls/uiautomationcore/Makefile.in b/dlls/uiautomationcore/Makefile.in
index 78d6254a015..029fc2e4995 100644
@@ -21,7 +21,7 @@ index 78d6254a015..029fc2e4995 100644
C_SRCS = \
uia_main.c
diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c
index 994d8e6080b..f1429faeff9 100644
index 31b7d3e7aa1..ff0506dc7d9 100644
--- a/dlls/uiautomationcore/uia_main.c
+++ b/dlls/uiautomationcore/uia_main.c
@@ -1,4 +1,5 @@
@@ -30,20 +30,15 @@ index 994d8e6080b..f1429faeff9 100644
* Copyright 2017 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
@@ -16,7 +17,11 @@
@@ -16,6 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "uiautomationcore.h"
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#define COBJMACROS
+#include "uiautomationcoreapi.h"
#include "uiautomation.h"
#include "wine/debug.h"
@@ -37,11 +42,91 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, void *lpv)
@@ -37,12 +39,51 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, void *lpv)
return TRUE;
}
@@ -85,47 +80,6 @@ index 994d8e6080b..f1429faeff9 100644
+};
+
+static IUnknown dummy = { &dummy_Vtbl };
+
+/***********************************************************************
+ * UiaLookupId (uiautomationcore.@)
+ */
+int WINAPI UiaLookupId(AutomationIdentifierType type, const GUID *guid)
+{
+ FIXME("(%d, %s)\n", type, debugstr_guid(guid));
+ return 1;
+}
+
+/***********************************************************************
+ * UiaGetReservedMixedAttributeValue (uiautomationcore.@)
+ */
+HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value)
+{
+ FIXME("(%p): stub\n", value);
+
+ *value = &dummy;
+ return S_OK;
+}
+
+/***********************************************************************
+ * UiaGetReservedNotSupportedValue (uiautomationcore.@)
+ */
+HRESULT WINAPI UiaGetReservedNotSupportedValue(IUnknown **value)
+{
+ FIXME("(%p): stub\n", value);
+
+ *value = &dummy;
+ return S_OK;
+}
+
+/***********************************************************************
+ * UiaReturnRawElementProvider (uiautomationcore.@)
+ */
+LRESULT WINAPI UiaReturnRawElementProvider(HWND hwnd, WPARAM wparam, LPARAM lparam,
+ IRawElementProviderSimple *provider)
+{
+ FIXME("(%p, %lx, %lx, %p): stub\n", hwnd, wparam, lparam, provider);
+ return 0;
+}
+
/***********************************************************************
* UiaClientsAreListening (uiautomationcore.@)
@@ -136,11 +90,54 @@ index 994d8e6080b..f1429faeff9 100644
+ FIXME("(): stub\n");
return FALSE;
}
@@ -51,8 +92,8 @@ BOOL WINAPI UiaClientsAreListening(void)
*/
HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value)
{
- FIXME("(%p) stub!\n", value);
- *value = NULL;
+ FIXME("(%p): stub!\n", value);
+ *value = &dummy;
return S_OK;
}
@@ -61,17 +102,17 @@ HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value)
*/
HRESULT WINAPI UiaGetReservedNotSupportedValue(IUnknown **value)
{
- FIXME("(%p) stub!\n", value);
- *value = NULL;
+ FIXME("(%p): stub!\n", value);
+ *value = &dummy;
return S_OK;
}
/***********************************************************************
* UiaLookupId (uiautomationcore.@)
*/
-int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid)
+int WINAPI UiaLookupId(AutomationIdentifierType type, const GUID *guid)
{
- FIXME("(%d, %s) stub!\n", type, debugstr_guid(guid));
+ FIXME("(%d, %s): stub!\n", type, debugstr_guid(guid));
return 1;
}
@@ -81,7 +122,7 @@ int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid)
LRESULT WINAPI UiaReturnRawElementProvider(HWND hwnd, WPARAM wParam,
LPARAM lParam, IRawElementProviderSimple *elprov)
{
- FIXME("(%p, %lx, %lx, %p) stub!\n", hwnd, wParam, lParam, elprov);
+ FIXME("(%p, %lx, %lx, %p): stub!\n", hwnd, wParam, lParam, elprov);
return 0;
}
diff --git a/dlls/uiautomationcore/uiautomationcore.spec b/dlls/uiautomationcore/uiautomationcore.spec
index 3026001b6b7..221711c41d2 100644
index 48a06b2fdad..8e676adaae1 100644
--- a/dlls/uiautomationcore/uiautomationcore.spec
+++ b/dlls/uiautomationcore/uiautomationcore.spec
@@ -53,14 +53,16 @@
@@ -53,6 +53,8 @@
@ stub TransformPattern_Rotate
@ stub UiaAddEvent
@ stdcall UiaClientsAreListening()
@@ -149,85 +146,56 @@ index 3026001b6b7..221711c41d2 100644
@ stub UiaEventAddWindow
@ stub UiaEventRemoveWindow
@ stub UiaFind
@ stub UiaGetErrorDescription
@ stub UiaGetPatternProvider
@ stub UiaGetPropertyValue
-@ stub UiaGetReservedMixedAttributeValue
-@ stub UiaGetReservedNotSupportedValue
+@ stdcall UiaGetReservedMixedAttributeValue(ptr)
+@ stdcall UiaGetReservedNotSupportedValue(ptr)
@ stub UiaGetRootNode
@ stub UiaGetRuntimeId
@ stub UiaGetUpdatedCache
@@ -69,7 +71,8 @@
@@ -69,6 +71,7 @@
@ stub UiaHUiaNodeFromVariant
@ stub UiaHasServerSideProvider
@ stub UiaHostProviderFromHwnd
-@ stub UiaLookupId
+@ stub UiaIAccessibleFromProvider
+@ stdcall UiaLookupId(long ptr)
@ stdcall UiaLookupId(long ptr)
@ stub UiaNavigate
@ stub UiaNodeFromFocus
@ stub UiaNodeFromHandle
@@ -77,13 +80,16 @@
@@ -77,10 +80,13 @@
@ stub UiaNodeFromProvider
@ stub UiaNodeRelease
@ stub UiaPatternRelease
+@ stub UiaProviderForNonClient
+@ stub UiaProviderFromIAccessible
@ stub UiaRaiseAsyncContentLoadedEvent
@ stub UiaRaiseAutomationEvent
@ stdcall UiaRaiseAutomationEvent(ptr long)
@ stub UiaRaiseAutomationPropertyChangedEvent
@ stub UiaRaiseStructureChangedEvent
+@ stub UiaRaiseTextEditTextChangedEvent
@ stub UiaRegisterProviderCallback
@ stub UiaRemoveEvent
-@ stub UiaReturnRawElementProvider
+@ stdcall UiaReturnRawElementProvider(long long long ptr)
@ stub UiaSetFocus
@ stub UiaTextRangeRelease
@ stub ValuePattern_SetValue
@ stdcall UiaReturnRawElementProvider(long long long ptr)
diff --git a/include/uiautomationcoreapi.h b/include/uiautomationcoreapi.h
index 340f5005db4..b9107ceb792 100644
index 12c509fbec8..5ddf4b67e3d 100644
--- a/include/uiautomationcoreapi.h
+++ b/include/uiautomationcoreapi.h
@@ -19,6 +19,8 @@
#ifndef _INC_UIAUTOMATIONCOREAPI
#define _INC_UIAUTOMATIONCOREAPI
+#include "uiautomationcore.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -34,6 +36,16 @@ extern "C" {
#define UiaAppendRuntimeId 3
#define UiaRootObjectId -25
@@ -39,18 +39,19 @@ DECLARE_HANDLE(HUIAPATTERNOBJECT);
DECLARE_HANDLE(HUIATEXTRANGE);
DECLARE_HANDLE(HUIAEVENT);
-enum AutomationIdentifierType
+typedef enum AutomationIdentifierType
+{
+ AutomationIdentifierType_Property,
+ AutomationIdentifierType_Pattern,
+ AutomationIdentifierType_Event,
+ AutomationIdentifierType_ControlType,
{
AutomationIdentifierType_Property,
AutomationIdentifierType_Pattern,
AutomationIdentifierType_Event,
AutomationIdentifierType_ControlType,
- AutomationIdentifierType_TextAttribute
-};
+ AutomationIdentifierType_TextAttribute,
+ AutomationIdentifierType_LandmarkType,
+} AutomationIdentifierType;
+
DECLARE_HANDLE(HUIANODE);
DECLARE_HANDLE(HUIAPATTERNOBJECT);
DECLARE_HANDLE(HUIATEXTRANGE);
@@ -41,6 +53,10 @@ DECLARE_HANDLE(HUIAEVENT);
BOOL WINAPI UiaPatternRelease(HUIAPATTERNOBJECT hobj);
BOOL WINAPI UiaTextRangeRelease(HUIATEXTRANGE hobj);
HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value);
HRESULT WINAPI UiaGetReservedNotSupportedValue(IUnknown **value);
-int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid);
+int WINAPI UiaLookupId(AutomationIdentifierType type, const GUID *guid);
+HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value);
+HRESULT WINAPI UiaGetReservedNotSupportedValue(IUnknown **value);
+LRESULT WINAPI UiaReturnRawElementProvider(HWND hwnd, WPARAM wparam, LPARAM lparam, IRawElementProviderSimple *provider);
#ifdef __cplusplus
}
BOOL WINAPI UiaPatternRelease(HUIAPATTERNOBJECT hobj);
HRESULT WINAPI UiaRaiseAutomationEvent(IRawElementProviderSimple *provider, EVENTID id);
LRESULT WINAPI UiaReturnRawElementProvider(HWND hwnd, WPARAM wParam, LPARAM lParam, IRawElementProviderSimple *elprov);
--
2.11.0
2.12.2

View File

@@ -20,6 +20,5 @@ Fixes: Add kernelbase dll
Fixes: Add iertutil dll
Fixes: Add shcore dll
Fixes: [40451] Add feclient dll
Depends: kernel32-GetCurrentPackageFamilyName
Depends: combase-RoApi
Depends: kernel32-UmsStubs

View File

@@ -1,18 +1,18 @@
From 489a67ec803b382248134be53f3449c206e208ff Mon Sep 17 00:00:00 2001
From b05734fe9746e5dbbfcf248b2b892d6e09006956 Mon Sep 17 00:00:00 2001
From: Hans Leidekker <hans@codeweavers.com>
Date: Mon, 19 Dec 2016 19:38:52 +0100
Subject: bcrypt: Add AES provider.
---
dlls/bcrypt/bcrypt.spec | 10 +-
dlls/bcrypt/bcrypt_main.c | 347 ++++++++++++++++++++++++++++++++++++++++++++-
dlls/bcrypt/bcrypt_main.c | 353 ++++++++++++++++++++++++++++++++++++++++++++-
dlls/bcrypt/tests/bcrypt.c | 18 +--
dlls/ncrypt/ncrypt.spec | 10 +-
include/bcrypt.h | 3 +
5 files changed, 357 insertions(+), 31 deletions(-)
5 files changed, 361 insertions(+), 33 deletions(-)
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
index e299fe0cce8..962953e509b 100644
index a1cce4423dc..9ecd21d767c 100644
--- a/dlls/bcrypt/bcrypt.spec
+++ b/dlls/bcrypt/bcrypt.spec
@@ -5,15 +5,15 @@
@@ -27,7 +27,7 @@ index e299fe0cce8..962953e509b 100644
-@ stub BCryptDestroyKey
+@ stdcall BCryptDestroyKey(ptr)
@ stub BCryptDestroySecret
@ stub BCryptDuplicateHash
@ stdcall BCryptDuplicateHash(ptr ptr ptr long long)
@ stub BCryptDuplicateKey
-@ stub BCryptEncrypt
+@ stdcall BCryptEncrypt(ptr ptr long ptr ptr long ptr long ptr long)
@@ -53,10 +53,10 @@ index e299fe0cce8..962953e509b 100644
@ stub BCryptUnregisterConfigChangeNotify
@ stub BCryptUnregisterProvider
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 6023c942e49..5867dbdc3fa 100644
index 80d7ddb9466..247b3dc7327 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -49,6 +49,10 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
@@ -51,6 +51,10 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
static void *libgnutls_handle;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
@@ -67,7 +67,7 @@ index 6023c942e49..5867dbdc3fa 100644
MAKE_FUNCPTR(gnutls_global_deinit);
MAKE_FUNCPTR(gnutls_global_init);
MAKE_FUNCPTR(gnutls_global_set_log_function);
@@ -84,6 +88,10 @@ static BOOL gnutls_initialize(void)
@@ -80,6 +84,10 @@ static BOOL gnutls_initialize(void)
goto fail; \
}
@@ -78,7 +78,7 @@ index 6023c942e49..5867dbdc3fa 100644
LOAD_FUNCPTR(gnutls_global_deinit)
LOAD_FUNCPTR(gnutls_global_init)
LOAD_FUNCPTR(gnutls_global_set_log_function)
@@ -138,6 +146,7 @@ NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG dwAlgOperations, ULONG *pAlgCount,
@@ -128,6 +136,7 @@ NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG dwAlgOperations, ULONG *pAlgCount,
#define MAGIC_ALG (('A' << 24) | ('L' << 16) | ('G' << 8) | '0')
#define MAGIC_HASH (('H' << 24) | ('A' << 16) | ('S' << 8) | 'H')
@@ -86,7 +86,7 @@ index 6023c942e49..5867dbdc3fa 100644
struct object
{
ULONG magic;
@@ -145,6 +154,7 @@ struct object
@@ -135,6 +144,7 @@ struct object
enum alg_id
{
@@ -94,15 +94,15 @@ index 6023c942e49..5867dbdc3fa 100644
ALG_ID_MD5,
ALG_ID_RNG,
ALG_ID_SHA1,
@@ -157,6 +167,7 @@ static const struct {
ULONG hash_length;
@@ -152,6 +162,7 @@ static const struct {
ULONG block_bits;
const WCHAR *alg_name;
} alg_props[] = {
+ /* ALG_ID_AES */ { 0, BCRYPT_AES_ALGORITHM },
/* ALG_ID_MD5 */ { 16, BCRYPT_MD5_ALGORITHM },
/* ALG_ID_RNG */ { 0, BCRYPT_RNG_ALGORITHM },
/* ALG_ID_SHA1 */ { 20, BCRYPT_SHA1_ALGORITHM },
@@ -215,11 +226,10 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG c
+ /* ALG_ID_AES */ { 654, 0, 0, BCRYPT_AES_ALGORITHM },
/* ALG_ID_MD5 */ { 274, 16, 512, BCRYPT_MD5_ALGORITHM },
/* ALG_ID_RNG */ { 0, 0, 0, BCRYPT_RNG_ALGORITHM },
/* ALG_ID_SHA1 */ { 278, 20, 512, BCRYPT_SHA1_ALGORITHM },
@@ -210,11 +221,10 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG c
NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR id, LPCWSTR implementation, DWORD flags )
{
@@ -115,7 +115,7 @@ index 6023c942e49..5867dbdc3fa 100644
TRACE( "%p, %s, %s, %08x\n", handle, wine_dbgstr_w(id), wine_dbgstr_w(implementation), flags );
if (!handle || !id) return STATUS_INVALID_PARAMETER;
@@ -229,9 +239,10 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
@@ -224,9 +234,10 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
return STATUS_NOT_IMPLEMENTED;
}
@@ -127,48 +127,36 @@ index 6023c942e49..5867dbdc3fa 100644
else if (!strcmpW( id, BCRYPT_SHA256_ALGORITHM )) alg_id = ALG_ID_SHA256;
else if (!strcmpW( id, BCRYPT_SHA384_ALGORITHM )) alg_id = ALG_ID_SHA384;
else if (!strcmpW( id, BCRYPT_SHA512_ALGORITHM )) alg_id = ALG_ID_SHA512;
@@ -430,7 +441,6 @@ static NTSTATUS hash_finish( struct hash *hash, UCHAR *output, ULONG size )
static NTSTATUS hmac_finish( struct hash *hash, UCHAR *output, ULONG size )
{
CCHmacFinal( &hash->u.hmac_ctx, output );
-
return STATUS_SUCCESS;
}
#elif defined(HAVE_GNUTLS_HASH)
@@ -586,12 +596,19 @@ static NTSTATUS hmac_finish( struct hash *hash, UCHAR *output, ULONG size )
}
#endif
+#ifdef _WIN64
+#define OBJECT_LENGTH_AES 654
+#else
+#define OBJECT_LENGTH_AES 618
+#endif
#define OBJECT_LENGTH_MD5 274
#define OBJECT_LENGTH_SHA1 278
#define OBJECT_LENGTH_SHA256 286
#define OBJECT_LENGTH_SHA384 382
#define OBJECT_LENGTH_SHA512 382
@@ -388,6 +399,8 @@ struct hash
struct hash_impl inner;
};
+#define BLOCK_LENGTH_AES 16
+
static NTSTATUS generic_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *buf, ULONG size, ULONG *ret_size )
{
if (!strcmpW( prop, BCRYPT_HASH_LENGTH ))
@@ -628,6 +645,34 @@ static NTSTATUS get_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *buf,
if (!strcmpW( prop, BCRYPT_OBJECT_LENGTH ))
@@ -432,9 +445,43 @@ static NTSTATUS get_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *buf,
NTSTATUS status;
switch (id)
{
status = generic_alg_property( id, prop, buf, size, ret_size );
- if (status == STATUS_NOT_IMPLEMENTED)
- FIXME( "unsupported property %s\n", debugstr_w(prop) );
- return status;
+ if (status != STATUS_NOT_IMPLEMENTED)
+ return status;
+
+ switch (id)
+ {
+ case ALG_ID_AES:
+ if (!strcmpW( prop, BCRYPT_BLOCK_LENGTH ))
+ {
+ value = BLOCK_LENGTH_AES;
+ break;
+ }
+ if (!strcmpW( prop, BCRYPT_OBJECT_LENGTH ))
+ {
+ value = OBJECT_LENGTH_AES;
+ break;
+ *ret_size = sizeof(ULONG);
+ if (size < sizeof(ULONG))
+ return STATUS_BUFFER_TOO_SMALL;
+ if (buf)
+ *(ULONG *)buf = BLOCK_LENGTH_AES;
+ return STATUS_SUCCESS;
+ }
+ if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
+ {
@@ -184,13 +172,18 @@ index 6023c942e49..5867dbdc3fa 100644
+ return STATUS_BUFFER_TOO_SMALL;
+ }
+ }
+ FIXME( "unsupported aes algorithm property %s\n", debugstr_w(prop) );
+ return STATUS_NOT_IMPLEMENTED;
+ break;
+
case ALG_ID_MD5:
if (!strcmpW( prop, BCRYPT_OBJECT_LENGTH ))
{
@@ -731,6 +776,13 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
+ default:
+ break;
+ }
+
+ FIXME( "unsupported property %s\n", debugstr_w(prop) );
+ return STATUS_NOT_IMPLEMENTED;
}
static NTSTATUS get_hash_property( enum alg_id id, const WCHAR *prop, UCHAR *buf, ULONG size, ULONG *ret_size )
@@ -474,6 +521,13 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
}
}
@@ -204,7 +197,7 @@ index 6023c942e49..5867dbdc3fa 100644
NTSTATUS WINAPI BCryptCreateHash( BCRYPT_ALG_HANDLE algorithm, BCRYPT_HASH_HANDLE *handle, UCHAR *object, ULONG objectlen,
UCHAR *secret, ULONG secretlen, ULONG flags )
{
@@ -854,6 +906,293 @@ NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE algorithm, UCHAR *secret, ULONG se
@@ -632,6 +686,293 @@ NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE algorithm, UCHAR *secret, ULONG se
return BCryptDestroyHash( handle );
}
@@ -499,10 +492,10 @@ index 6023c942e49..5867dbdc3fa 100644
{
switch (reason)
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 422f2cfd340..d2df74ed919 100644
index 42312b45b78..4d5891b461b 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -780,7 +780,7 @@ static void test_aes(void)
@@ -704,7 +704,7 @@ static void test_aes(void)
ULONG size, len;
UCHAR mode[64];
NTSTATUS ret;
@@ -511,7 +504,7 @@ index 422f2cfd340..d2df74ed919 100644
alg = NULL;
ret = pBCryptOpenAlgorithmProvider(&alg, BCRYPT_AES_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
@@ -814,7 +814,6 @@ todo_wine {
@@ -738,7 +738,6 @@ todo_wine {
ret = pBCryptCloseAlgorithmProvider(alg, 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
}
@@ -519,7 +512,7 @@ index 422f2cfd340..d2df74ed919 100644
static void test_BCryptGenerateSymmetricKey(void)
{
@@ -833,11 +832,6 @@ static void test_BCryptGenerateSymmetricKey(void)
@@ -757,11 +756,6 @@ static void test_BCryptGenerateSymmetricKey(void)
NTSTATUS ret;
ret = pBCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
@@ -531,7 +524,7 @@ index 422f2cfd340..d2df74ed919 100644
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
len = size = 0xdeadbeef;
@@ -922,11 +916,6 @@ static void test_BCryptEncrypt(void)
@@ -846,11 +840,6 @@ static void test_BCryptEncrypt(void)
NTSTATUS ret;
ret = pBCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
@@ -543,7 +536,7 @@ index 422f2cfd340..d2df74ed919 100644
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
len = 0xdeadbeef;
@@ -1013,11 +1002,6 @@ static void test_BCryptDecrypt(void)
@@ -937,11 +926,6 @@ static void test_BCryptDecrypt(void)
NTSTATUS ret;
ret = pBCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
@@ -556,7 +549,7 @@ index 422f2cfd340..d2df74ed919 100644
len = 0xdeadbeef;
diff --git a/dlls/ncrypt/ncrypt.spec b/dlls/ncrypt/ncrypt.spec
index 04127608d68..60b7eb37075 100644
index 6e871a5d6b8..1a78853bf49 100644
--- a/dlls/ncrypt/ncrypt.spec
+++ b/dlls/ncrypt/ncrypt.spec
@@ -5,17 +5,17 @@
@@ -573,7 +566,7 @@ index 04127608d68..60b7eb37075 100644
-@ stub BCryptDestroyKey
+@ stdcall BCryptDestroyKey(ptr) bcrypt.BCryptDestroyKey
@ stub BCryptDestroySecret
@ stub BCryptDuplicateHash
@ stdcall BCryptDuplicateHash(ptr ptr ptr long long) bcrypt.BCryptDuplicateHash
@ stub BCryptDuplicateKey
-@ stub BCryptEncrypt
+@ stdcall BCryptEncrypt(ptr ptr long ptr ptr long ptr long ptr long) bcrypt.BCryptEncrypt

View File

@@ -1,469 +0,0 @@
From f527689b793100c79654ac5d6c1376d128ca3175 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 19 Dec 2016 23:58:52 +0100
Subject: bcrypt: Directly implement hmac computation.
---
dlls/bcrypt/bcrypt_main.c | 277 +++++++++++++++++-----------------------------
1 file changed, 104 insertions(+), 173 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 937bdf7..af2314a 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -60,9 +60,6 @@ MAKE_FUNCPTR(gnutls_global_set_log_level);
MAKE_FUNCPTR(gnutls_hash);
MAKE_FUNCPTR(gnutls_hash_deinit);
MAKE_FUNCPTR(gnutls_hash_init);
-MAKE_FUNCPTR(gnutls_hmac);
-MAKE_FUNCPTR(gnutls_hmac_deinit);
-MAKE_FUNCPTR(gnutls_hmac_init);
MAKE_FUNCPTR(gnutls_perror);
#undef MAKE_FUNCPTR
@@ -99,9 +96,6 @@ static BOOL gnutls_initialize(void)
LOAD_FUNCPTR(gnutls_hash);
LOAD_FUNCPTR(gnutls_hash_deinit);
LOAD_FUNCPTR(gnutls_hash_init);
- LOAD_FUNCPTR(gnutls_hmac);
- LOAD_FUNCPTR(gnutls_hmac_deinit);
- LOAD_FUNCPTR(gnutls_hmac_init);
LOAD_FUNCPTR(gnutls_perror)
#undef LOAD_FUNCPTR
@@ -163,6 +157,8 @@ enum alg_id
ALG_ID_SHA512
};
+#define MAX_HASH_OUTPUT_BYTES 64
+
static const struct {
ULONG hash_length;
const WCHAR *alg_name;
@@ -183,6 +179,19 @@ struct algorithm
BOOL hmac;
};
+#define MAX_HASH_BLOCK_BITS 1024
+
+int alg_block_bits[] =
+{
+ /* ALG_ID_AES */ 0,
+ /* ALG_ID_MD5 */ 512,
+ /* ALG_ID_RNG */ 0,
+ /* ALG_ID_SHA1 */ 512,
+ /* ALG_ID_SHA256 */ 512,
+ /* ALG_ID_SHA384 */ 1024,
+ /* ALG_ID_SHA512 */ 1024
+};
+
NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG count, ULONG flags)
{
const DWORD supported_flags = BCRYPT_USE_SYSTEM_PREFERRED_RNG;
@@ -289,24 +298,20 @@ NTSTATUS WINAPI BCryptGetFipsAlgorithmMode(BOOLEAN *enabled)
}
#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
-struct hash
+struct hash_impl
{
- struct object hdr;
- enum alg_id alg_id;
- BOOL hmac;
union
{
CC_MD5_CTX md5_ctx;
CC_SHA1_CTX sha1_ctx;
CC_SHA256_CTX sha256_ctx;
CC_SHA512_CTX sha512_ctx;
- CCHmacContext hmac_ctx;
} u;
};
-static NTSTATUS hash_init( struct hash *hash )
+static NTSTATUS hash_init( struct hash_impl *hash, enum alg_id alg_id )
{
- switch (hash->alg_id)
+ switch (alg_id)
{
case ALG_ID_MD5:
CC_MD5_Init( &hash->u.md5_ctx );
@@ -329,50 +334,16 @@ static NTSTATUS hash_init( struct hash *hash )
break;
default:
- ERR( "unhandled id %u\n", hash->alg_id );
+ ERR( "unhandled id %u\n", alg_id );
return STATUS_NOT_IMPLEMENTED;
}
return STATUS_SUCCESS;
}
-static NTSTATUS hmac_init( struct hash *hash, UCHAR *key, ULONG key_size )
+static NTSTATUS hash_update( struct hash_impl *hash, enum alg_id alg_id,
+ UCHAR *input, ULONG size )
{
- CCHmacAlgorithm cc_algorithm;
- switch (hash->alg_id)
- {
- case ALG_ID_MD5:
- cc_algorithm = kCCHmacAlgMD5;
- break;
-
- case ALG_ID_SHA1:
- cc_algorithm = kCCHmacAlgSHA1;
- break;
-
- case ALG_ID_SHA256:
- cc_algorithm = kCCHmacAlgSHA256;
- break;
-
- case ALG_ID_SHA384:
- cc_algorithm = kCCHmacAlgSHA384;
- break;
-
- case ALG_ID_SHA512:
- cc_algorithm = kCCHmacAlgSHA512;
- break;
-
- default:
- ERR( "unhandled id %u\n", hash->alg_id );
- return STATUS_NOT_IMPLEMENTED;
- }
-
- CCHmacInit( &hash->u.hmac_ctx, cc_algorithm, key, key_size );
- return STATUS_SUCCESS;
-}
-
-
-static NTSTATUS hash_update( struct hash *hash, UCHAR *input, ULONG size )
-{
- switch (hash->alg_id)
+ switch (alg_id)
{
case ALG_ID_MD5:
CC_MD5_Update( &hash->u.md5_ctx, input, size );
@@ -395,21 +366,16 @@ static NTSTATUS hash_update( struct hash *hash, UCHAR *input, ULONG size )
break;
default:
- ERR( "unhandled id %u\n", hash->alg_id );
+ ERR( "unhandled id %u\n", alg_id );
return STATUS_NOT_IMPLEMENTED;
}
return STATUS_SUCCESS;
}
-static NTSTATUS hmac_update( struct hash *hash, UCHAR *input, ULONG size )
-{
- CCHmacUpdate( &hash->u.hmac_ctx, input, size );
- return STATUS_SUCCESS;
-}
-
-static NTSTATUS hash_finish( struct hash *hash, UCHAR *output, ULONG size )
+static NTSTATUS hash_finish( struct hash_impl *hash, enum alg_id alg_id,
+ UCHAR *output, ULONG size )
{
- switch (hash->alg_id)
+ switch (alg_id)
{
case ALG_ID_MD5:
CC_MD5_Final( output, &hash->u.md5_ctx );
@@ -432,37 +398,25 @@ static NTSTATUS hash_finish( struct hash *hash, UCHAR *output, ULONG size )
break;
default:
- ERR( "unhandled id %u\n", hash->alg_id );
+ ERR( "unhandled id %u\n", alg_id );
break;
}
return STATUS_SUCCESS;
}
-static NTSTATUS hmac_finish( struct hash *hash, UCHAR *output, ULONG size )
-{
- CCHmacFinal( &hash->u.hmac_ctx, output );
- return STATUS_SUCCESS;
-}
#elif defined(HAVE_GNUTLS_HASH)
-struct hash
+struct hash_impl
{
- struct object hdr;
- enum alg_id alg_id;
- BOOL hmac;
- union
- {
- gnutls_hash_hd_t hash_handle;
- gnutls_hmac_hd_t hmac_handle;
- } u;
+ gnutls_hash_hd_t hash_handle;
};
-static NTSTATUS hash_init( struct hash *hash )
+static NTSTATUS hash_init( struct hash_impl *hash, enum alg_id alg_id )
{
gnutls_digest_algorithm_t alg;
if (!libgnutls_handle) return STATUS_INTERNAL_ERROR;
- switch (hash->alg_id)
+ switch (alg_id)
{
case ALG_ID_MD5:
alg = GNUTLS_DIG_MD5;
@@ -484,117 +438,63 @@ static NTSTATUS hash_init( struct hash *hash )
break;
default:
- ERR( "unhandled id %u\n", hash->alg_id );
- return STATUS_NOT_IMPLEMENTED;
- }
-
- if (pgnutls_hash_init( &hash->u.hash_handle, alg )) return STATUS_INTERNAL_ERROR;
- return STATUS_SUCCESS;
-}
-
-static NTSTATUS hmac_init( struct hash *hash, UCHAR *key, ULONG key_size )
-{
- gnutls_mac_algorithm_t alg;
-
- if (!libgnutls_handle) return STATUS_INTERNAL_ERROR;
-
- switch (hash->alg_id)
- {
- case ALG_ID_MD5:
- alg = GNUTLS_MAC_MD5;
- break;
- case ALG_ID_SHA1:
- alg = GNUTLS_MAC_SHA1;
- break;
-
- case ALG_ID_SHA256:
- alg = GNUTLS_MAC_SHA256;
- break;
-
- case ALG_ID_SHA384:
- alg = GNUTLS_MAC_SHA384;
- break;
-
- case ALG_ID_SHA512:
- alg = GNUTLS_MAC_SHA512;
- break;
-
- default:
- ERR( "unhandled id %u\n", hash->alg_id );
+ ERR( "unhandled id %u\n", alg_id );
return STATUS_NOT_IMPLEMENTED;
}
- if (pgnutls_hmac_init( &hash->u.hmac_handle, alg, key, key_size )) return STATUS_INTERNAL_ERROR;
- return STATUS_SUCCESS;
-}
-
-static NTSTATUS hash_update( struct hash *hash, UCHAR *input, ULONG size )
-{
- if (pgnutls_hash( hash->u.hash_handle, input, size )) return STATUS_INTERNAL_ERROR;
+ if (pgnutls_hash_init( &hash->hash_handle, alg )) return STATUS_INTERNAL_ERROR;
return STATUS_SUCCESS;
}
-static NTSTATUS hmac_update( struct hash *hash, UCHAR *input, ULONG size )
+static NTSTATUS hash_update( struct hash_impl *hash, enum alg_id alg_id,
+ UCHAR *input, ULONG size )
{
- if (pgnutls_hmac( hash->u.hmac_handle, input, size )) return STATUS_INTERNAL_ERROR;
+ if (pgnutls_hash( hash->hash_handle, input, size )) return STATUS_INTERNAL_ERROR;
return STATUS_SUCCESS;
}
-static NTSTATUS hash_finish( struct hash *hash, UCHAR *output, ULONG size )
+static NTSTATUS hash_finish( struct hash_impl *hash, enum alg_id alg_id,
+ UCHAR *output, ULONG size )
{
- pgnutls_hash_deinit( hash->u.hash_handle, output );
+ pgnutls_hash_deinit( hash->hash_handle, output );
return STATUS_SUCCESS;
}
-static NTSTATUS hmac_finish( struct hash *hash, UCHAR *output, ULONG size )
-{
- pgnutls_hmac_deinit( hash->u.hmac_handle, output );
- return STATUS_SUCCESS;
-}
#else
-struct hash
+struct hash_impl
{
- struct object hdr;
- BOOL hmac;
- enum alg_id alg_id;
-};
-static NTSTATUS hash_init( struct hash *hash )
-{
- ERR( "support for hashes not available at build time\n" );
- return STATUS_NOT_IMPLEMENTED;
-}
-
-static NTSTATUS hmac_init( struct hash *hash, UCHAR *key, ULONG key_size )
-{
- ERR( "support for hashes not available at build time\n" );
- return STATUS_NOT_IMPLEMENTED;
-}
+};
-static NTSTATUS hash_update( struct hash *hash, UCHAR *input, ULONG size )
+static NTSTATUS hash_init( struct hash_impl *hash, enum alg_id alg_id )
{
ERR( "support for hashes not available at build time\n" );
return STATUS_NOT_IMPLEMENTED;
}
-static NTSTATUS hmac_update( struct hash *hash, UCHAR *input, ULONG size )
+static NTSTATUS hash_update( struct hash_impl *hash, enum alg_id alg_id,
+ UCHAR *input, ULONG size )
{
ERR( "support for hashes not available at build time\n" );
return STATUS_NOT_IMPLEMENTED;
}
-static NTSTATUS hash_finish( struct hash *hash, UCHAR *output, ULONG size )
+static NTSTATUS hash_finish( struct hash_impl *hash, enum alg_id alg_id,
+ UCHAR *output, ULONG size )
{
ERR( "support for hashes not available at build time\n" );
return STATUS_NOT_IMPLEMENTED;
}
+#endif
-static NTSTATUS hmac_finish( struct hash *hash, UCHAR *output, ULONG size )
+struct hash
{
- ERR( "support for hashes not available at build time\n" );
- return STATUS_NOT_IMPLEMENTED;
-}
-#endif
+ struct object hdr;
+ enum alg_id alg_id;
+ BOOL hmac;
+ struct hash_impl outer;
+ struct hash_impl inner;
+};
#ifdef _WIN64
#define OBJECT_LENGTH_AES 654
@@ -787,8 +687,11 @@ NTSTATUS WINAPI BCryptCreateHash( BCRYPT_ALG_HANDLE algorithm, BCRYPT_HASH_HANDL
UCHAR *secret, ULONG secretlen, ULONG flags )
{
struct algorithm *alg = algorithm;
+ UCHAR buffer[MAX_HASH_BLOCK_BITS / 8];
struct hash *hash;
+ int block_bytes;
NTSTATUS status;
+ int i;
TRACE( "%p, %p, %p, %u, %p, %u, %08x - stub\n", algorithm, handle, object, objectlen,
secret, secretlen, flags );
@@ -806,17 +709,45 @@ NTSTATUS WINAPI BCryptCreateHash( BCRYPT_ALG_HANDLE algorithm, BCRYPT_HASH_HANDL
hash->alg_id = alg->id;
hash->hmac = alg->hmac;
- if (hash->hmac)
+ status = hash_init( &hash->inner, hash->alg_id );
+ if (status || !hash->hmac) goto end;
+ status = hash_init( &hash->outer, hash->alg_id );
+ if (status) goto end;
+
+ /* reduce key size if too big */
+ block_bytes = alg_block_bits[hash->alg_id] / 8;
+ if (secretlen > block_bytes)
{
- status = hmac_init( hash, secret, secretlen );
+ struct hash_impl temp;
+ status = hash_init( &temp, hash->alg_id );
+ if (status) goto end;
+ status = hash_update( &temp, hash->alg_id, secret, secretlen );
+ if (status) goto end;
+ memset( buffer, 0, block_bytes );
+ status = hash_finish( &temp, hash->alg_id, buffer, alg_props[hash->alg_id].hash_length );
+ if (status) goto end;
}
else
{
- status = hash_init( hash );
+ memset( buffer, 0, block_bytes );
+ memcpy( buffer, secret, secretlen );
}
+ /* initialize outer hash */
+ for (i = 0; i < block_bytes; i++)
+ buffer[i] ^= 0x5c;
+ status = hash_update( &hash->outer, hash->alg_id, buffer, block_bytes );
+ if (status) goto end;
+
+ /* initialize inner hash */
+ for (i = 0; i < block_bytes; i++)
+ buffer[i] ^= (0x5c ^ 0x36);
+ status = hash_update( &hash->inner, hash->alg_id, buffer, block_bytes );
+
+end:
if (status != STATUS_SUCCESS)
{
+ /* FIXME: call hash_finish to release resources */
HeapFree( GetProcessHeap(), 0, hash );
return status;
}
@@ -845,33 +776,33 @@ NTSTATUS WINAPI BCryptHashData( BCRYPT_HASH_HANDLE handle, UCHAR *input, ULONG s
if (!hash || hash->hdr.magic != MAGIC_HASH) return STATUS_INVALID_HANDLE;
if (!input) return STATUS_SUCCESS;
- if (hash->hmac)
- {
- return hmac_update( hash, input, size );
- }
- else
- {
- return hash_update( hash, input, size );
- }
+ return hash_update( &hash->inner, hash->alg_id, input, size );
}
NTSTATUS WINAPI BCryptFinishHash( BCRYPT_HASH_HANDLE handle, UCHAR *output, ULONG size, ULONG flags )
{
+ UCHAR buffer[MAX_HASH_OUTPUT_BYTES];
struct hash *hash = handle;
+ NTSTATUS status;
+ int hash_size;
TRACE( "%p, %p, %u, %08x\n", handle, output, size, flags );
if (!hash || hash->hdr.magic != MAGIC_HASH) return STATUS_INVALID_HANDLE;
if (!output) return STATUS_INVALID_PARAMETER;
- if (hash->hmac)
- {
- return hmac_finish( hash, output, size );
- }
- else
- {
- return hash_finish( hash, output, size );
- }
+ if (!hash->hmac)
+ return hash_finish( &hash->inner, hash->alg_id, output, size );
+
+ hash_size = alg_props[hash->alg_id].hash_length;
+
+ status = hash_finish( &hash->inner, hash->alg_id, buffer, hash_size);
+ if (status) return status;
+
+ status = hash_update( &hash->outer, hash->alg_id, buffer, hash_size);
+ if (status) return status;
+
+ return hash_finish( &hash->outer, hash->alg_id, output, size);
}
NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE algorithm, UCHAR *secret, ULONG secretlen,
--
2.9.0

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