Compare commits

...

133 Commits
show ... v3.13

Author SHA1 Message Date
Alistair Leslie-Hughes
44aadc3afc Release 3.13 2018-07-21 09:54:00 +10:00
Alistair Leslie-Hughes
18f4be0e03 Updated winepulse-PulseAudio_Support patchset 2018-07-20 08:34:16 +10:00
Alistair Leslie-Hughes
49025c255b Rebase against d265dd88cd93ce6ffe56c9cfd640b064d7c14e29 2018-07-19 09:41:42 +10:00
Alistair Leslie-Hughes
12be01bfc1 Updated winepulse-PulseAudio_Support 2018-07-18 09:47:02 +10:00
Alistair Leslie-Hughes
79f6a17908 Rebase against adb926d5a5032130d55e4d39316efdb11cc1fe1d 2018-07-17 08:25:25 +10:00
Alistair Leslie-Hughes
2b85113f61 Rebase against 414fe80aebe3850fd016da5cb883f4bfeab1c543 2018-07-14 11:41:23 +10:00
Alistair Leslie-Hughes
60e4f489f6 Rebase against 053a7e225c8190fd7416b3f3c3186f1ac230eeb3 2018-07-13 10:59:13 +10:00
Alistair Leslie-Hughes
fd81bd7755 Rebase against acb879c9d2feae69e8b5b1ede28523a29aef1b89 2018-07-12 10:17:14 +10:00
Alistair Leslie-Hughes
292a0e67f4 Added ddraw-Prevent_viewport_crash patchset 2018-07-11 10:57:01 +10:00
Alistair Leslie-Hughes
7993325086 Added wined3d-WINED3DFMT_B8G8R8X8_UNORM patchset 2018-07-11 09:41:05 +10:00
Alistair Leslie-Hughes
77ecb8ba3f Updated kernelbase-PathCchCombineEx patchset 2018-07-11 09:39:32 +10:00
Alistair Leslie-Hughes
d3bb80f8eb Updated xaudio2_7-WMA_support patchset 2018-07-11 09:38:22 +10:00
Alistair Leslie-Hughes
0b4011d95c Rebase against 3d5d8903b89803f5b2ec12a2d20ae9a171047fdc 2018-07-11 08:40:24 +10:00
Alistair Leslie-Hughes
23fd2d0f93 Release 3.12 2018-07-10 09:38:48 +10:00
Alistair Leslie-Hughes
f61b8570b8 Rebase against 8ef224fa43869a8c977921d6bec08863382d6e11 2018-07-10 09:02:41 +10:00
Zebediah Figura
738fd3fd35 Rebase against 80205232d3ece73d4cc6c7589cea893583aae0b1. 2018-07-07 01:01:40 +02:00
Zebediah Figura
8ed2ef6f5c Rebase against cb468b682d2b7d088d0607259affe1680b558e24.
Thanks to Henri Verbeet for his assistance.
2018-07-06 16:02:29 +02:00
Alistair Leslie-Hughes
686ab91ec6 Rebase against e7f5dc194aeb586bb516b5fd191ad6924c4fcdd3 2018-07-05 09:19:21 +10:00
Zebediah Figura
d53fc8ece0 Rebase against 3edbb2a4fdd2fb46a7af13c921bcd4bf8b7ab718. 2018-07-04 00:13:50 +02:00
Alistair Leslie-Hughes
a505e3815f Correct upstream commit sha 2018-07-03 08:57:59 +10:00
Zebediah Figura
51b6a46ce0 xaudio2_7-WMA_support: Also include libavcodec/libavutil CFLAGS.
Should hopefully fix build on some systems.

Also add dependency on other xaudio2 patch.
2018-07-02 21:07:42 +02:00
Alistair Leslie-Hughes
729a9ebadd Rebase against 86864486be64a277f6edf8e66709cd0f17a4eed9 2018-06-29 08:35:27 +10:00
Alistair Leslie-Hughes
4e57013325 Added wined3d-texture-blt-device patchset 2018-06-28 14:27:13 +10:00
Alistair Leslie-Hughes
19db07f062 Added xaudio2-WMA_support patchset 2018-06-28 14:26:16 +10:00
Alistair Leslie-Hughes
74b35082b3 Rebase against 6a04cf4a69205ddf6827fb2a4b97862fd1947c62 2018-06-28 08:30:08 +10:00
Alistair Leslie-Hughes
24f0fcf07d Remove Coverity patches
These patches are never going to be accepted upstream.

https://www.winehq.org/pipermail/wine-devel/2015-November/110396.html
2018-06-27 08:22:21 +10:00
Alistair Leslie-Hughes
59948639b6 Rebase against 85f1a79be8bbb9b62ad88e0d0fbf1e005fd3ba16 2018-06-27 08:20:14 +10:00
Alistair Leslie-Hughes
2bf4df0d11 Updated wintab32-improvements patchset 2018-06-26 21:07:52 +10:00
Alistair Leslie-Hughes
ba6b6642fb Rebase against 6d801377055911d914226a3c6af8d8637a63fa13 2018-06-26 08:16:59 +10:00
Alistair Leslie-Hughes
da5cec25df Release 3.11 2018-06-24 17:27:35 +10:00
Alistair Leslie-Hughes
5e51e13900 Rebase against 58c49279f5d5ac11c0af25053f47845203dffdec 2018-06-23 16:38:58 +10:00
Alistair Leslie-Hughes
82eedec6ed Updated d3dx9_36-DXTn patchset
Make dxtn library internal.
2018-06-23 15:28:52 +10:00
Alistair Leslie-Hughes
7c9f9bc0c1 Rebase against 9ef8fa2a0bfb559475e17d2562892085f0e2a90f 2018-06-22 11:30:35 +10:00
Zebediah Figura
c3a5e9290e Revert "winebuild-Fake_Dlls: Get rid of dependency on ntdll-User_Shared_Data."
This reverts commit c9eaabbba9.

ntdll-User_Shared_Data touches basically everything that uses shared data.
Trying to avoid any interdependency between these two is futile.
2018-06-20 21:52:57 -05:00
Zebediah Figura
01a9cda461 Revert "winebuild-Fake_Dlls: Reorder some lines to avoid collision with ntdll-User_Shared_Data."
This reverts commit b27ebc675a.
2018-06-20 21:52:32 -05:00
Zebediah Figura
7d7e852679 msi-Deferral: Add patchset. 2018-06-20 18:04:07 -05:00
Zebediah Figura
78878ee3b9 Rebase against cba24001e482fa8a8a1fbf5d5390539e2792b1aa 2018-06-20 17:58:17 -05:00
Zebediah Figura
b27ebc675a winebuild-Fake_Dlls: Reorder some lines to avoid collision with ntdll-User_Shared_Data. 2018-06-20 17:45:35 -05:00
Zebediah Figura
6499b77447 winebuild-Fake_Dlls: Restore changes to krnl386.exe/wowthunk.c removed by bdf29b7cd.
"Don't know if the code modification was correct"—indeed, it was not.
2018-06-20 17:20:31 -05:00
Zebediah Figura
c9eaabbba9 winebuild-Fake_Dlls: Get rid of dependency on ntdll-User_Shared_Data.
By using the marginally documented 'SystemCall' field rather than adding our own.

