You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
190 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d943e0bd51 | ||
|
67ebee7f44 | ||
|
91424695c4 | ||
|
7b07cb08f5 | ||
|
4d2afbf14b | ||
|
f47fa538c5 | ||
|
e866c7f3e1 | ||
|
b539f0f369 | ||
|
f5e96b9a37 | ||
|
7a242b50e4 | ||
|
9921dc7846 | ||
|
1a4ebb027f | ||
|
3bf7fe4763 | ||
|
eeb6529b09 | ||
|
2cb3198298 | ||
|
69e273a07f | ||
|
60870e076f | ||
|
c8a8ef48e5 | ||
|
be9feb4570 | ||
|
62ae507b36 | ||
|
5ec57827af | ||
|
d0dccc7b7e | ||
|
4e031ef171 | ||
|
60d4b6fe21 | ||
|
8706a334ad | ||
|
43f5b05fd5 | ||
|
a05970ca53 | ||
|
d9d149f369 | ||
|
e2dbf3ab7e | ||
|
fe97269c92 | ||
|
c99cdb85d7 | ||
|
020888539d | ||
|
b8ffc62855 | ||
|
dc531c457c | ||
|
08cd599f17 | ||
|
bfef128732 | ||
|
201e62615e | ||
|
c852826507 | ||
|
c1b18bc491 | ||
|
edcc6684ad | ||
|
96a77f3ae2 | ||
|
4c1a8684a0 | ||
|
3ebda6fa93 | ||
|
8d2edd8de8 | ||
|
e3b7fd770e | ||
|
e2a70628df | ||
|
a5daeb1e36 | ||
|
eed8160b22 | ||
|
996d9ab307 | ||
|
325f3758f8 | ||
|
ad2d0fdc3a | ||
|
5e62fbb2d0 | ||
|
0211a4935e | ||
|
a59a69804a | ||
|
55b5c61703 | ||
|
8b3a73a4df | ||
|
f9ad524910 | ||
|
68d0ea3a19 | ||
|
00969f9cd8 | ||
|
de4694c81b | ||
|
b888a45d12 | ||
|
46514b9952 | ||
|
de09d74c97 | ||
|
aa00b4044e | ||
|
9aabd07862 | ||
|
3dad3ddae9 | ||
|
8fb3cd2056 | ||
|
d78dc772d6 | ||
|
0e64c29e85 | ||
|
ff7e264839 | ||
|
8f35a7629b | ||
|
735a9982cc | ||
|
1b5a0095b8 | ||
|
12a893e94f | ||
|
dab61e7333 | ||
|
b1cb4553ec | ||
|
4d290efd99 | ||
|
c0c29e5a88 | ||
|
e179ddf842 | ||
|
83a65ef99b | ||
|
0a16521c7e | ||
|
866e79688c | ||
|
dbe0e706a4 | ||
|
907dc4eae6 | ||
|
e24fc5fec1 | ||
|
8ebf6f58e5 | ||
|
f254a73e66 | ||
|
463f2b02c9 | ||
|
e9daff5bc8 | ||
|
be0d43d2b1 | ||
|
2420bc89ed | ||
|
ecdf44fe29 | ||
|
e2b993408e | ||
|
4a13b7eac7 | ||
|
3a7c5ae711 | ||
|
3fab2fbed2 | ||
|
ce25cba7d0 | ||
|
d7712b4819 | ||
|
3c5f207230 | ||
|
af8052189f | ||
|
22731b5aaa | ||
|
7c8ec26efc | ||
|
fbd1870547 | ||
|
05a45207e2 | ||
|
ee5545a45f | ||
|
8881e4710a | ||
|
0c5e30ba40 | ||
|
c2c1e41e3c | ||
|
645ed054f2 | ||
|
b5d451ae12 | ||
|
5392d42292 | ||
|
05f510a1be | ||
|
630ff35489 | ||
|
25e345194d | ||
|
38cdf5d3f4 | ||
|
d0ac86031a | ||
|
6ca029a4f6 | ||
|
5d672b2839 | ||
|
e61bbfd48a | ||
|
f5671acfdd | ||
|
ac2c2ffdb8 | ||
|
907f73aa4b | ||
|
76c2635a7a | ||
|
5d31795ffc | ||
|
5cc0023094 | ||
|
6e372d0550 | ||
|
4d5cc8b76f | ||
|
d7d4fde17e | ||
|
033c4b149f | ||
|
f957d2a812 | ||
|
7e80ff15e2 | ||
|
43973275f2 | ||
|
70d09b1977 | ||
|
527b456839 | ||
|
cf4e195b49 | ||
|
b7f1c682f3 | ||
|
1a5a9b3087 | ||
|
e5fb1dda8d | ||
|
27d1ed8f59 | ||
|
857e9c1cd4 | ||
|
0a60add605 | ||
|
d36701371e | ||
|
b2904214bb | ||
|
871cee39d0 | ||
|
0c46d1e8a2 | ||
|
91f6a8ad80 | ||
|
8b1d3d07ab | ||
|
2ca6aebfaa | ||
|
81571a4cb5 | ||
|
51dc575ef3 | ||
|
73573b1dff | ||
|
142cc2eda5 | ||
|
ebabcd69b5 | ||
|
20d1f21514 | ||
|
7ad2ee4c60 | ||
|
d00088e0fa | ||
|
633cceca94 | ||
|
46006c692a | ||
|
d56994dbfa | ||
|
5e70613512 | ||
|
6a14f80fdc | ||
|
5d38a0fed0 | ||
|
8748402001 | ||
|
171d05fffe | ||
|
975205155e | ||
|
d6c145fbf5 | ||
|
3207980517 | ||
|
1bbe50aae8 | ||
|
bb180d38cc | ||
|
c542f2432d | ||
|
a36a97233a | ||
|
f8e955a95a | ||
|
d966bece72 | ||
|
1447b56eeb | ||
|
afe018692b | ||
|
52b5c90303 | ||
|
4a4ebec642 | ||
|
35ea3890a7 | ||
|
26438ad74c | ||
|
31212d2845 | ||
|
a08b6b2b62 | ||
|
9985fe9035 | ||
|
3aa965e97f | ||
|
2e479e0954 | ||
|
9fe12a2175 | ||
|
d7c0a975ea | ||
|
eb4a245bbb | ||
|
5282f297be | ||
|
1446da2c50 | ||
|
2db34eca39 |
30
CONTRIBUTING.md
Normal file
30
CONTRIBUTING.md
Normal file
@@ -0,0 +1,30 @@
|
||||
Contributing to Wine Staging
|
||||
----------------------------
|
||||
|
||||
First of all, thank you for taking the time to contribute to this project.
|
||||
|
||||
### Reporting bugs
|
||||
|
||||
Since WineConf 2015 Wine Staging is an official part of WineHQ, which means you
|
||||
can report problems directly at [bugs.winehq.org](https://bugs.winehq.org/).
|
||||
Most of the time bugs found in Wine Staging also turn out to be present in the
|
||||
development branch, so its recommended to open your bug in the "Wine" product,
|
||||
unless you are sure its really "Wine Staging" specific. For bugs related to our
|
||||
binary packages, please open a bug report in the "Packaging" product.
|
||||
|
||||
### Submitting patches
|
||||
|
||||
**IMPORTANT:** Please use [dev.wine-staging.com](https://dev.wine-staging.com/patches)
|
||||
for patch submissions, we currently do not accept Pull requests on GitHub.
|
||||
|
||||
Wine Staging mainly concentrates on experimental features and patches which are
|
||||
difficult to get into the development branch. If you have a very simple bug fix
|
||||
including tests, there is usually no need to send it to Wine Staging. You can
|
||||
directly contribute it to the
|
||||
[development branch](http://wiki.winehq.org/SubmittingPatches). However, if you
|
||||
already tried that without success, or are working on such a complex area that
|
||||
you do not really think its ready for inclusion, you might want to submit it to
|
||||
our Staging tree. Please open a patch submission request on
|
||||
[dev.wine-staging.com](https://dev.wine-staging.com/patches) including the patch.
|
||||
More information is also available in our
|
||||
[Wiki](https://wiki.winehq.org/Wine-Staging_Patches).
|
23
README.md
23
README.md
@@ -24,16 +24,6 @@ other wine-specific programs like `winecfg`. To learn more about how to use
|
||||
Wine Staging, please take a look at the
|
||||
[usage instructions](https://github.com/wine-compholio/wine-staging/wiki/Usage).
|
||||
|
||||
Reporting bugs
|
||||
--------------
|
||||
|
||||
Since WineConf 2015 Wine Staging is an official part of WineHQ, which means you
|
||||
can report problems directly at https://bugs.winehq.org/. Most of the time bugs
|
||||
found in Wine Staging also turn out to be present in the development branch, so
|
||||
its recommended to open your bug in the "Wine" product, unless you are sure its
|
||||
really "Wine Staging" specific. For problems with our binary packages, please
|
||||
also open a bug report there.
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
@@ -88,14 +78,5 @@ in our [Wiki](https://github.com/wine-compholio/wine-staging/wiki/Packaging).
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Wine Staging mainly concentrates on experimental features and patches which are
|
||||
difficult to get into the development branch. If you have a very simple bug fix
|
||||
including tests, there is usually no need to send it to Wine Staging. You can
|
||||
directly contribute it to the
|
||||
[development branch](http://wiki.winehq.org/SubmittingPatches). However, if you
|
||||
already tried that without success, or are working on such a complex area that
|
||||
you do not really think its ready for inclusion, you might want to submit it to
|
||||
our Staging tree. Please open a patch submission request on
|
||||
[bugs.wine-staging.com](https://bugs.wine-staging.com/) including the patch.
|
||||
More information is also available in our
|
||||
[Wiki](https://github.com/wine-compholio/wine-staging/wiki/Contributing).
|
||||
Please see CONTRIBUTING.md for more information about contributing to Wine
|
||||
Staging.
|
||||
|
@@ -0,0 +1,25 @@
|
||||
From 33717bde9e702520e23ae014c398bd7076902d43 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 4 Jun 2017 12:56:47 +0200
|
||||
Subject: shell32: Fix length parameter for ZeroMemory.
|
||||
|
||||
---
|
||||
dlls/shell32/shfldr_fs.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c
|
||||
index c7259276d1d..10653f92b52 100644
|
||||
--- a/dlls/shell32/shfldr_fs.c
|
||||
+++ b/dlls/shell32/shfldr_fs.c
|
||||
@@ -1315,7 +1315,7 @@ ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl,
|
||||
|
||||
if (SUCCEEDED (IPersistFolder2_GetCurFolder (ppf2, &pidl))) {
|
||||
SHGetPathFromIDListW (pidl, wszSrcPathRoot);
|
||||
- ZeroMemory(wszDstPath, MAX_PATH+1);
|
||||
+ ZeroMemory(wszDstPath, sizeof(wszDstPath));
|
||||
if (This->sPathTarget)
|
||||
lstrcpynW(wszDstPath, This->sPathTarget, MAX_PATH);
|
||||
PathAddBackslashW(wszSrcPathRoot);
|
||||
--
|
||||
2.13.0
|
||||
|
@@ -0,0 +1,25 @@
|
||||
From 2b5e9f330770221eee2eda2aab251eba8d370a60 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 4 Jun 2017 13:17:54 +0200
|
||||
Subject: fusion: Fix length parameter for ZeroMemory.
|
||||
|
||||
---
|
||||
dlls/fusion/tests/asmname.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/fusion/tests/asmname.c b/dlls/fusion/tests/asmname.c
|
||||
index 5fb14a48291..21cd4874edc 100644
|
||||
--- a/dlls/fusion/tests/asmname.c
|
||||
+++ b/dlls/fusion/tests/asmname.c
|
||||
@@ -358,7 +358,7 @@ static void test_assembly_name_props_line(IAssemblyName *name,
|
||||
to_widechar(expect, vals[i].val);
|
||||
|
||||
size = MAX_PATH;
|
||||
- ZeroMemory(str, MAX_PATH);
|
||||
+ ZeroMemory(str, sizeof(str));
|
||||
hr = IAssemblyName_GetProperty(name, i, str, &size);
|
||||
to_multibyte(val, str);
|
||||
|
||||
--
|
||||
2.13.0
|
||||
|
@@ -0,0 +1,34 @@
|
||||
From 3e59710a3091a4a61b7cce00606ed23b7b66dfda Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 4 Jun 2017 12:55:31 +0200
|
||||
Subject: fusion/tests: Avoid compiler warnings with GCC 7.
|
||||
|
||||
---
|
||||
dlls/fusion/tests/asmenum.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/fusion/tests/asmenum.c b/dlls/fusion/tests/asmenum.c
|
||||
index 1dc34a286e5..8b95f2a6bd5 100644
|
||||
--- a/dlls/fusion/tests/asmenum.c
|
||||
+++ b/dlls/fusion/tests/asmenum.c
|
||||
@@ -223,7 +223,7 @@ typedef struct _tagASMNAME
|
||||
static BOOL enum_gac_assemblies(struct list *assemblies, int depth, LPSTR path)
|
||||
{
|
||||
WIN32_FIND_DATAA ffd;
|
||||
- CHAR buf[MAX_PATH];
|
||||
+ CHAR buf[MAX_PATH + 37];
|
||||
CHAR disp[MAX_PATH];
|
||||
ASMNAME *name;
|
||||
HANDLE hfind;
|
||||
@@ -248,7 +248,7 @@ static BOOL enum_gac_assemblies(struct list *assemblies, int depth, LPSTR path)
|
||||
else if (depth == 1)
|
||||
{
|
||||
char culture[MAX_PATH];
|
||||
- char dll[MAX_PATH], exe[MAX_PATH];
|
||||
+ char dll[MAX_PATH + 6], exe[MAX_PATH + 6];
|
||||
|
||||
/* Directories with no dll or exe will not be enumerated */
|
||||
sprintf(dll, "%s\\%s\\%s.dll", path, ffd.cFileName, parent);
|
||||
--
|
||||
2.13.0
|
||||
|
@@ -0,0 +1,34 @@
|
||||
From d1eafd34d4c0619f956afd365ddbde79680a18dc Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 4 Jun 2017 12:56:10 +0200
|
||||
Subject: kernel32/tests: Avoid compiler warnings with GCC 7.
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/heap.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c
|
||||
index 0acf109dff0..70ba674bc91 100644
|
||||
--- a/dlls/kernel32/tests/heap.c
|
||||
+++ b/dlls/kernel32/tests/heap.c
|
||||
@@ -109,6 +109,9 @@ static void test_heap(void)
|
||||
}
|
||||
|
||||
/* test some border cases of HeapAlloc and HeapReAlloc */
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wpragmas"
|
||||
+#pragma GCC diagnostic ignored "-Walloc-size-larger-than="
|
||||
mem = HeapAlloc(GetProcessHeap(), 0, 0);
|
||||
ok(mem != NULL, "memory not allocated for size 0\n");
|
||||
msecond = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, ~(SIZE_T)0 - 7);
|
||||
@@ -125,6 +128,7 @@ static void test_heap(void)
|
||||
ok(size == 0 || broken(size == 1) /* some vista and win7 */,
|
||||
"HeapSize should have returned 0 instead of %lu\n", size);
|
||||
HeapFree(GetProcessHeap(), 0, msecond);
|
||||
+#pragma GCC diagnostic pop
|
||||
|
||||
/* large blocks must be 16-byte aligned */
|
||||
mem = HeapAlloc(GetProcessHeap(), 0, 512 * 1024);
|
||||
--
|
||||
2.13.1
|
||||
|
@@ -0,0 +1,25 @@
|
||||
From 61ceddca38f26c2df2acc6361c35ced52fe9b098 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 4 Jun 2017 12:58:31 +0200
|
||||
Subject: rsaenh/tests: Avoid compiler warnings with GCC 7.
|
||||
|
||||
---
|
||||
dlls/rsaenh/rsaenh.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c
|
||||
index 9af770dfc6e..6978c860278 100644
|
||||
--- a/dlls/rsaenh/rsaenh.c
|
||||
+++ b/dlls/rsaenh/rsaenh.c
|
||||
@@ -1097,7 +1097,7 @@ static void store_key_permissions(HCRYPTKEY hCryptKey, HKEY hKey, DWORD dwKeySpe
|
||||
*/
|
||||
static BOOL create_container_key(KEYCONTAINER *pKeyContainer, REGSAM sam, HKEY *phKey)
|
||||
{
|
||||
- CHAR szRSABase[MAX_PATH];
|
||||
+ CHAR szRSABase[MAX_PATH + 25];
|
||||
HKEY hRootKey;
|
||||
|
||||
sprintf(szRSABase, RSAENH_REGKEY, pKeyContainer->szName);
|
||||
--
|
||||
2.13.0
|
||||
|
@@ -0,0 +1,46 @@
|
||||
From 67ed53ca67214d7dbdea7f342b9f2ff0356a220b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 4 Jun 2017 12:59:10 +0200
|
||||
Subject: kernel32: Avoid compiler warnings with GCC 7.
|
||||
|
||||
---
|
||||
dlls/kernel32/oldconfig.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/oldconfig.c b/dlls/kernel32/oldconfig.c
|
||||
index 6c80dc614f0..3e628757283 100644
|
||||
--- a/dlls/kernel32/oldconfig.c
|
||||
+++ b/dlls/kernel32/oldconfig.c
|
||||
@@ -290,7 +290,8 @@ static void create_hardware_branch(void)
|
||||
{
|
||||
if (strncmp(dent->d_name, "hd", 2) == 0)
|
||||
{
|
||||
- sprintf(cStr, procname_ide_media, dent->d_name);
|
||||
+ result = snprintf(cStr, sizeof(cStr), procname_ide_media, dent->d_name);
|
||||
+ if (result < 0 || result >= sizeof(cStr)) continue;
|
||||
procfile = fopen(cStr, "r");
|
||||
if (!procfile)
|
||||
{
|
||||
@@ -306,7 +307,8 @@ static void create_hardware_branch(void)
|
||||
if (nType == DRIVE_UNKNOWN) continue;
|
||||
}
|
||||
|
||||
- sprintf(cStr, procname_ide_model, dent->d_name);
|
||||
+ result = snprintf(cStr, sizeof(cStr), procname_ide_model, dent->d_name);
|
||||
+ if (result < 0 || result >= sizeof(cStr)) continue;
|
||||
procfile = fopen(cStr, "r");
|
||||
if (!procfile)
|
||||
{
|
||||
@@ -322,7 +324,8 @@ static void create_hardware_branch(void)
|
||||
cDevModel[strlen(cDevModel) - 1] = 0;
|
||||
}
|
||||
|
||||
- sprintf(cUnixDeviceName, "/dev/%s", dent->d_name);
|
||||
+ result = snprintf(cUnixDeviceName, sizeof(cUnixDeviceName), "/dev/%s", dent->d_name);
|
||||
+ if (result < 0 || result >= sizeof(cUnixDeviceName)) continue;
|
||||
scsi_addr.PortNumber = (dent->d_name[2] - 'a') / 2;
|
||||
scsi_addr.PathId = 0;
|
||||
scsi_addr.TargetId = (dent->d_name[2] - 'a') % 2;
|
||||
--
|
||||
2.13.0
|
||||
|
@@ -0,0 +1,24 @@
|
||||
From 560a25c662f7b56d2b895759be1ea65c64d0f5af Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 4 Jun 2017 12:57:17 +0200
|
||||
Subject: ws2_32/tests: Work around an incorrect detection in GCC 7.
|
||||
|
||||
---
|
||||
dlls/ws2_32/tests/sock.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
|
||||
index 677a750ec6b..65c82e36524 100644
|
||||
--- a/dlls/ws2_32/tests/sock.c
|
||||
+++ b/dlls/ws2_32/tests/sock.c
|
||||
@@ -3601,6 +3601,7 @@ static DWORD WINAPI SelectReadThread(void *param)
|
||||
struct sockaddr_in addr;
|
||||
struct timeval select_timeout;
|
||||
|
||||
+ memset(&readfds, 0, sizeof(readfds));
|
||||
FD_ZERO(&readfds);
|
||||
FD_SET(par->s, &readfds);
|
||||
select_timeout.tv_sec=5;
|
||||
--
|
||||
2.13.0
|
||||
|
@@ -1,21 +1,20 @@
|
||||
From 35e7be609df3c37eded9a3fd117ba0cef02f24c7 Mon Sep 17 00:00:00 2001
|
||||
From cd34de81164087b3593d0ec9416e2f157a5df40d 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.
|
||||
|
||||
---
|
||||
dlls/d3d9/tests/visual.c | 2 +-
|
||||
dlls/netapi32/netapi32.c | 2 +-
|
||||
dlls/winealsa.drv/mmdevdrv.c | 2 +-
|
||||
dlls/wined3d/glsl_shader.c | 2 +-
|
||||
tools/makedep.c | 2 +-
|
||||
5 files changed, 5 insertions(+), 5 deletions(-)
|
||||
dlls/d3d9/tests/visual.c | 2 +-
|
||||
dlls/netapi32/netapi32.c | 2 +-
|
||||
dlls/wined3d/glsl_shader.c | 2 +-
|
||||
tools/makedep.c | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 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 +24,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
|
||||
@@ -37,25 +36,12 @@ index bb61e7f..cf4c466 100644
|
||||
NET_API_STATUS status;
|
||||
|
||||
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
|
||||
--- 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
|
||||
{
|
||||
WCHAR *ret;
|
||||
const WCHAR *prefix;
|
||||
- DWORD len_wchars = 0, chunk1_len, copied = 0, prefix_len;
|
||||
+ DWORD len_wchars = 0, chunk1_len = 0, copied = 0, prefix_len;
|
||||
|
||||
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 f96f48d97d1..8fe3318cd78 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;
|
||||
@@ -9721,7 +9721,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 +50,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 296356b0a57..5a2873b56f1 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 +63,5 @@ index d8cf2f5..280f62f 100644
|
||||
var = get_make_variable( make, name );
|
||||
if (!var) return NULL;
|
||||
--
|
||||
2.6.2
|
||||
2.13.1
|
||||
|
||||
|
@@ -0,0 +1,25 @@
|
||||
From 814a4e7a4cad942e284a4828927dd0b67938af33 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 2 Jul 2017 22:32:45 +0200
|
||||
Subject: wsdapi: Avoid implicit cast of interface pointer.
|
||||
|
||||
---
|
||||
dlls/wsdapi/msgparams.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wsdapi/msgparams.c b/dlls/wsdapi/msgparams.c
|
||||
index a7a2f0a73b3..47a77138709 100644
|
||||
--- a/dlls/wsdapi/msgparams.c
|
||||
+++ b/dlls/wsdapi/msgparams.c
|
||||
@@ -45,7 +45,7 @@ static inline IWSDMessageParametersImpl *impl_from_IWSDMessageParameters(IWSDMes
|
||||
|
||||
static inline IWSDUdpMessageParametersImpl *impl_from_IWSDUdpMessageParameters(IWSDUdpMessageParameters *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, IWSDUdpMessageParametersImpl, base.IWSDMessageParameters_iface);
|
||||
+ return CONTAINING_RECORD((IWSDMessageParameters *)iface, IWSDUdpMessageParametersImpl, base.IWSDMessageParameters_iface);
|
||||
}
|
||||
|
||||
/* IWSDMessageParameters implementation */
|
||||
--
|
||||
2.13.1
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From bee5e0baac722c66ad8c1034a65a2cecfe74716e Mon Sep 17 00:00:00 2001
|
||||
From fcefc5661656de44d02fed0431b4a61fa618b663 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.
|
||||
@@ -6,13 +6,13 @@ Subject: advapi32: Implement LsaLookupPrivilegeName.
|
||||
---
|
||||
dlls/advapi32/advapi32.spec | 2 +-
|
||||
dlls/advapi32/advapi32_misc.h | 2 ++
|
||||
dlls/advapi32/lsa.c | 38 ++++++++++++++++++++++++++++++++++++++
|
||||
dlls/advapi32/lsa.c | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
dlls/advapi32/security.c | 27 ++++++++++++++++++---------
|
||||
include/ntsecapi.h | 1 +
|
||||
5 files changed, 60 insertions(+), 10 deletions(-)
|
||||
5 files changed, 61 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
|
||||
index 078bb8fc25..124f527282 100644
|
||||
index d5503490a0..709a385967 100644
|
||||
--- a/dlls/advapi32/advapi32.spec
|
||||
+++ b/dlls/advapi32/advapi32.spec
|
||||
@@ -469,7 +469,7 @@
|
||||
@@ -36,10 +36,10 @@ index d116ecb836..ecb07f635a 100644
|
||||
+
|
||||
#endif /* __WINE_ADVAPI32MISC_H */
|
||||
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
|
||||
index 479201bfc1..ceb3b05c05 100644
|
||||
index 3da6d19b82..af5f9dd46d 100644
|
||||
--- a/dlls/advapi32/lsa.c
|
||||
+++ b/dlls/advapi32/lsa.c
|
||||
@@ -973,3 +973,41 @@ NTSTATUS WINAPI LsaUnregisterPolicyChangeNotification(
|
||||
@@ -973,3 +973,42 @@ NTSTATUS WINAPI LsaUnregisterPolicyChangeNotification(
|
||||
FIXME("(%d,%p) stub\n", class, event);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
@@ -67,7 +67,8 @@ index 479201bfc1..ceb3b05c05 100644
|
||||
+
|
||||
+ if (lpLuid->HighPart ||
|
||||
+ (lpLuid->LowPart < SE_MIN_WELL_KNOWN_PRIVILEGE ||
|
||||
+ lpLuid->LowPart > SE_MAX_WELL_KNOWN_PRIVILEGE))
|
||||
+ lpLuid->LowPart > SE_MAX_WELL_KNOWN_PRIVILEGE ||
|
||||
+ !WellKnownPrivNames[lpLuid->LowPart]))
|
||||
+ return STATUS_NO_SUCH_PRIVILEGE;
|
||||
+
|
||||
+ priv_size = (strlenW(WellKnownPrivNames[lpLuid->LowPart]) + 1) * sizeof(WCHAR);
|
||||
@@ -158,5 +159,5 @@ index 2bb3d312e4..0bf0eca43e 100644
|
||||
ULONG WINAPI LsaNtStatusToWinError(NTSTATUS);
|
||||
NTSTATUS WINAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
|
||||
--
|
||||
2.11.0
|
||||
2.13.1
|
||||
|
||||
|
@@ -1 +1 @@
|
||||
Fixes: Add LsaLookupPrivilege[Display]Name stubs
|
||||
Fixes: [43316] Add LsaLookupPrivilege[Display]Name stubs
|
||||
|
@@ -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
|
||||
|
@@ -0,0 +1,69 @@
|
||||
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
|
||||
|
2
patches/advapi32-BuildSecurityDescriptor/definition
Normal file
2
patches/advapi32-BuildSecurityDescriptor/definition
Normal file
@@ -0,0 +1,2 @@
|
||||
Fixes: Initial implementation of advapi32.BuildSecurityDescriptorW
|
||||
Depends: advapi32-GetExplicitEntriesFromAclW
|
@@ -1,4 +1,4 @@
|
||||
From b4469d7a12637ef2b57df3f6aebbe65c9b52ef57 Mon Sep 17 00:00:00 2001
|
||||
From 510d9f43f441bc3a9723aabfd2c1cdc8737d6dcc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 28 Aug 2016 21:56:41 +0200
|
||||
Subject: advapi32: Implement GetExplicitEntriesFromAclW.
|
||||
@@ -9,10 +9,10 @@ Subject: advapi32: Implement GetExplicitEntriesFromAclW.
|
||||
2 files changed, 221 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
|
||||
index 7e41c0a7361..ccd0bf64cab 100644
|
||||
index e36792cff4..b305947347 100644
|
||||
--- a/dlls/advapi32/security.c
|
||||
+++ b/dlls/advapi32/security.c
|
||||
@@ -4202,8 +4202,85 @@ DWORD WINAPI GetExplicitEntriesFromAclA( PACL pacl, PULONG pcCountOfExplicitEntr
|
||||
@@ -4205,8 +4205,85 @@ DWORD WINAPI GetExplicitEntriesFromAclA( PACL pacl, PULONG pcCountOfExplicitEntr
|
||||
DWORD WINAPI GetExplicitEntriesFromAclW( PACL pacl, PULONG pcCountOfExplicitEntries,
|
||||
PEXPLICIT_ACCESSW* pListOfExplicitEntries)
|
||||
{
|
||||
@@ -101,10 +101,10 @@ index 7e41c0a7361..ccd0bf64cab 100644
|
||||
|
||||
/******************************************************************************
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index c31dfbeace3..23cbff58117 100644
|
||||
index 3c68205922..ca5edffae5 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -133,6 +133,7 @@ static BOOL (WINAPI *pGetWindowsAccountDomainSid)(PSID,PSID,DWORD*);
|
||||
@@ -134,6 +134,7 @@ static BOOL (WINAPI *pGetWindowsAccountDomainSid)(PSID,PSID,DWORD*);
|
||||
static void (WINAPI *pRtlInitAnsiString)(PANSI_STRING,PCSZ);
|
||||
static NTSTATUS (WINAPI *pRtlFreeUnicodeString)(PUNICODE_STRING);
|
||||
static PSID_IDENTIFIER_AUTHORITY (WINAPI *pGetSidIdentifierAuthority)(PSID);
|
||||
@@ -112,16 +112,16 @@ index c31dfbeace3..23cbff58117 100644
|
||||
|
||||
static HMODULE hmod;
|
||||
static int myARGC;
|
||||
@@ -227,6 +228,7 @@ static void init(void)
|
||||
pGetAce = (void *)GetProcAddress(hmod, "GetAce");
|
||||
@@ -230,6 +231,7 @@ static void init(void)
|
||||
pGetWindowsAccountDomainSid = (void *)GetProcAddress(hmod, "GetWindowsAccountDomainSid");
|
||||
pGetSidIdentifierAuthority = (void *)GetProcAddress(hmod, "GetSidIdentifierAuthority");
|
||||
pDuplicateTokenEx = (void *)GetProcAddress(hmod, "DuplicateTokenEx");
|
||||
+ pGetExplicitEntriesFromAclW = (void *)GetProcAddress(hmod, "GetExplicitEntriesFromAclW");
|
||||
|
||||
myARGC = winetest_get_mainargs( &myARGV );
|
||||
}
|
||||
@@ -6451,6 +6453,145 @@ static void test_maximum_allowed(void)
|
||||
CloseHandle(handle);
|
||||
@@ -7076,6 +7078,145 @@ static void test_child_token_sd(void)
|
||||
HeapFree(GetProcessHeap(), 0, sd);
|
||||
}
|
||||
|
||||
+static void test_GetExplicitEntriesFromAclW(void)
|
||||
@@ -266,12 +266,14 @@ index c31dfbeace3..23cbff58117 100644
|
||||
START_TEST(security)
|
||||
{
|
||||
init();
|
||||
@@ -6499,4 +6640,5 @@ START_TEST(security)
|
||||
test_GetSidIdentifierAuthority();
|
||||
@@ -7129,6 +7270,7 @@ START_TEST(security)
|
||||
test_pseudo_tokens();
|
||||
test_maximum_allowed();
|
||||
test_token_label();
|
||||
+ test_GetExplicitEntriesFromAclW();
|
||||
}
|
||||
|
||||
/* Must be the last test, modifies process token */
|
||||
test_token_security_descriptor();
|
||||
--
|
||||
2.11.0
|
||||
2.13.1
|
||||
|
||||
|
@@ -0,0 +1,267 @@
|
||||
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
|
||||
|
@@ -0,0 +1,139 @@
|
||||
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
|
||||
|
@@ -0,0 +1,380 @@
|
||||
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
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user