Note that the SystemCall field is only 32 bits wide even on 64-bit systems, so we have to write over the SystemCallReturn field as well. Since we don't need return thunks this should be fine.
2018-06-20 17:20:31 -05:00
Zebediah Figura
ae4862e0fb Update several definition files 2018-06-19 16:29:27 -05:00
Zebediah Figura
a755842e30 patchupdate.py: All of the bugs linking to wine-compholio have been moved, remove the exception. 2018-06-19 16:11:56 -05:00
Zebediah Figura
3168a74745 patchupdate.py: Allow linking to specific patches. 2018-06-19 16:10:43 -05:00
Alistair Leslie-Hughes
91b1d2470a Rebase against b6c7b2d322e0cd61eaeaac0d936dfc78c850f61b 2018-06-16 14:02:13 +10:00
Alistair Leslie-Hughes
03cdc2f2c8 Rebase against 83f845dfa1bb4a6ec6e8b7f65e9469dc9a8a7787 2018-06-15 08:57:38 +10:00
Alistair Leslie-Hughes
12fb928da8 Rebase against 8c48c632fc66c8420331ed9c14f7fd3764aa8a0d 2018-06-14 09:16:59 +10:00
Alistair Leslie-Hughes
4592d28a7a Release 3.10 2018-06-12 10:22:26 +10:00
Alistair Leslie-Hughes
122a110c7a Rebase against e470221dcaaadf10f222551997ff837f1e7557de 2018-06-12 10:22:06 +10:00
Alistair Leslie-Hughes
d78f0a5a7b Added bcrypt-BCryptGenerateKeyPair patchset 2018-06-12 08:28:09 +10:00
Alistair Leslie-Hughes
95d74e37bd Updated uianimation-stubs patchset
Thanks Louis Lenders
2018-06-12 08:11:17 +10:00
Alistair Leslie-Hughes
e884abcd88 Add uianimation-stubs patchset 2018-06-08 09:16:42 +10:00
Alistair Leslie-Hughes
f98bff1805 Rebase against 868fb05e7710dbaa94569fa7d2c3736580aec438 2018-06-08 08:21:29 +10:00
Alistair Leslie-Hughes
6b93eac6ad Rebase against 5fd3090f522a9c2a4cfb077c9b7cdc1ae1304c4c 2018-06-06 08:44:57 +10:00
Alistair Leslie-Hughes
5ffb34bc71 Updated virtdisk-GetStorageDependencyInformation patchset 2018-06-05 09:46:50 +10:00
Alistair Leslie-Hughes
cf3c3e93e5 Rebase against 11e3cf091d8ec70a9d6004ac6a51d5c827d9ddff
No changes. This is to ensure the build includes the
upstream dbghelp which include "wine/heap.h".
2018-06-05 09:08:05 +10:00
Alistair Leslie-Hughes
7997379312 Added wintab32-improvements patchset 2018-06-03 08:45:19 +10:00
Alistair Leslie-Hughes
26bb2b21f2 Added winex11-Vulkan_support patchset 2018-06-03 08:45:19 +10:00
Alistair Leslie-Hughes
8df70b8b0c Rebase against 185d9ee7ebf56e0663f715e532f2ee2c27289f12 2018-06-01 09:07:56 +10:00
Alistair Leslie-Hughes
b69aa1fa72 Rebase against d3a71dec7ee99e9c65630d080c02d7d4182e61a6 2018-05-31 09:12:45 +10:00
Alistair Leslie-Hughes
d28e1388c0 Rebase against 37e837113ce6654c436211031712719e8f9f29a2 2018-05-30 08:48:14 +10:00
Alistair Leslie-Hughes
b305d85b78 Updated d3d11-Deferred_Context patchset 2018-05-27 11:52:08 +10:00
Alistair Leslie-Hughes
d0cc6096d1 Added wined3d-CompareInterpolationMode patchset 2018-05-27 11:46:46 +10:00
Alistair Leslie-Hughes
eb816d477a Updated windowscodecs-GIF_Encoder patchset.
Added test for function GetEncoderInfo.
2018-05-27 11:24:37 +10:00
Alistair Leslie-Hughes
69650f38d8 Release 3.9 2018-05-26 16:47:41 +10:00
Alistair Leslie-Hughes
06caa35518 Rebase against b70f0d723a768b9fdc89cd835b23718f6cd61f31 2018-05-25 09:05:36 +10:00
Alistair Leslie-Hughes
51557bbf6e Rebase against bf4d0982fd88f9c8848b9e27bb1391d45d18b68e 2018-05-24 10:15:30 +10:00
Zebediah Figura
1121536608 d3d11-Depth_Bias: Add tests for depth bias clamp. 2018-05-22 16:36:40 -05:00
Zebediah Figura
deac22809d Rebase against da5112c74313b5236183135204cab38a8b0169ed. 2018-05-22 16:36:18 -05:00
Zebediah Figura
da46ed3444 Rebase against 8b9ba16e9ad9ca85b93b05c13d6c5044a1a5ecf3. 2018-05-21 20:30:37 -05:00
Zebediah Figura
53a402bde4 Rebase against 8e9ea7a8a163147012908bad696a539454654d8f 2018-05-18 18:56:01 -05:00
Alistair Leslie-Hughes
41b4cfa2c4 Rebase against 48aeef69fc99ff1460da934f4933f0499ff33b13 2018-05-18 11:31:57 +10:00
Alistair Leslie-Hughes
7715ae4be5 Rebase against ba1d9f3aad85303997635ce8328caffa08992c14 2018-05-17 08:57:30 +10:00
Alistair Leslie-Hughes
f5bb52ba01 Disbale d3d11-dynamic-cpu-access patchset
Causing regressions.
2018-05-17 08:15:08 +10:00
Alistair Leslie-Hughes
584fc68f0e Rebase against 9321aa40f5ba79352d346c04f4d428d143575fb9 2018-05-16 08:02:03 +10:00
Alistair Leslie-Hughes
93d16ba18b Updated ntdll-Loader_Machine_Type patchset 2018-05-16 07:53:04 +10:00
Gijs Vermeulen
a6526e647f Update server-Realtime_Priority patchset 2018-05-15 09:01:25 +10:00
Alistair Leslie-Hughes
7966caf282 Rebase against 09bf88092d0748ceac355098a942b01b267e8773 2018-05-15 08:53:14 +10:00
Zebediah Figura
7348f0b12b Merge pull request #62 from gverm/master
Fix LsaLookUpPrivilegeName patchset folder name
2018-05-12 10:30:52 -05:00
Gijs Vermeulen
501012afe2 Fix LsaLookUpPrivilegeName patchset folder name 2018-05-12 15:12:11 +02:00
Alistair Leslie-Hughes
eb684dd939 Release 3.8 2018-05-12 17:19:45 +10:00
Alistair Leslie-Hughes
3851931e1c Added wined3d-Implement-oMask patchset 2018-05-12 13:55:47 +10:00
Alistair Leslie-Hughes
054b0f6db6 Added dxgi-IDXGIDevice2 patchset 2018-05-12 13:49:45 +10:00
Alistair Leslie-Hughes
fcff4a78ba Rebase against 7280f7fb744e951281e7f051c347fb8fef5ab36b 2018-05-12 09:24:56 +10:00
Alistair Leslie-Hughes
44ee738e8b Updated ntdll-Loader_Machine_Type patchset 2018-05-11 19:57:03 +10:00
Alistair Leslie-Hughes
fd7f8c9f16 Rebase against 6d6b4bffb3f619ae298669b888775350223e281f 2018-05-11 11:32:38 +10:00
Alistair Leslie-Hughes
54122cc23e Updated ntdll-Loader_Machine_Type patchset
- Resource only DLLs need to be excluded from the Architecture test.
2018-05-10 08:29:54 +10:00
Alistair Leslie-Hughes
31a33b08ad Rebase against 8f46ac233ed96f7286f6aacd1f8fb2626d3ed1c2 2018-05-10 08:26:38 +10:00
Zebediah Figura
ec4fd3ebdc Rebase against 7f955f22d317cad1e7d5323179e9a0ee635c9768. 2018-05-08 17:53:51 -05:00
Alistair Leslie-Hughes
e9ce651159 Added d3d11-dynamic-cpu-access patchset 2018-05-08 15:35:51 +10:00
Alistair Leslie-Hughes
9f3d2b6601 Disabled dwrite-FontFallback patchset
The tests pass without the implementaion.
2018-05-08 15:31:50 +10:00
Alistair Leslie-Hughes
eaebccd0b8 Rebase against 540c48b91175b11c7b8646d0a036b20c46425080 2018-05-05 09:01:04 +10:00
Alistair Leslie-Hughes
3c3993fdfa Updated shell32-NewMenu_Interface patchset 2018-05-04 18:45:15 +10:00
Alistair Leslie-Hughes
cc3e8145ba Updated shell32-NewMenu_Interface patchset 2018-05-04 10:32:47 +10:00
Alistair Leslie-Hughes
5571baf8cc Rebase against e637a6f0bf1eeba3e6be62c4e1c5688bb8f6102e 2018-05-04 10:25:05 +10:00
Alistair Leslie-Hughes
c7b329f9f1 Added dwrite-FontFallback patch 2018-05-04 09:32:17 +10:00
Alistair Leslie-Hughes
a022e6ff69 Added d3d11-shader-count patchset 2018-05-04 09:27:24 +10:00
Alistair Leslie-Hughes
f9342fe22e Added d2d1-ID2D1Factory1 patchset 2018-05-04 09:20:44 +10:00
Zebediah Figura
797372c132 ntoskrnl-DriverTest: Merge tests with appropriate patches in ntoskrnl-Stubs and winedevice-Default_Drivers. 2018-05-02 18:37:53 -05:00
Zebediah Figura
27c94566e3 Rebase against 8dca6c35e11a104385242ed8346ee05707b78ef7 2018-05-02 17:29:44 -05:00
Zebediah Figura
c6a90a954b Rebase against dbce559df683b7831861c747f1f4d28614eedbe2 2018-05-01 18:26:01 -05:00
Alistair Leslie-Hughes
d13e9fa487 Rebase against 784b617ae936f97118e18624da85cc9de900e3a7 2018-05-01 12:33:16 +10:00
Alistair Leslie-Hughes
4af8ffc7f2 Release v3.7 2018-04-29 08:16:14 +10:00
Zebediah Figura
4801f89bba Rebase against 9fecb7499531ddbcde7970b4d98df92dbc1bc010 2018-04-27 16:30:13 -05:00
Alistair Leslie-Hughes
9e260976b4 Rebase against d6654dbf2b38d02f3c6e0ede706a0388cd7cd4a6 2018-04-27 09:26:33 +10:00
Alistair Leslie-Hughes
48e37a9f7c Updated xaudio2 CommitChanges patchset
Renamed patch to reflect actual change.
2018-04-27 09:26:22 +10:00
Alistair Leslie-Hughes
c9330ebfa3 Updated ntdll-RtlQueryPackageIdentity-update patchset 2018-04-27 09:26:22 +10:00
Alistair Leslie-Hughes
9832547e5c Added wintrust-WTHelperGetProvCertFromChain patchset 2018-04-27 09:26:22 +10:00
Alistair Leslie-Hughes
792181ca4e Added dxgi-SetMaximumFrameLatency patchset 2018-04-27 09:26:21 +10:00
Alistair Leslie-Hughes
409261dc56 Rebase against 5e74b9ea945db50bd31cef3254865f6cd9544eb2 2018-04-26 08:48:52 +10:00
Zebediah Figura
bd3bf6c3b0 Rebase against e13f59085f8a3787abd4e3f3eabae1a7e607a3c0 2018-04-24 18:57:07 -05:00
Alistair Leslie-Hughes
6eb6431a82 Rebase against ee7756fdfd46cd64a09089def3c330a3b262cdd5 2018-04-24 09:07:00 +10:00
Alistair Leslie-Hughes
eb4096dc62 Rebase against a373054b72f396a04ab4f191e1f6c2c9e0476aa0 2018-04-21 11:59:41 +10:00
Alistair Leslie-Hughes
bff60a3afb Added winemapi - Use xdg-email if it is available 2018-04-20 08:48:13 +10:00
Alistair Leslie-Hughes
d61501a68f Rebase against 448344c5e443b35c06bc0cc4f2e8ee9b7968008f 2018-04-20 08:37:39 +10:00
Alistair Leslie-Hughes
5b388bb912 Rebase against c5023aea7e97213159b754a168b7abddc89664bb 2018-04-19 10:08:22 +10:00
Zebediah Figura
3e2b8a53bb Use WINAPIV for variadic functions.
Should fix https://bugs.winehq.org/show_bug.cgi?id=44099
2018-04-16 18:27:39 -05:00
Zebediah Figura
de87a73aac Rebase against 70c5dc64fc02408c6f7233c996e0ffdc5dc4a5a0 2018-04-16 18:15:29 -05:00
Alistair Leslie-Hughes
8fd6d103e3 Release v3.6 2018-04-14 15:25:13 +10:00
Zebediah Figura
11233f0810 Rebase against 3f281a3baad9f5f8f875da902718a1d5d3dc0d9f 2018-04-13 18:46:23 -05:00
Zebediah Figura
3fe54232fa Rebase against a7b33a6a428c9920d8130819373b1554bbd206c4 2018-04-12 18:20:32 -05:00
Alistair Leslie-Hughes
8853cef050 Rebase against aa27dd07aa55301f3e23acf9f74daa0f465e7b6d 2018-04-12 10:22:53 +10:00
Alistair Leslie-Hughes
f70daff195 Rebase against 4a6a7655e1cbc614f609ea53939e240f4f785a94 2018-04-11 10:34:16 +10:00
Alistair Leslie-Hughes
22f1c6b57f patchupdate.py: Warn when if no patches are found in a directory 2018-04-11 10:34:16 +10:00
Alistair Leslie-Hughes
a596208a7f Rebase against dd2624a24fba400bf59b9396e496d16c43d399d9 2018-04-10 09:10:43 +10:00
Alistair Leslie-Hughes
35999cf261 Updated combase-RoApi patchset 2018-04-08 11:09:31 +10:00
Alistair Leslie-Hughes
bd8446fa57 Rebase agains 3263d51a1fd86abf195c5be224f6fdb4db284b53 2018-04-05 08:09:25 +10:00
Zebediah Figura
0cf0a265da Rebase against 2986e895015b9785d61e7265763efacc053d7ad6. 2018-04-03 17:51:58 -05:00
Zebediah Figura
2736dff771 server-Shared_Memory: Fix compile failure on 64-bit.
This will at least hold us off until someone forces a real solution.
2018-04-02 21:50:53 -05:00
Zebediah Figura
f6fdc7705e ntdll-DllRedirects: Fall back to unredirected DLL on load failure. 2018-04-02 20:49:39 -05:00
Zebediah Figura
b4fce09d03 Rebase against ca9d03a7ac6bb599e50aa05ea5ec99d5cf096e2a. 2018-04-02 20:00:16 -05:00
Zebediah Figura
89733585b3 winecfg-Staging: Actually fix CSMT checkbox. 2018-04-02 12:03:04 -05:00
Zebediah Figura
6e3fbe28e1 winecfg-Staging: Fix CSMT checkbox.
Now toggles the upstream csmt registry value.
2018-04-01 17:23:01 -05:00
Alistair Leslie-Hughes
e31b1ba24f Release v3.5 2018-03-31 17:38:09 +11:00
392 changed files with 14589 additions and 24370 deletions

View File

@@ -1,26 +0,0 @@
From de9dbd542143b13741886c3e4b9f96ffcbfaa432 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 16 Mar 2016 05:46:33 +0100
Subject: dsound: Avoid implicit cast of interface pointer.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
---
dlls/dsound/primary.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c
index 3f8a478..6f280f8 100644
--- a/dlls/dsound/primary.c
+++ b/dlls/dsound/primary.c
@@ -626,7 +626,7 @@ out:
static inline IDirectSoundBufferImpl *impl_from_IDirectSoundBuffer(IDirectSoundBuffer *iface)
{
/* IDirectSoundBuffer and IDirectSoundBuffer8 use the same iface. */
- return CONTAINING_RECORD(iface, IDirectSoundBufferImpl, IDirectSoundBuffer8_iface);
+ return CONTAINING_RECORD((IDirectSoundBuffer8 *)iface, IDirectSoundBufferImpl, IDirectSoundBuffer8_iface);
}
/* This sets this format for the primary buffer only */
--
2.7.1

View File

@@ -1,7 +1,8 @@
From 59f0bb786dc3ec4e77cb43ea4410743ecd317bbf Mon Sep 17 00:00:00 2001
From 42dbdf9479e2e09734fa183b854d5ddfe987f203 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 22 Mar 2016 23:08:30 +0100
Subject: include: Check element type in CONTAINING_RECORD and similar macros.
Subject: [PATCH] include: Check element type in CONTAINING_RECORD and
similar macros.
---
include/wine/list.h | 10 ++++++++--
@@ -30,10 +31,10 @@ index b4d681f..287ad39 100644
#endif /* __WINE_SERVER_LIST_H */
diff --git a/include/wine/rbtree.h b/include/wine/rbtree.h
index 13452d9..554d239 100644
index dc50b5e..8130deb 100644
--- a/include/wine/rbtree.h
+++ b/include/wine/rbtree.h
@@ -22,8 +22,14 @@
@@ -23,8 +23,14 @@
#ifndef __WINE_WINE_RBTREE_H
#define __WINE_WINE_RBTREE_H
@@ -51,10 +52,10 @@ index 13452d9..554d239 100644
struct wine_rb_entry
{
diff --git a/include/winnt.h b/include/winnt.h
index 559a719..4a711f4 100644
index 7f822c4..ccfe73b 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -753,8 +753,14 @@ typedef struct _MEMORY_BASIC_INFORMATION
@@ -756,8 +756,14 @@ typedef struct _MEMORY_BASIC_INFORMATION
#define FIELD_OFFSET(type, field) ((LONG)offsetof(type, field))
@@ -69,8 +70,8 @@ index 559a719..4a711f4 100644
+ ((type *)((PCHAR)(address) - offsetof(type, field)))
+#endif
/* Types */
#ifdef __WINESRC__
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
--
2.7.1
1.9.1

View File

@@ -1,29 +0,0 @@
From 6f561502fe458837f3a5b27f477b1a52f33d88ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= <nerv@dawncrow.de>
Date: Mon, 16 Nov 2015 22:36:40 +0100
Subject: sfnt2fon: Don't leak output name if specified multiple times
(Coverity)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: André Hentschel <nerv@dawncrow.de>
---
tools/sfnt2fon/sfnt2fon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/sfnt2fon/sfnt2fon.c b/tools/sfnt2fon/sfnt2fon.c
index 7612bc2..f825ae4 100644
--- a/tools/sfnt2fon/sfnt2fon.c
+++ b/tools/sfnt2fon/sfnt2fon.c
@@ -654,6 +654,7 @@ static char **parse_options( int argc, char **argv )
option_defchar = atoi( optarg );
break;
case 'o':
+ free( option_output );
option_output = strdup( optarg );
break;
case 'q':
--
2.6.2

View File

@@ -1,30 +0,0 @@
From 792e99d66b40481fb81042d51a12c861d8b33b51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= <nerv@dawncrow.de>
Date: Mon, 16 Nov 2015 22:36:38 +0100
Subject: winedump: Free debug string in case it was not freed in for-loop
(Coverity)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: André Hentschel <nerv@dawncrow.de>
---
tools/winedump/msc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c
index 5890b29..3f1fd98 100644
--- a/tools/winedump/msc.c
+++ b/tools/winedump/msc.c
@@ -1378,6 +1378,8 @@ BOOL codeview_dump_symbols(const void* root, unsigned long size)
dump_data((const void*)sym, sym->generic.len + 2, " ");
}
}
+
+ free(curr_func);
return TRUE;
}
--
2.6.2

View File

@@ -1,268 +0,0 @@
From 95fd708dbdd9f8d61fdd8f1571c44e98c54b8988 Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Tue, 2 May 2017 00:59:49 -0500
Subject: [PATCH] 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 6f4fb44..3737827 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -48,6 +48,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(advapi);
static BOOL ParseStringSidToSid(LPCWSTR StringSid, PSID pSid, LPDWORD cBytes);
+static DWORD trustee_to_sid(DWORD nDestinationSidLength, PSID pDestinationSid, PTRUSTEEW pTrustee);
typedef struct _ACEFLAG
{
@@ -1255,16 +1256,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;
}
/******************************************************************************
@@ -3754,6 +3861,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.@]
*/
@@ -3849,56 +4006,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 */
--
1.9.1

View File

@@ -1,69 +0,0 @@
From 09d62cfc4fa999eacc89af2ad414810e22c910a9 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 ca5edffae5..db5a0f934c 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -7217,6 +7217,44 @@ static void test_GetExplicitEntriesFromAclW(void)
HeapFree(GetProcessHeap(), 0, old_acl);
}
+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();
@@ -7271,6 +7309,7 @@ START_TEST(security)
test_maximum_allowed();
test_token_label();
test_GetExplicitEntriesFromAclW();
+ test_BuildSecurityDescriptorW();
/* Must be the last test, modifies process token */
test_token_security_descriptor();
--
2.13.1

View File

@@ -1 +0,0 @@
Fixes: [37594] Initial implementation of advapi32.BuildSecurityDescriptorW

View File

@@ -1,4 +1,4 @@
From 3f314cc8251f62f592013abe7b1c3b977de0699a Mon Sep 17 00:00:00 2001
From 1eb8acd819f9eee8fdf154d0ef43881008265916 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 4 Aug 2017 02:33:14 +0200
Subject: ntdll: Implement NtFilterToken.
@@ -15,10 +15,10 @@ Subject: ntdll: Implement NtFilterToken.
8 files changed, 162 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 93554e929be..5822dec9b15 100644
index c3f5df3..59a08de 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -136,6 +136,65 @@ NTSTATUS WINAPI NtDuplicateToken(
@@ -119,6 +119,65 @@ NTSTATUS WINAPI NtDuplicateToken(
}
/******************************************************************************
@@ -85,10 +85,10 @@ index 93554e929be..5822dec9b15 100644
* ZwOpenProcessToken [NTDLL.@]
*/
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 4f7ee496437..275fda57970 100644
index c260b0d..3c5e69c 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -179,7 +179,7 @@
@@ -176,7 +176,7 @@
# @ stub NtEnumerateSystemEnvironmentValuesEx
@ stdcall NtEnumerateValueKey(long long long ptr long ptr)
@ stub NtExtendSection
@@ -98,10 +98,10 @@ index 4f7ee496437..275fda57970 100644
@ stdcall NtFlushBuffersFile(long ptr)
@ stdcall NtFlushInstructionCache(long ptr long)
diff --git a/include/winnt.h b/include/winnt.h
index f91f81eb559..891c9b6d4bb 100644
index 16d96d8..4e238f9 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -3844,6 +3844,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
@@ -3904,6 +3904,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
TOKEN_ADJUST_SESSIONID | \
TOKEN_ADJUST_DEFAULT )
@@ -114,10 +114,10 @@ index f91f81eb559..891c9b6d4bb 100644
#define _SECURITY_DEFINED
diff --git a/include/winternl.h b/include/winternl.h
index 140669b0105..899e8324d67 100644
index c84e6d7..288f93e 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2348,6 +2348,7 @@ NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES
@@ -2303,6 +2303,7 @@ NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES
NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
NTSYSAPI NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
@@ -126,10 +126,10 @@ index 140669b0105..899e8324d67 100644
NTSYSAPI NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
NTSYSAPI NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
diff --git a/server/process.c b/server/process.c
index cbe726afe81..f0f60edcd3f 100644
index f8739d0..71d9d6d 100644
--- a/server/process.c
+++ b/server/process.c
@@ -571,7 +571,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
@@ -566,7 +566,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
: alloc_handle_table( process, 0 );
/* Note: for security reasons, starting a new process does not attempt
* to use the current impersonation token for the new process */
@@ -139,10 +139,10 @@ index cbe726afe81..f0f60edcd3f 100644
}
if (!process->handles || !process->token) goto error;
diff --git a/server/protocol.def b/server/protocol.def
index fc6e343af52..b3dce66eb9c 100644
index 35824ae..6ee6d28 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3391,6 +3391,16 @@ enum caret_state
@@ -3356,6 +3356,16 @@ enum caret_state
obj_handle_t new_handle; /* duplicated handle */
@END
@@ -160,10 +160,10 @@ index fc6e343af52..b3dce66eb9c 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 606dbb2ab2c..6c337143c3d 100644
index 873bbc6..bc4a8f6 100644
--- a/server/security.h
+++ b/server/security.h
@@ -56,7 +56,9 @@ extern const PSID security_high_label_sid;
@@ -55,7 +55,9 @@ extern const PSID security_high_label_sid;
extern struct token *token_create_admin(void);
extern int token_assign_label( struct token *token, PSID label );
extern struct token *token_duplicate( struct token *src_token, unsigned primary,
@@ -175,10 +175,10 @@ index 606dbb2ab2c..6c337143c3d 100644
const LUID_AND_ATTRIBUTES *reqprivs,
unsigned int count, LUID_AND_ATTRIBUTES *usedprivs);
diff --git a/server/token.c b/server/token.c
index 74db66e1e24..acd7a4dedb5 100644
index 0810a61..2f6a467 100644
--- a/server/token.c
+++ b/server/token.c
@@ -299,6 +299,19 @@ static int acl_is_valid( const ACL *acl, data_size_t size )
@@ -276,6 +276,19 @@ static int acl_is_valid( const ACL *acl, data_size_t size )
return TRUE;
}
@@ -198,7 +198,7 @@ index 74db66e1e24..acd7a4dedb5 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 )
@@ -639,8 +652,36 @@ static struct token *create_token( unsigned primary, const SID *user,
@@ -619,8 +632,36 @@ static struct token *create_token( unsigned primary, const SID *user,
return token;
}
@@ -236,7 +236,7 @@ index 74db66e1e24..acd7a4dedb5 100644
{
const luid_t *modified_id =
primary || (impersonation_level == src_token->impersonation_level) ?
@@ -676,6 +717,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
@@ -656,6 +697,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
return NULL;
}
memcpy( newgroup, group, size );
@@ -248,8 +248,8 @@ index 74db66e1e24..acd7a4dedb5 100644
+ }
list_add_tail( &token->groups, &newgroup->entry );
if (src_token->primary_group == &group->sid)
token->primary_group = &newgroup->sid;
@@ -684,11 +731,14 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
{
@@ -667,11 +714,14 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
/* copy privileges */
LIST_FOR_EACH_ENTRY( privilege, &src_token->privileges, struct privilege, entry )
@@ -264,7 +264,7 @@ index 74db66e1e24..acd7a4dedb5 100644
if (sd) default_set_sd( &token->obj, sd, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION );
@@ -1322,7 +1372,7 @@ DECL_HANDLER(duplicate_token)
@@ -1304,7 +1354,7 @@ DECL_HANDLER(duplicate_token)
TOKEN_DUPLICATE,
&token_ops )))
{
@@ -273,7 +273,7 @@ index 74db66e1e24..acd7a4dedb5 100644
if (token)
{
reply->new_handle = alloc_handle_no_access_check( current->process, token, req->access, objattr->attributes );
@@ -1332,6 +1382,36 @@ DECL_HANDLER(duplicate_token)
@@ -1314,6 +1364,36 @@ DECL_HANDLER(duplicate_token)
}
}
@@ -311,5 +311,5 @@ index 74db66e1e24..acd7a4dedb5 100644
DECL_HANDLER(check_token_privileges)
{
--
2.13.1
2.7.4

View File

@@ -1,267 +0,0 @@
From e950724c38a4f81efb97bb9595dc59c5fb925da0 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Wed, 12 Apr 2017 12:33:31 +0800
Subject: advapi32/tests: Add more tests for performance counters.
---
dlls/advapi32/tests/registry.c | 196 ++++++++++++++++++++++++++++++++++++++++-
include/winreg.h | 2 +
2 files changed, 194 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index 846f1c49628..d850f6a3aa7 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -3520,35 +3520,73 @@ static void test_RegNotifyChangeKeyValue(void)
CloseHandle(event);
}
+static const char *dbgstr_longlong(ULONGLONG ll)
+{
+ static char buf[16][64];
+ static int idx;
+
+ idx &= 0x0f;
+
+ if (sizeof(ll) > sizeof(unsigned long) && ll >> 32)
+ sprintf(buf[idx], "0x%lx%08lx", (unsigned long)(ll >> 32), (unsigned long)ll);
+ else
+ sprintf(buf[idx], "0x%08lx", (unsigned long)ll);
+
+ return buf[idx++];
+}
+
+#define cmp_li(a, b, c) cmp_li_real(a, b, c, __LINE__)
+static void cmp_li_real(LARGE_INTEGER *l1, LARGE_INTEGER *l2, LONGLONG slack, int line)
+{
+ LONGLONG diff = l2->QuadPart - l1->QuadPart;
+ if (diff < 0) diff = -diff;
+ ok_(__FILE__, line)(diff <= slack, "values don't match: %s/%s\n",
+ dbgstr_longlong(l1->QuadPart), dbgstr_longlong(l2->QuadPart));
+}
+
static void test_RegQueryValueExPerformanceData(void)
{
- DWORD cbData, len;
+ static const WCHAR globalW[] = { 'G','l','o','b','a','l',0 };
+ static const WCHAR dummyW[5] = { 'd','u','m','m','y' };
+ static const char * const names[] = { NULL, "", "Global", "2" "invalid counter name" };
+ DWORD cbData, len, i, type;
BYTE *value;
DWORD dwret;
LONG limit = 6;
PERF_DATA_BLOCK *pdb;
+ HKEY hkey;
+ BYTE buf[256 + sizeof(PERF_DATA_BLOCK)];
/* Test with data == NULL */
dwret = RegQueryValueExA( HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, NULL, &cbData );
todo_wine ok( dwret == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", dwret );
+ dwret = RegQueryValueExW( HKEY_PERFORMANCE_DATA, globalW, NULL, NULL, NULL, &cbData );
+ todo_wine ok( dwret == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", dwret );
+
/* Test ERROR_MORE_DATA, start with small buffer */
len = 10;
value = HeapAlloc(GetProcessHeap(), 0, len);
cbData = len;
- dwret = RegQueryValueExA( HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, value, &cbData );
+ type = 0xdeadbeef;
+ dwret = RegQueryValueExA( HKEY_PERFORMANCE_DATA, "Global", NULL, &type, value, &cbData );
todo_wine ok( dwret == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", dwret );
+todo_wine
+ ok(type == REG_BINARY, "got %u\n", type);
while( dwret == ERROR_MORE_DATA && limit)
{
len = len * 10;
value = HeapReAlloc( GetProcessHeap(), 0, value, len );
cbData = len;
- dwret = RegQueryValueExA( HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, value, &cbData );
+ type = 0xdeadbeef;
+ dwret = RegQueryValueExA( HKEY_PERFORMANCE_DATA, "Global", NULL, &type, value, &cbData );
limit--;
}
ok(limit > 0, "too many times ERROR_MORE_DATA returned\n");
todo_wine ok(dwret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", dwret);
+todo_wine
+ ok(type == REG_BINARY, "got %u\n", type);
/* Check returned data */
if (dwret == ERROR_SUCCESS)
@@ -3565,8 +3603,158 @@ static void test_RegQueryValueExPerformanceData(void)
}
HeapFree(GetProcessHeap(), 0, value);
-}
+ for (i = 0; i < sizeof(names)/sizeof(names[0]); i++)
+ {
+ cbData = 0xdeadbeef;
+ dwret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, names[i], NULL, NULL, NULL, &cbData);
+todo_wine
+ ok(dwret == ERROR_MORE_DATA, "%u/%s: got %u\n", i, names[i], dwret);
+ ok(cbData == 0, "got %u\n", cbData);
+
+ cbData = 0;
+ dwret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, names[i], NULL, NULL, NULL, &cbData);
+todo_wine
+ ok(dwret == ERROR_MORE_DATA, "%u/%s: got %u\n", i, names[i], dwret);
+ ok(cbData == 0, "got %u\n", cbData);
+
+ cbData = 0xdeadbeef;
+ dwret = RegQueryValueExA(HKEY_PERFORMANCE_TEXT, names[i], NULL, NULL, NULL, &cbData);
+todo_wine
+ ok(dwret == ERROR_MORE_DATA, "%u/%s: got %u\n", i, names[i], dwret);
+ ok(cbData == 0, "got %u\n", cbData);
+
+ cbData = 0;
+ dwret = RegQueryValueExA(HKEY_PERFORMANCE_TEXT, names[i], NULL, NULL, NULL, &cbData);
+todo_wine
+ ok(dwret == ERROR_MORE_DATA, "%u/%s: got %u\n", i, names[i], dwret);
+ ok(cbData == 0, "got %u\n", cbData);
+
+ cbData = 0xdeadbeef;
+ dwret = RegQueryValueExA(HKEY_PERFORMANCE_NLSTEXT, names[i], NULL, NULL, NULL, &cbData);
+todo_wine
+ ok(dwret == ERROR_MORE_DATA, "%u/%s: got %u\n", i, names[i], dwret);
+ ok(cbData == 0, "got %u\n", cbData);
+
+ cbData = 0;
+ dwret = RegQueryValueExA(HKEY_PERFORMANCE_NLSTEXT, names[i], NULL, NULL, NULL, &cbData);
+todo_wine
+ ok(dwret == ERROR_MORE_DATA, "%u/%s: got %u\n", i, names[i], dwret);
+ ok(cbData == 0, "got %u\n", cbData);
+ }
+
+ memset(buf, 0x77, sizeof(buf));
+ type = 0xdeadbeef;
+ cbData = sizeof(buf);
+ dwret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "invalid counter name", NULL, &type, buf, &cbData);
+todo_wine
+ ok(dwret == ERROR_SUCCESS, "got %u\n", dwret);
+todo_wine
+ ok(type == REG_BINARY, "got %u\n", type);
+ if (dwret == ERROR_SUCCESS)
+ {
+ SYSTEMTIME st;
+ WCHAR sysname[MAX_COMPUTERNAME_LENGTH + 1];
+ DWORD sysname_len;
+ LARGE_INTEGER counter, freq, ftime;
+
+ GetSystemTime(&st);
+ GetSystemTimeAsFileTime((FILETIME *)&ftime);
+ QueryPerformanceCounter(&counter);
+ QueryPerformanceFrequency(&freq);
+
+ sysname_len = MAX_COMPUTERNAME_LENGTH + 1;
+ GetComputerNameW(sysname, &sysname_len);
+
+ pdb = (PERF_DATA_BLOCK *)buf;
+ ok(pdb->Signature[0] == 'P', "got '%c'\n", pdb->Signature[0]);
+ ok(pdb->Signature[1] == 'E', "got '%c'\n", pdb->Signature[1]);
+ ok(pdb->Signature[2] == 'R', "got '%c'\n", pdb->Signature[2]);
+ ok(pdb->Signature[3] == 'F', "got '%c'\n", pdb->Signature[3]);
+
+ ok(pdb->LittleEndian == 1, "got %u\n", pdb->LittleEndian);
+ ok(pdb->Version == 1, "got %u\n", pdb->Version);
+ ok(pdb->Revision == 1, "got %u\n", pdb->Revision);
+ len = (sizeof(*pdb) + pdb->SystemNameLength + 7) & ~7;
+ ok(pdb->TotalByteLength == len, "got %u vs %u\n", pdb->TotalByteLength, len);
+ ok(pdb->HeaderLength == pdb->TotalByteLength, "got %u\n", pdb->HeaderLength);
+ ok(pdb->NumObjectTypes == 0, "got %u\n", pdb->NumObjectTypes);
+ ok(pdb->DefaultObject != 0, "got %u\n", pdb->DefaultObject);
+ ok(pdb->SystemTime.wYear == st.wYear, "got %u\n", pdb->SystemTime.wYear);
+ ok(pdb->SystemTime.wMonth == st.wMonth, "got %u\n", pdb->SystemTime.wMonth);
+ ok(pdb->SystemTime.wDayOfWeek == st.wDayOfWeek, "got %u\n", pdb->SystemTime.wDayOfWeek);
+ ok(pdb->SystemTime.wDay == st.wDay, "got %u\n", pdb->SystemTime.wDay);
+ if (U(pdb->PerfTime).LowPart != 0x77777777) /* TestBot is broken */
+ cmp_li(&pdb->PerfTime, &counter, freq.QuadPart);
+ if (U(pdb->PerfFreq).LowPart != 0x77777777) /* TestBot is broken */
+ cmp_li(&pdb->PerfFreq, &freq, 0);
+ cmp_li(&pdb->PerfTime100nSec, &ftime, 200000); /* TestBot needs huge slack value */
+ ok(pdb->SystemNameLength == (sysname_len + 1) * sizeof(WCHAR), "expected %u, got %u\n",
+ (sysname_len + 1) * sizeof(WCHAR), pdb->SystemNameLength);
+ ok(pdb->SystemNameOffset == sizeof(*pdb), "got %u\n", pdb->SystemNameOffset);
+ ok(!lstrcmpW(sysname, (LPCWSTR)(pdb + 1)), "%s != %s\n",
+ wine_dbgstr_w(sysname), wine_dbgstr_w((LPCWSTR)(pdb + 1)));
+
+ len = pdb->TotalByteLength - (sizeof(*pdb) + pdb->SystemNameLength);
+ if (len)
+ {
+ BYTE remainder[8], *p;
+
+ memset(remainder, 0x77, sizeof(remainder));
+ p = buf + sizeof(*pdb) + pdb->SystemNameLength;
+ ok(!memcmp(p, remainder, len), "remainder: %02x,%02x...\n", p[0], p[1]);
+ }
+ }
+
+ dwret = RegOpenKeyA(HKEY_PERFORMANCE_DATA, NULL, &hkey);
+todo_wine
+ ok(dwret == ERROR_INVALID_HANDLE, "got %u\n", dwret);
+
+ dwret = RegOpenKeyA(HKEY_PERFORMANCE_DATA, "Global", &hkey);
+todo_wine
+ ok(dwret == ERROR_INVALID_HANDLE, "got %u\n", dwret);
+
+ dwret = RegOpenKeyExA(HKEY_PERFORMANCE_DATA, "Global", 0, KEY_READ, &hkey);
+todo_wine
+ ok(dwret == ERROR_INVALID_HANDLE, "got %u\n", dwret);
+
+ dwret = RegQueryValueA(HKEY_PERFORMANCE_DATA, "Global", NULL, (LONG *)&cbData);
+todo_wine
+ ok(dwret == ERROR_INVALID_HANDLE, "got %u\n", dwret);
+
+ dwret = RegSetValueA(HKEY_PERFORMANCE_DATA, "Global", REG_SZ, "dummy", 4);
+todo_wine
+ ok(dwret == ERROR_INVALID_HANDLE, "got %u\n", dwret);
+
+ dwret = RegSetValueExA(HKEY_PERFORMANCE_DATA, "Global", 0, REG_SZ, (const BYTE *)"dummy", 40);
+todo_wine
+ ok(dwret == ERROR_INVALID_HANDLE, "got %u\n", dwret);
+
+ cbData = sizeof(buf);
+ dwret = RegEnumKeyA(HKEY_PERFORMANCE_DATA, 0, (LPSTR)buf, cbData);
+todo_wine
+ ok(dwret == ERROR_INVALID_HANDLE, "got %u\n", dwret);
+
+ cbData = sizeof(buf);
+ dwret = RegEnumValueA(HKEY_PERFORMANCE_DATA, 0, (LPSTR)buf, &cbData, NULL, NULL, NULL, NULL);
+todo_wine
+ ok(dwret == ERROR_MORE_DATA, "got %u\n", dwret);
+todo_wine
+ ok(cbData == sizeof(buf), "got %u\n", cbData);
+
+ dwret = RegEnumValueA(HKEY_PERFORMANCE_DATA, 0, NULL, &cbData, NULL, NULL, NULL, NULL);
+ ok(dwret == ERROR_INVALID_PARAMETER, "got %u\n", dwret);
+
+ if (pRegSetKeyValueW)
+ {
+ dwret = pRegSetKeyValueW(HKEY_PERFORMANCE_DATA, NULL, globalW, REG_SZ, dummyW, sizeof(dummyW));
+todo_wine
+ ok(dwret == ERROR_INVALID_HANDLE, "got %u\n", dwret);
+ }
+
+ dwret = RegCloseKey(HKEY_PERFORMANCE_DATA);
+ ok(dwret == ERROR_SUCCESS, "got %u\n", dwret);
+}
START_TEST(registry)
{
diff --git a/include/winreg.h b/include/winreg.h
index 42b77251ae4..ddbd9293783 100644
--- a/include/winreg.h
+++ b/include/winreg.h
@@ -32,6 +32,8 @@ extern "C" {
#define HKEY_PERFORMANCE_DATA ((HKEY)(LONG_PTR)(LONG)0x80000004)
#define HKEY_CURRENT_CONFIG ((HKEY)(LONG_PTR)(LONG)0x80000005)
#define HKEY_DYN_DATA ((HKEY)(LONG_PTR)(LONG)0x80000006)
+#define HKEY_PERFORMANCE_TEXT ((HKEY)(LONG_PTR)(LONG)0x80000050)
+#define HKEY_PERFORMANCE_NLSTEXT ((HKEY)(LONG_PTR)(LONG)0x80000060)
/*
* registry provider structs
--
2.13.1

View File

@@ -1,139 +0,0 @@
From f72de28ee3a7a3cb25165f0aaee0c7e17eb7e6d7 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Wed, 12 Apr 2017 12:48:29 +0800
Subject: include: Add more definitions for performance counters.
---
include/winperf.h | 113 ++++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 97 insertions(+), 16 deletions(-)
diff --git a/include/winperf.h b/include/winperf.h
index dce1a6d648d..113bfbae40f 100644
--- a/include/winperf.h
+++ b/include/winperf.h
@@ -67,25 +67,106 @@
#define PERF_DETAIL_EXPERT 300
#define PERF_DETAIL_WIZARD 400
+#include <pshpack8.h>
+
/* Performance data structure header
* returned in answer to HKEY_PERFORMANCE_DATA request
*/
-typedef struct _PERF_DATA_BLOCK {
- WCHAR Signature[4];
- DWORD LittleEndian;
- DWORD Version;
- DWORD Revision;
- DWORD TotalByteLength;
- DWORD HeaderLength;
- DWORD NumObjectTypes;
- DWORD DefaultObject;
- SYSTEMTIME SystemTime;
- LARGE_INTEGER PerfTime;
- LARGE_INTEGER PerfFreq;
- LARGE_INTEGER PerfTime100nSec;
- DWORD SystemNameLength;
- DWORD SystemNameOffset;
-} PERF_DATA_BLOCK, *PPERF_DATA_BLOCK, *LPPERF_DATA_BLOCK;
+#define PERF_DATA_VERSION 1
+#define PERF_DATA_REVISION 1
+
+typedef struct _PERF_DATA_BLOCK
+{
+ WCHAR Signature[4];
+ DWORD LittleEndian;
+ DWORD Version;
+ DWORD Revision;
+ DWORD TotalByteLength;
+ DWORD HeaderLength;
+ DWORD NumObjectTypes;
+ DWORD DefaultObject;
+ SYSTEMTIME SystemTime;
+ LARGE_INTEGER PerfTime;
+ LARGE_INTEGER PerfFreq;
+ LARGE_INTEGER PerfTime100nSec;
+ DWORD SystemNameLength;
+ DWORD SystemNameOffset;
+} PERF_DATA_BLOCK, *PPERF_DATA_BLOCK;
+
+#define PERF_NO_INSTANCES -1
+
+typedef struct _PERF_OBJECT_TYPE
+{
+ DWORD TotalByteLength;
+ DWORD DefinitionLength;
+ DWORD HeaderLength;
+ DWORD ObjectNameTitleIndex;
+#ifdef _WIN64
+ DWORD ObjectNameTitle;
+#else
+ LPWSTR ObjectNameTitle;
+#endif
+ DWORD ObjectHelpTitleIndex;
+#ifdef _WIN64
+ DWORD ObjectHelpTitle;
+#else
+ LPWSTR ObjectHelpTitle;
+#endif
+ DWORD DetailLevel;
+ DWORD NumCounters;
+ LONG DefaultCounter;
+ LONG NumInstances;
+ DWORD CodePage;
+ LARGE_INTEGER PerfTime;
+ LARGE_INTEGER PerfFreq;
+} PERF_OBJECT_TYPE, *PPERF_OBJECT_TYPE;
+
+typedef struct _PERF_COUNTER_DEFINITION
+{
+ DWORD ByteLength;
+ DWORD CounterNameTitleIndex;
+#ifdef _WIN64
+ DWORD CounterNameTitle;
+#else
+ LPWSTR CounterNameTitle;
+#endif
+ DWORD CounterHelpTitleIndex;
+#ifdef _WIN64
+ DWORD CounterHelpTitle;
+#else
+ LPWSTR CounterHelpTitle;
+#endif
+ LONG DefaultScale;
+ DWORD DetailLevel;
+ DWORD CounterType;
+ DWORD CounterSize;
+ DWORD CounterOffset;
+} PERF_COUNTER_DEFINITION, *PPERF_COUNTER_DEFINITION;
+
+#define PERF_NO_UNIQUE_ID -1
+
+typedef struct _PERF_INSTANCE_DEFINITION
+{
+ DWORD ByteLength;
+ DWORD ParentObjectTitleIndex;
+ DWORD ParentObjectInstance;
+ LONG UniqueID;
+ DWORD NameOffset;
+ DWORD NameLength;
+} PERF_INSTANCE_DEFINITION, *PPERF_INSTANCE_DEFINITION;
+
+typedef struct _PERF_COUNTER_BLOCK
+{
+ DWORD ByteLength;
+} PERF_COUNTER_BLOCK, *PPERF_COUNTER_BLOCK;
+
+
+#include <poppack.h>
+
+typedef DWORD (APIENTRY PM_OPEN_PROC)(LPWSTR);
+typedef DWORD (APIENTRY PM_COLLECT_PROC)(LPWSTR,LPVOID *,LPDWORD,LPDWORD);
+typedef DWORD (APIENTRY PM_CLOSE_PROC)(void);
+typedef DWORD (APIENTRY PM_QUERY_PROC)(LPDWORD,LPVOID *,LPDWORD,LPDWORD);
#endif /* _WINPERF_ */
--
2.13.1

View File

@@ -1,380 +0,0 @@
From 4fc763b4564cf0dc7e9e27826d785255133c8187 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Wed, 12 Apr 2017 13:59:20 +0800
Subject: advapi32: Add initial support for querying performance counters data.
(v2)
---
dlls/advapi32/registry.c | 244 ++++++++++++++++++++++++++++++++++++++++-
dlls/advapi32/tests/registry.c | 17 +--
2 files changed, 249 insertions(+), 12 deletions(-)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 7a26fffc55e..4dd29d3ba72 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -2,6 +2,7 @@
* Registry management
*
* Copyright (C) 1999 Alexandre Julliard
+ * Copyright (C) 2017 Dmitry Timoshkov
*
* Based on misc/registry.c code
* Copyright (C) 1996 Marcus Meissner
@@ -36,6 +37,7 @@
#include "winreg.h"
#include "winerror.h"
#include "winternl.h"
+#include "winperf.h"
#include "winuser.h"
#include "sddl.h"
#include "advapi32_misc.h"
@@ -1482,6 +1484,234 @@ LONG WINAPI RegSetKeyValueA( HKEY hkey, LPCSTR subkey, LPCSTR name, DWORD type,
return ret;
}
+struct perf_provider
+{
+ HMODULE perflib;
+ PM_OPEN_PROC *pOpen;
+ PM_CLOSE_PROC *pClose;
+ PM_COLLECT_PROC *pCollect;
+};
+
+static void *get_provider_entry(HKEY perf, HMODULE perflib, const char *name)
+{
+ char buf[MAX_PATH];
+ DWORD err, type, len;
+
+ len = sizeof(buf) - 1;
+ err = RegQueryValueExA(perf, name, NULL, &type, (BYTE *)buf, &len);
+ if (err != ERROR_SUCCESS || type != REG_SZ)
+ return NULL;
+
+ buf[len] = 0;
+ TRACE("Loading function pointer for %s: %s\n", name, debugstr_a(buf));
+
+ return GetProcAddress(perflib, buf);
+}
+
+static BOOL load_provider(HKEY root, const WCHAR *name, struct perf_provider *provider)
+{
+ static const WCHAR performanceW[] = { 'P','e','r','f','o','r','m','a','n','c','e',0 };
+ static const WCHAR libraryW[] = { 'L','i','b','r','a','r','y',0 };
+ WCHAR buf[MAX_PATH], buf2[MAX_PATH];
+ DWORD err, type, len;
+ HKEY service, perf;
+
+ err = RegOpenKeyExW(root, name, 0, KEY_READ, &service);
+ if (err != ERROR_SUCCESS)
+ return FALSE;
+
+ err = RegOpenKeyExW(service, performanceW, 0, KEY_READ, &perf);
+ RegCloseKey(service);
+ if (err != ERROR_SUCCESS)
+ return FALSE;
+
+ len = sizeof(buf) - sizeof(WCHAR);
+ err = RegQueryValueExW(perf, libraryW, NULL, &type, (BYTE *)buf, &len);
+ if (err != ERROR_SUCCESS || !(type == REG_SZ || type == REG_EXPAND_SZ))
+ goto error;
+
+ buf[len / sizeof(WCHAR)] = 0;
+ if (type == REG_EXPAND_SZ)
+ {
+ len = ExpandEnvironmentStringsW(buf, buf2, MAX_PATH);
+ if (!len || len > MAX_PATH) goto error;
+ strcpyW(buf, buf2);
+ }
+
+ if (!(provider->perflib = LoadLibraryW(buf)))
+ {
+ WARN("Failed to load %s\n", debugstr_w(buf));
+ goto error;
+ }
+
+ GetModuleFileNameW(provider->perflib, buf, MAX_PATH);
+ TRACE("Loaded provider %s\n", wine_dbgstr_w(buf));
+
+ provider->pOpen = get_provider_entry(perf, provider->perflib, "Open");
+ provider->pClose = get_provider_entry(perf, provider->perflib, "Close");
+ provider->pCollect = get_provider_entry(perf, provider->perflib, "Collect");
+ if (provider->pOpen && provider->pClose && provider->pCollect)
+ {
+ RegCloseKey(perf);
+ return TRUE;
+ }
+
+ TRACE("Provider is missing required exports\n");
+ FreeLibrary(provider->perflib);
+
+error:
+ RegCloseKey(perf);
+ return FALSE;
+}
+
+static DWORD collect_data(struct perf_provider *provider, const WCHAR *query, void **data, DWORD *size, DWORD *obj_count)
+{
+ DWORD err;
+
+ err = provider->pOpen(NULL);
+ if (err != ERROR_SUCCESS)
+ {
+ TRACE("Open error %u (%#x)\n", err, err);
+ return err;
+ }
+
+ *obj_count = 0;
+ err = provider->pCollect((WCHAR *)query, data, size, obj_count);
+ if (err != ERROR_SUCCESS)
+ {
+ TRACE("Collect error %u (%#x)\n", err, err);
+ *obj_count = 0;
+ }
+
+ provider->pClose();
+ return err;
+}
+
+#define MAX_SERVICE_NAME 260
+
+static DWORD query_perf_data(const WCHAR *query, DWORD *type, void *data, DWORD *ret_size)
+{
+ static const WCHAR SZ_SERVICES_KEY[] = { 'S','y','s','t','e','m','\\',
+ 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
+ 'S','e','r','v','i','c','e','s',0 };
+ DWORD err, i, data_size;
+ HKEY root;
+ PERF_DATA_BLOCK *pdb;
+
+ if (!ret_size)
+ return ERROR_INVALID_PARAMETER;
+
+ data_size = *ret_size;
+ *ret_size = 0;
+
+ if (type)
+ *type = REG_BINARY;
+
+ if (!data || data_size < sizeof(*pdb))
+ return ERROR_MORE_DATA;
+
+ pdb = data;
+
+ pdb->Signature[0] = 'P';
+ pdb->Signature[1] = 'E';
+ pdb->Signature[2] = 'R';
+ pdb->Signature[3] = 'F';
+#ifdef WORDS_BIGENDIAN
+ pdb->LittleEndian = FALSE;
+#else
+ pdb->LittleEndian = TRUE;
+#endif
+ pdb->Version = PERF_DATA_VERSION;
+ pdb->Revision = PERF_DATA_REVISION;
+ pdb->TotalByteLength = 0;
+ pdb->HeaderLength = sizeof(*pdb);
+ pdb->NumObjectTypes = 0;
+ pdb->DefaultObject = 0;
+ QueryPerformanceCounter(&pdb->PerfTime);
+ QueryPerformanceFrequency(&pdb->PerfFreq);
+
+ data = pdb + 1;
+ pdb->SystemNameOffset = sizeof(*pdb);
+ pdb->SystemNameLength = (data_size - sizeof(*pdb)) / sizeof(WCHAR);
+ if (!GetComputerNameW(data, &pdb->SystemNameLength))
+ return ERROR_MORE_DATA;
+
+ pdb->SystemNameLength++;
+ pdb->SystemNameLength *= sizeof(WCHAR);
+
+ pdb->HeaderLength += pdb->SystemNameLength;
+
+ /* align to 8 bytes */
+ if (pdb->SystemNameLength & 7)
+ pdb->HeaderLength += 8 - (pdb->SystemNameLength & 7);
+
+ if (data_size < pdb->HeaderLength)
+ return ERROR_MORE_DATA;
+
+ pdb->TotalByteLength = pdb->HeaderLength;
+
+ data_size -= pdb->HeaderLength;
+ data = (char *)data + pdb->HeaderLength;
+
+ err = RegOpenKeyExW(HKEY_LOCAL_MACHINE, SZ_SERVICES_KEY, 0, KEY_READ, &root);
+ if (err != ERROR_SUCCESS)
+ return err;
+
+ i = 0;
+ for (;;)
+ {
+ DWORD collected_size = data_size, obj_count = 0;
+ struct perf_provider provider;
+ WCHAR name[MAX_SERVICE_NAME];
+ void *collected_data = data;
+
+ err = RegEnumKeyW(root, i++, name, MAX_SERVICE_NAME);
+ if (err == ERROR_NO_MORE_ITEMS)
+ {
+ err = ERROR_SUCCESS;
+ break;
+ }
+
+ if (err != ERROR_SUCCESS)
+ continue;
+
+ if (!load_provider(root, name, &provider))
+ continue;
+
+ err = collect_data(&provider, query, &collected_data, &collected_size, &obj_count);
+ FreeLibrary(provider.perflib);
+
+ if (err == ERROR_MORE_DATA)
+ break;
+
+ if (err == ERROR_SUCCESS)
+ {
+ PERF_OBJECT_TYPE *obj = (PERF_OBJECT_TYPE *)data;
+
+ TRACE("Collect: obj->TotalByteLength %u, collected_size %u\n",
+ obj->TotalByteLength, collected_size);
+
+ data_size -= collected_size;
+ data = collected_data;
+
+ pdb->TotalByteLength += collected_size;
+ pdb->NumObjectTypes += obj_count;
+ }
+ }
+
+ RegCloseKey(root);
+
+ if (err == ERROR_SUCCESS)
+ {
+ *ret_size = pdb->TotalByteLength;
+
+ GetSystemTime(&pdb->SystemTime);
+ GetSystemTimeAsFileTime((FILETIME *)&pdb->PerfTime100nSec);
+ }
+
+ return err;
+}
+
/******************************************************************************
* RegQueryValueExW [ADVAPI32.@]
*
@@ -1502,6 +1732,10 @@ LSTATUS WINAPI RegQueryValueExW( HKEY hkey, LPCWSTR name, LPDWORD reserved, LPDW
(count && data) ? *count : 0 );
if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER;
+
+ if (hkey == HKEY_PERFORMANCE_DATA)
+ return query_perf_data(name, type, data, count);
+
if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE;
RtlInitUnicodeString( &name_str, name );
@@ -1592,7 +1826,8 @@ LSTATUS WINAPI DECLSPEC_HOTPATCH RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWO
hkey, debugstr_a(name), reserved, type, data, count, count ? *count : 0 );
if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER;
- if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE;
+ if (hkey != HKEY_PERFORMANCE_DATA && !(hkey = get_special_root_hkey( hkey, 0 )))
+ return ERROR_INVALID_HANDLE;
if (count) datalen = *count;
if (!data && count) *count = 0;
@@ -1604,6 +1839,13 @@ LSTATUS WINAPI DECLSPEC_HOTPATCH RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWO
if ((status = RtlAnsiStringToUnicodeString( &nameW, &nameA, TRUE )))
return RtlNtStatusToDosError(status);
+ if (hkey == HKEY_PERFORMANCE_DATA)
+ {
+ DWORD ret = query_perf_data( nameW.Buffer, type, data, count );
+ RtlFreeUnicodeString( &nameW );
+ return ret;
+ }
+
status = NtQueryValueKey( hkey, &nameW, KeyValuePartialInformation,
buffer, sizeof(buffer), &total_size );
if (status && status != STATUS_BUFFER_OVERFLOW) goto done;
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index 43599359ac6..9706478a135 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -3520,10 +3520,10 @@ static void test_RegQueryValueExPerformanceData(void)
/* Test with data == NULL */
dwret = RegQueryValueExA( HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, NULL, &cbData );
- todo_wine ok( dwret == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", dwret );
+ ok( dwret == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", dwret );
dwret = RegQueryValueExW( HKEY_PERFORMANCE_DATA, globalW, NULL, NULL, NULL, &cbData );
- todo_wine ok( dwret == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", dwret );
+ ok( dwret == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", dwret );
/* Test ERROR_MORE_DATA, start with small buffer */
len = 10;
@@ -3531,8 +3531,7 @@ static void test_RegQueryValueExPerformanceData(void)
cbData = len;
type = 0xdeadbeef;
dwret = RegQueryValueExA( HKEY_PERFORMANCE_DATA, "Global", NULL, &type, value, &cbData );
- todo_wine ok( dwret == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", dwret );
-todo_wine
+ ok( dwret == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", dwret );
ok(type == REG_BINARY, "got %u\n", type);
while( dwret == ERROR_MORE_DATA && limit)
{
@@ -3545,14 +3544,13 @@ todo_wine
}
ok(limit > 0, "too many times ERROR_MORE_DATA returned\n");
- todo_wine ok(dwret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", dwret);
-todo_wine
+ ok(dwret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", dwret);
ok(type == REG_BINARY, "got %u\n", type);
/* Check returned data */
if (dwret == ERROR_SUCCESS)
{
- todo_wine ok(len >= sizeof(PERF_DATA_BLOCK), "got size %d\n", len);
+ ok(len >= sizeof(PERF_DATA_BLOCK), "got size %d\n", len);
if (len >= sizeof(PERF_DATA_BLOCK)) {
pdb = (PERF_DATA_BLOCK*) value;
ok(pdb->Signature[0] == 'P', "expected Signature[0] = 'P', got 0x%x\n", pdb->Signature[0]);
@@ -3569,13 +3567,11 @@ todo_wine
{
cbData = 0xdeadbeef;
dwret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, names[i], NULL, NULL, NULL, &cbData);
-todo_wine
ok(dwret == ERROR_MORE_DATA, "%u/%s: got %u\n", i, names[i], dwret);
ok(cbData == 0, "got %u\n", cbData);
cbData = 0;
dwret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, names[i], NULL, NULL, NULL, &cbData);
-todo_wine
ok(dwret == ERROR_MORE_DATA, "%u/%s: got %u\n", i, names[i], dwret);
ok(cbData == 0, "got %u\n", cbData);
@@ -3608,9 +3604,7 @@ todo_wine
type = 0xdeadbeef;
cbData = sizeof(buf);
dwret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "invalid counter name", NULL, &type, buf, &cbData);
-todo_wine
ok(dwret == ERROR_SUCCESS, "got %u\n", dwret);
-todo_wine
ok(type == REG_BINARY, "got %u\n", type);
if (dwret == ERROR_SUCCESS)
{
@@ -3640,6 +3634,7 @@ todo_wine
ok(pdb->TotalByteLength == len, "got %u vs %u\n", pdb->TotalByteLength, len);
ok(pdb->HeaderLength == pdb->TotalByteLength, "got %u\n", pdb->HeaderLength);
ok(pdb->NumObjectTypes == 0, "got %u\n", pdb->NumObjectTypes);
+todo_wine
ok(pdb->DefaultObject != 0, "got %u\n", pdb->DefaultObject);
ok(pdb->SystemTime.wYear == st.wYear, "got %u\n", pdb->SystemTime.wYear);
ok(pdb->SystemTime.wMonth == st.wMonth, "got %u\n", pdb->SystemTime.wMonth);
--
2.13.1

View File

@@ -1,93 +0,0 @@
From efdcec40d501c6b27e3f3460ad0ad5fe26643e9d Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Wed, 12 Apr 2017 15:04:03 +0800
Subject: winspool.drv: Add performance counters service stubs.
---
dlls/winspool.drv/info.c | 29 +++++++++++++++++++++++++++++
dlls/winspool.drv/winspool.drv.spec | 6 +++---
loader/wine.inf.in | 7 +++++++
3 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index f09745d1e6b..330ce236b45 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -8681,3 +8681,32 @@ HRESULT WINAPI UploadPrinterDriverPackageW( LPCWSTR server, LPCWSTR path, LPCWST
flags, hwnd, dst, dstlen);
return E_NOTIMPL;
}
+
+/*****************************************************************************
+ * PerfOpen [WINSPOOL.@]
+ */
+DWORD WINAPI PerfOpen(LPWSTR context)
+{
+ FIXME("%s: stub\n", debugstr_w(context));
+ return ERROR_SUCCESS;
+}
+
+/*****************************************************************************
+ * PerfClose [WINSPOOL.@]
+ */
+DWORD WINAPI PerfClose(void)
+{
+ FIXME("stub\n");
+ return ERROR_SUCCESS;
+}
+
+/*****************************************************************************
+ * PerfCollect [WINSPOOL.@]
+ */
+DWORD WINAPI PerfCollect(LPWSTR query, LPVOID *data, LPDWORD size, LPDWORD obj_count)
+{
+ FIXME("%s,%p,%p,%p: stub\n", debugstr_w(query), data, size, obj_count);
+ *size = 0;
+ *obj_count = 0;
+ return ERROR_SUCCESS;
+}
diff --git a/dlls/winspool.drv/winspool.drv.spec b/dlls/winspool.drv/winspool.drv.spec
index 58dc60bcc9f..a23ea2ced99 100644
--- a/dlls/winspool.drv/winspool.drv.spec
+++ b/dlls/winspool.drv/winspool.drv.spec
@@ -2,9 +2,9 @@
101 stub -noname ClusterSplOpen
102 stub -noname ClusterSplClose
103 stub -noname ClusterSplIsAlive
-104 stub PerfClose
-105 stub PerfCollect
-106 stub PerfOpen
+104 stdcall PerfClose()
+105 stdcall PerfCollect(wstr ptr ptr ptr)
+106 stdcall PerfOpen(wstr)
201 stdcall GetDefaultPrinterA(ptr ptr)
202 stdcall SetDefaultPrinterA(str)
203 stdcall GetDefaultPrinterW(ptr ptr)
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 176647b8beb..a83cc209a96 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -3353,6 +3353,7 @@ StartType=3
ErrorControl=1
[SpoolerService]
+AddReg=SpoolerServiceKeys
Description="Loads files to memory for later printing"
DisplayName="Print Spooler"
ServiceBinary="%11%\spoolsv.exe"
@@ -3361,6 +3362,12 @@ StartType=3
ErrorControl=1
LoadOrderGroup="SpoolerGroup"
+[SpoolerServiceKeys]
+HKLM,"System\CurrentControlSet\Services\Spooler\Performance","Library",,"winspool.drv"
+HKLM,"System\CurrentControlSet\Services\Spooler\Performance","Open",,"PerfOpen"
+HKLM,"System\CurrentControlSet\Services\Spooler\Performance","Close",,"PerfClose"
+HKLM,"System\CurrentControlSet\Services\Spooler\Performance","Collect",,"PerfCollect"
+
[TerminalServices]
Description="Remote desktop access"
DisplayName="Terminal Services"
--
2.13.1

View File

@@ -1,72 +0,0 @@
From ea1f7f191b65313ed472e660a10d75e609a31dfc Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 14 Apr 2017 16:39:21 +0800
Subject: advapi32: Performance providers' Open() expects to see the configured
name as its parameter.
---
dlls/advapi32/registry.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index a6e5c7903cf..37462380c40 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -1487,6 +1487,7 @@ LONG WINAPI RegSetKeyValueA( HKEY hkey, LPCSTR subkey, LPCSTR name, DWORD type,
struct perf_provider
{
HMODULE perflib;
+ WCHAR linkage[MAX_PATH];
PM_OPEN_PROC *pOpen;
PM_CLOSE_PROC *pClose;
PM_COLLECT_PROC *pCollect;
@@ -1512,6 +1513,8 @@ static BOOL load_provider(HKEY root, const WCHAR *name, struct perf_provider *pr
{
static const WCHAR performanceW[] = { 'P','e','r','f','o','r','m','a','n','c','e',0 };
static const WCHAR libraryW[] = { 'L','i','b','r','a','r','y',0 };
+ static const WCHAR linkageW[] = { 'L','i','n','k','a','g','e',0 };
+ static const WCHAR exportW[] = { 'E','x','p','o','r','t',0 };
WCHAR buf[MAX_PATH], buf2[MAX_PATH];
DWORD err, type, len;
HKEY service, perf;
@@ -1520,6 +1523,21 @@ static BOOL load_provider(HKEY root, const WCHAR *name, struct perf_provider *pr
if (err != ERROR_SUCCESS)
return FALSE;
+ provider->linkage[0] = 0;
+ err = RegOpenKeyExW(service, linkageW, 0, KEY_READ, &perf);
+ if (err == ERROR_SUCCESS)
+ {
+ len = sizeof(buf) - sizeof(WCHAR);
+ err = RegQueryValueExW(perf, exportW, NULL, &type, (BYTE *)buf, &len);
+ if (err == ERROR_SUCCESS && (type == REG_SZ || type == REG_MULTI_SZ))
+ {
+ memcpy(provider->linkage, buf, len);
+ provider->linkage[len / sizeof(WCHAR)] = 0;
+ TRACE("Export: %s\n", debugstr_w(provider->linkage));
+ }
+ RegCloseKey(perf);
+ }
+
err = RegOpenKeyExW(service, performanceW, 0, KEY_READ, &perf);
RegCloseKey(service);
if (err != ERROR_SUCCESS)
@@ -1563,12 +1581,13 @@ error:
static DWORD collect_data(struct perf_provider *provider, const WCHAR *query, void **data, DWORD *size, DWORD *obj_count)
{
+ WCHAR *linkage = provider->linkage[0] ? provider->linkage : NULL;
DWORD err;
- err = provider->pOpen(NULL);
+ err = provider->pOpen(linkage);
if (err != ERROR_SUCCESS)
{
- TRACE("Open error %u (%#x)\n", err, err);
+ TRACE("Open(%s) error %u (%#x)\n", debugstr_w(linkage), err, err);
return err;
}
--
2.13.1

View File

@@ -1,31 +0,0 @@
From f734e1d94b068a78cc10600c190bb2d527ab4866 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 14 Apr 2017 16:40:43 +0800
Subject: advapi32: If the query is not specified the default query is
"Global".
---
dlls/advapi32/registry.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 37462380c40..0aa38c5b9b3 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -1581,9 +1581,13 @@ error:
static DWORD collect_data(struct perf_provider *provider, const WCHAR *query, void **data, DWORD *size, DWORD *obj_count)
{
+ static const WCHAR globalW[] = { 'G','l','o','b','a','l',0 };
WCHAR *linkage = provider->linkage[0] ? provider->linkage : NULL;
DWORD err;
+ if (!query || !query[0])
+ query = globalW;
+
err = provider->pOpen(linkage);
if (err != ERROR_SUCCESS)
{
--
2.13.1

View File

@@ -1,53 +0,0 @@
From de80831314ecb76ac22b19b249467a600129a9e3 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 14 Apr 2017 16:43:31 +0800
Subject: advapi32: Read the configured object list for the performance
provider.
FIXME: it's not currently used, but the queries should be matched
against the configured object lists, and the providers should be
loaded and called only in case of a match.
---
dlls/advapi32/registry.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 0aa38c5b9b3..5af8128748b 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -1488,6 +1488,7 @@ struct perf_provider
{
HMODULE perflib;
WCHAR linkage[MAX_PATH];
+ WCHAR objects[MAX_PATH];
PM_OPEN_PROC *pOpen;
PM_CLOSE_PROC *pClose;
PM_COLLECT_PROC *pCollect;
@@ -1511,6 +1512,7 @@ static void *get_provider_entry(HKEY perf, HMODULE perflib, const char *name)
static BOOL load_provider(HKEY root, const WCHAR *name, struct perf_provider *provider)
{
+ static const WCHAR object_listW[] = { 'O','b','j','e','c','t',' ','L','i','s','t',0 };
static const WCHAR performanceW[] = { 'P','e','r','f','o','r','m','a','n','c','e',0 };
static const WCHAR libraryW[] = { 'L','i','b','r','a','r','y',0 };
static const WCHAR linkageW[] = { 'L','i','n','k','a','g','e',0 };
@@ -1543,6 +1545,16 @@ static BOOL load_provider(HKEY root, const WCHAR *name, struct perf_provider *pr
if (err != ERROR_SUCCESS)
return FALSE;
+ provider->objects[0] = 0;
+ len = sizeof(buf) - sizeof(WCHAR);
+ err = RegQueryValueExW(perf, object_listW, NULL, &type, (BYTE *)buf, &len);
+ if (err == ERROR_SUCCESS && (type == REG_SZ || type == REG_MULTI_SZ))
+ {
+ memcpy(provider->objects, buf, len);
+ provider->objects[len / sizeof(WCHAR)] = 0;
+ TRACE("Object List: %s\n", debugstr_w(provider->objects));
+ }
+
len = sizeof(buf) - sizeof(WCHAR);
err = RegQueryValueExW(perf, libraryW, NULL, &type, (BYTE *)buf, &len);
if (err != ERROR_SUCCESS || !(type == REG_SZ || type == REG_EXPAND_SZ))
--
2.13.1

View File

@@ -1 +0,0 @@
Fixes: [33037] Add support for querying performance counters data

View File

@@ -1,4 +1,4 @@
From 77c9e6c6f408a2b59a79f3773a379a43b6994f2c Mon Sep 17 00:00:00 2001
From 48f4c131f9e8ffc091dde12437ad0772ed1c5ca6 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 6 Aug 2017 15:16:33 +0200
Subject: server: Use all group attributes in create_token.
@@ -8,10 +8,10 @@ Subject: server: Use all group attributes in create_token.
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/server/token.c b/server/token.c
index 8d2de6ab58e..e61fe97bfa0 100644
index 0019b3a..2a56664 100644
--- a/server/token.c
+++ b/server/token.c
@@ -613,13 +613,13 @@ static struct token *create_token( unsigned primary, const SID *user,
@@ -592,13 +592,13 @@ static struct token *create_token( unsigned primary, const SID *user,
return NULL;
}
memcpy( &group->sid, groups[i].Sid, security_sid_len( groups[i].Sid ));
@@ -29,9 +29,9 @@ index 8d2de6ab58e..e61fe97bfa0 100644
+ group->logon = (groups[i].Attributes & SE_GROUP_LOGON_ID) != 0;
+ group->resource = (groups[i].Attributes & SE_GROUP_RESOURCE) != 0;
list_add_tail( &token->groups, &group->entry );
/* Use first owner capable group as an owner */
/* Use first owner capable group as owner and primary group */
if (!token->primary_group && group->owner)
@@ -1628,8 +1628,8 @@ DECL_HANDLER(get_token_groups)
@@ -1603,8 +1603,8 @@ DECL_HANDLER(get_token_groups)
if (group->enabled) *attr_ptr |= SE_GROUP_ENABLED;
if (group->owner) *attr_ptr |= SE_GROUP_OWNER;
if (group->deny_only) *attr_ptr |= SE_GROUP_USE_FOR_DENY_ONLY;
@@ -42,5 +42,5 @@ index 8d2de6ab58e..e61fe97bfa0 100644
memcpy(sid_ptr, &group->sid, security_sid_len( &group->sid ));
--
2.13.1
2.7.4

View File

@@ -1,4 +1,4 @@
From 796879e9a1840f7b893933d37821751cf1d35048 Mon Sep 17 00:00:00 2001
From a7af0ee96959aab299e543e9d6938e2533780c47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 04:02:16 +0200
Subject: [PATCH] kernel32: Implement CreateProcessInternalW.
@@ -11,7 +11,7 @@ Subject: [PATCH] kernel32: Implement CreateProcessInternalW.
4 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 60809f4..59915f9 100644
index e78c1ca..fde5f18 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -315,7 +315,7 @@
@@ -24,10 +24,10 @@ index 60809f4..59915f9 100644
@ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr)
@ stdcall CreateRemoteThread(long ptr long ptr long long ptr)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index e7f9fd9..d37003c 100644
index 2075dfd..f9606be 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -2432,12 +2432,13 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer,
@@ -2436,12 +2436,13 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer,
return ret;
}
@@ -47,7 +47,7 @@ index e7f9fd9..d37003c 100644
{
BOOL retv = FALSE;
HANDLE hFile = 0;
@@ -2450,6 +2451,9 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
@@ -2454,6 +2455,9 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
TRACE("app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
@@ -57,7 +57,7 @@ index e7f9fd9..d37003c 100644
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, sizeof(name)/sizeof(WCHAR),
&hFile, &binary_info )))
return FALSE;
@@ -2601,8 +2605,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA( LPCSTR app_name, LPSTR cmd_line, L
@@ -2605,8 +2609,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA( LPCSTR app_name, LPSTR cmd_line, L
FIXME("StartupInfo.lpReserved is used, please report (%s)\n",
debugstr_a(startup_info->lpReserved));
@@ -68,7 +68,7 @@ index e7f9fd9..d37003c 100644
done:
HeapFree( GetProcessHeap(), 0, app_nameW );
HeapFree( GetProcessHeap(), 0, cmd_lineW );
@@ -2621,8 +2625,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW( LPCWSTR app_name, LPWSTR cmd_line,
@@ -2625,8 +2629,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW( LPCWSTR app_name, LPWSTR cmd_line,
LPVOID env, LPCWSTR cur_dir, LPSTARTUPINFOW startup_info,
LPPROCESS_INFORMATION info )
{
@@ -80,7 +80,7 @@ index e7f9fd9..d37003c 100644
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index 1a6f1ff..8d2b722 100644
index 8cac67f..e8fd7aa 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -209,7 +209,7 @@
@@ -93,7 +93,7 @@ index 1a6f1ff..8d2b722 100644
@ stdcall CreateRemoteThread(long ptr long ptr long long ptr) kernel32.CreateRemoteThread
@ stdcall CreateRemoteThreadEx(long ptr long ptr ptr long ptr ptr) kernel32.CreateRemoteThreadEx
diff --git a/include/winbase.h b/include/winbase.h
index 8d65d78..35a2213 100644
index 4ddc1d3..e21cf6e 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -1856,6 +1856,7 @@ WINBASEAPI BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTE

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