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
138 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
214a0fd7bd | ||
|
94f314ccaa | ||
|
90c47aa854 | ||
|
51cfdc619e | ||
|
d7154d5d3f | ||
|
412e20cd9a | ||
|
a043977b12 | ||
|
b64814b44a | ||
|
f3b9983a5e | ||
|
d205b5f8e9 | ||
|
ab69e65646 | ||
|
965002dc53 | ||
|
a6eddc4c25 | ||
|
7a9913e0a9 | ||
|
e8ba49a434 | ||
|
3dcb983637 | ||
|
74e9c4f8ce | ||
|
8ff32873d6 | ||
|
9190e30a15 | ||
|
8cf0e5c285 | ||
|
110a6f6016 | ||
|
720db34b6e | ||
|
a701f0ed4c | ||
|
c58c70e961 | ||
|
93e4c328d7 | ||
|
06c1bde586 | ||
|
ec47c04ab3 | ||
|
e7bff1bb4f | ||
|
39cafb1db1 | ||
|
49f93040fe | ||
|
af0347a0f2 | ||
|
0e828a225e | ||
|
eb5196c132 | ||
|
f45bfd8af7 | ||
|
d9dc36f879 | ||
|
2c7a662655 | ||
|
ec218012c3 | ||
|
c2d58dc59a | ||
|
2f3ba1fb46 | ||
|
9a1a1f02fb | ||
|
f7210fb07e | ||
|
9d12bd013b | ||
|
7da7ae71d2 | ||
|
f23105a6d8 | ||
|
a7ae3783c5 | ||
|
12d22ddfd7 | ||
|
b6649197d6 | ||
|
e1fb783018 | ||
|
1de1a96f1e | ||
|
00de4984f6 | ||
|
87b63971e9 | ||
|
f07947d41c | ||
|
ea7016fe39 | ||
|
a5044d57dd | ||
|
ba9e6db9f3 | ||
|
925645e710 | ||
|
2e982e862f | ||
|
8b65c06f30 | ||
|
f0d3ae8cf2 | ||
|
44aadc3afc | ||
|
18f4be0e03 | ||
|
49025c255b | ||
|
12be01bfc1 | ||
|
79f6a17908 | ||
|
2b85113f61 | ||
|
60e4f489f6 | ||
|
fd81bd7755 | ||
|
292a0e67f4 | ||
|
7993325086 | ||
|
77ecb8ba3f | ||
|
d3bb80f8eb | ||
|
0b4011d95c | ||
|
23fd2d0f93 | ||
|
f61b8570b8 | ||
|
738fd3fd35 | ||
|
8ed2ef6f5c | ||
|
686ab91ec6 | ||
|
d53fc8ece0 | ||
|
a505e3815f | ||
|
51b6a46ce0 | ||
|
729a9ebadd | ||
|
4e57013325 | ||
|
19db07f062 | ||
|
74b35082b3 | ||
|
24f0fcf07d | ||
|
59948639b6 | ||
|
2bf4df0d11 | ||
|
ba6b6642fb | ||
|
da5cec25df | ||
|
5e51e13900 | ||
|
82eedec6ed | ||
|
7c9f9bc0c1 | ||
|
c3a5e9290e | ||
|
01a9cda461 | ||
|
7d7e852679 | ||
|
78878ee3b9 | ||
|
b27ebc675a | ||
|
6499b77447 | ||
|
c9eaabbba9 | ||
|
ae4862e0fb | ||
|
a755842e30 | ||
|
3168a74745 | ||
|
91b1d2470a | ||
|
03cdc2f2c8 | ||
|
12fb928da8 | ||
|
4592d28a7a | ||
|
122a110c7a | ||
|
d78f0a5a7b | ||
|
95d74e37bd | ||
|
e884abcd88 | ||
|
f98bff1805 | ||
|
6b93eac6ad | ||
|
5ffb34bc71 | ||
|
cf3c3e93e5 | ||
|
7997379312 | ||
|
26bb2b21f2 | ||
|
8df70b8b0c | ||
|
b69aa1fa72 | ||
|
d28e1388c0 | ||
|
b305d85b78 | ||
|
d0cc6096d1 | ||
|
eb816d477a | ||
|
69650f38d8 | ||
|
06caa35518 | ||
|
51557bbf6e | ||
|
1121536608 | ||
|
deac22809d | ||
|
da46ed3444 | ||
|
53a402bde4 | ||
|
41b4cfa2c4 | ||
|
7715ae4be5 | ||
|
f5bb52ba01 | ||
|
584fc68f0e | ||
|
93d16ba18b | ||
|
a6526e647f | ||
|
7966caf282 | ||
|
7348f0b12b | ||
|
501012afe2 |
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [33037] Add support for querying performance counters data
|
@@ -1,4 +1,4 @@
|
||||
From a7af0ee96959aab299e543e9d6938e2533780c47 Mon Sep 17 00:00:00 2001
|
||||
From 45713db2d90bd8833415ad2af1920cc792767535 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 e78c1ca..fde5f18 100644
|
||||
index de6f007..a3607d1 100644
|
||||
--- a/dlls/kernel32/kernel32.spec
|
||||
+++ b/dlls/kernel32/kernel32.spec
|
||||
@@ -315,7 +315,7 @@
|
||||
@@ -24,10 +24,10 @@ index e78c1ca..fde5f18 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 2075dfd..f9606be 100644
|
||||
index f568022..e270ca7 100644
|
||||
--- a/dlls/kernel32/process.c
|
||||
+++ b/dlls/kernel32/process.c
|
||||
@@ -2436,12 +2436,13 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer,
|
||||
@@ -2438,12 +2438,13 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer,
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -47,17 +47,17 @@ index 2075dfd..f9606be 100644
|
||||
{
|
||||
BOOL retv = FALSE;
|
||||
HANDLE hFile = 0;
|
||||
@@ -2454,6 +2455,9 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
|
||||
@@ -2456,6 +2457,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) );
|
||||
|
||||
+ if (token) FIXME("Creating a process with a token is not yet implemented\n");
|
||||
+ if (new_token) FIXME("No support for returning created process token\n");
|
||||
+
|
||||
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, sizeof(name)/sizeof(WCHAR),
|
||||
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, ARRAY_SIZE( name ),
|
||||
&hFile, &binary_info )))
|
||||
return FALSE;
|
||||
@@ -2605,8 +2609,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA( LPCSTR app_name, LPSTR cmd_line, L
|
||||
@@ -2607,8 +2611,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 2075dfd..f9606be 100644
|
||||
done:
|
||||
HeapFree( GetProcessHeap(), 0, app_nameW );
|
||||
HeapFree( GetProcessHeap(), 0, cmd_lineW );
|
||||
@@ -2625,8 +2629,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW( LPCWSTR app_name, LPWSTR cmd_line,
|
||||
@@ -2627,8 +2631,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 2075dfd..f9606be 100644
|
||||
|
||||
|
||||
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
|
||||
index 8cac67f..e8fd7aa 100644
|
||||
index fb7fafe..9d6c5f9 100644
|
||||
--- a/dlls/kernelbase/kernelbase.spec
|
||||
+++ b/dlls/kernelbase/kernelbase.spec
|
||||
@@ -209,7 +209,7 @@
|
||||
@@ -93,7 +93,7 @@ index 8cac67f..e8fd7aa 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 4ddc1d3..e21cf6e 100644
|
||||
index 667df96..b77bced 100644
|
||||
--- a/include/winbase.h
|
||||
+++ b/include/winbase.h
|
||||
@@ -1856,6 +1856,7 @@ WINBASEAPI BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTE
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 23181e8cbe07ac0fd3b6effd04624122a6b0024f Mon Sep 17 00:00:00 2001
|
||||
From b534f2d905c3ba205c9a4f895149e6be8425b31e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 6 Aug 2017 02:08:05 +0200
|
||||
Subject: [PATCH] server: Implement support for creating processes using a
|
||||
@@ -15,10 +15,10 @@ Subject: [PATCH] server: Implement support for creating processes using a
|
||||
7 files changed, 59 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
|
||||
index f9606be..c0b89f9 100644
|
||||
index e270ca7..633065b 100644
|
||||
--- a/dlls/kernel32/process.c
|
||||
+++ b/dlls/kernel32/process.c
|
||||
@@ -2034,7 +2034,7 @@ static NTSTATUS create_struct_sd(PSECURITY_DESCRIPTOR nt_sd, struct security_des
|
||||
@@ -2036,7 +2036,7 @@ static NTSTATUS create_struct_sd(PSECURITY_DESCRIPTOR nt_sd, struct security_des
|
||||
* Create a new process. If hFile is a valid handle we have an exe
|
||||
* file, otherwise it is a Winelib app.
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ index f9606be..c0b89f9 100644
|
||||
LPCWSTR cur_dir, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
|
||||
LPPROCESS_INFORMATION info, LPCSTR unixdir,
|
||||
@@ -2180,6 +2180,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
|
||||
@@ -2182,6 +2182,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
|
||||
req->info_size = startup_info_size;
|
||||
req->env_size = (env_end - env) * sizeof(WCHAR);
|
||||
req->process_sd_size = process_sd_size;
|
||||
@@ -35,7 +35,7 @@ index f9606be..c0b89f9 100644
|
||||
|
||||
wine_server_add_data( req, startup_info, startup_info_size );
|
||||
wine_server_add_data( req, env, (env_end - env) * sizeof(WCHAR) );
|
||||
@@ -2280,7 +2281,7 @@ error:
|
||||
@@ -2282,7 +2283,7 @@ error:
|
||||
*
|
||||
* Create a new VDM process for a 16-bit or DOS application.
|
||||
*/
|
||||
@@ -44,7 +44,7 @@ index f9606be..c0b89f9 100644
|
||||
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
|
||||
LPPROCESS_INFORMATION info, LPCSTR unixdir,
|
||||
@@ -2304,7 +2305,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
|
||||
@@ -2306,7 +2307,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
|
||||
return FALSE;
|
||||
}
|
||||
sprintfW(new_cmd_line, argsW, winevdmW, buffer, cmd_line);
|
||||
@@ -53,7 +53,7 @@ index f9606be..c0b89f9 100644
|
||||
flags, startup, info, unixdir, binary_info, exec_only );
|
||||
HeapFree( GetProcessHeap(), 0, new_cmd_line );
|
||||
return ret;
|
||||
@@ -2316,7 +2317,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
|
||||
@@ -2318,7 +2319,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
|
||||
*
|
||||
* Create a new cmd shell process for a .BAT file.
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ index f9606be..c0b89f9 100644
|
||||
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
|
||||
LPPROCESS_INFORMATION info )
|
||||
@@ -2344,8 +2345,8 @@ static BOOL create_cmd_process( LPCWSTR filename, LPWSTR cmd_line, LPVOID env, L
|
||||
@@ -2346,8 +2347,8 @@ static BOOL create_cmd_process( LPCWSTR filename, LPWSTR cmd_line, LPVOID env, L
|
||||
strcatW( newcmdline, quotW );
|
||||
strcatW( newcmdline, cmd_line );
|
||||
strcatW( newcmdline, quotW );
|
||||
@@ -73,7 +73,7 @@ index f9606be..c0b89f9 100644
|
||||
HeapFree( GetProcessHeap(), 0, newcmdline );
|
||||
return ret;
|
||||
}
|
||||
@@ -2455,7 +2456,9 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2457,7 +2458,9 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
|
||||
TRACE("app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
|
||||
|
||||
@@ -83,8 +83,8 @@ index f9606be..c0b89f9 100644
|
||||
+
|
||||
if (new_token) FIXME("No support for returning created process token\n");
|
||||
|
||||
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, sizeof(name)/sizeof(WCHAR),
|
||||
@@ -2513,20 +2516,20 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, ARRAY_SIZE( name ),
|
||||
@@ -2515,20 +2518,20 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
debugstr_w(name), (binary_info.flags & BINARY_FLAG_64BIT) ? 64 : 32,
|
||||
wine_dbgstr_longlong(binary_info.res_start), wine_dbgstr_longlong(binary_info.res_end),
|
||||
binary_info.arch, (binary_info.flags & BINARY_FLAG_FAKEDLL) ? ", fakedll" : "" );
|
||||
@@ -108,7 +108,7 @@ index f9606be..c0b89f9 100644
|
||||
inherit, flags, startup_info, info, unixdir, &binary_info, FALSE );
|
||||
break;
|
||||
case BINARY_UNKNOWN:
|
||||
@@ -2538,7 +2541,7 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2540,7 +2543,7 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
TRACE( "starting %s as DOS binary\n", debugstr_w(name) );
|
||||
binary_info.type = BINARY_DOS;
|
||||
binary_info.arch = IMAGE_FILE_MACHINE_I386;
|
||||
@@ -117,7 +117,7 @@ index f9606be..c0b89f9 100644
|
||||
inherit, flags, startup_info, info, unixdir,
|
||||
&binary_info, FALSE );
|
||||
break;
|
||||
@@ -2546,7 +2549,7 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2548,7 +2551,7 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
if (!strcmpiW( p, batW ) || !strcmpiW( p, cmdW ) )
|
||||
{
|
||||
TRACE( "starting %s as batch binary\n", debugstr_w(name) );
|
||||
@@ -126,7 +126,7 @@ index f9606be..c0b89f9 100644
|
||||
inherit, flags, startup_info, info );
|
||||
break;
|
||||
}
|
||||
@@ -2666,12 +2669,12 @@ static void exec_process( LPCWSTR name )
|
||||
@@ -2668,12 +2671,12 @@ static void exec_process( LPCWSTR name )
|
||||
debugstr_w(name), (binary_info.flags & BINARY_FLAG_64BIT) ? 64 : 32,
|
||||
wine_dbgstr_longlong(binary_info.res_start), wine_dbgstr_longlong(binary_info.res_end),
|
||||
binary_info.arch );
|
||||
@@ -141,7 +141,7 @@ index f9606be..c0b89f9 100644
|
||||
FALSE, 0, &startup_info, &info, NULL, &binary_info, TRUE );
|
||||
break;
|
||||
case BINARY_UNKNOWN:
|
||||
@@ -2685,7 +2688,7 @@ static void exec_process( LPCWSTR name )
|
||||
@@ -2687,7 +2690,7 @@ static void exec_process( LPCWSTR name )
|
||||
case BINARY_WIN16:
|
||||
case BINARY_DOS:
|
||||
TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(name) );
|
||||
@@ -248,7 +248,7 @@ index 78e88ec..313c36a 100644
|
||||
extern struct thread *get_process_first_thread( struct process *process );
|
||||
extern struct process *get_process_from_id( process_id_t id );
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 5fb6e38..f0bc83b 100644
|
||||
index b29df0a..95a120e 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -748,6 +748,7 @@ struct rawinput_device
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 31a5f689a12c1db6edcc86dcd8e81f38a5f19fc5 Mon Sep 17 00:00:00 2001
|
||||
From baff5c160cf7f1ac0011bf8f55d506bf0346e1fd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 7 Aug 2017 02:53:06 +0200
|
||||
Subject: user32: Start explorer.exe using limited rights.
|
||||
Subject: [PATCH] user32: Start explorer.exe using limited rights.
|
||||
|
||||
---
|
||||
dlls/advapi32/tests/security.c | 4 ++--
|
||||
@@ -9,10 +9,10 @@ Subject: user32: Start explorer.exe using limited rights.
|
||||
2 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index f1a64e29dea..52524ee6fe2 100644
|
||||
index f27642e7a7..0271cd72e0 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -7387,7 +7387,7 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7313,7 +7313,7 @@ static void test_token_security_descriptor(void)
|
||||
ret = GetTokenInformation(token4, TokenIntegrityLevel, buffer_integrity, sizeof(buffer_integrity), &size);
|
||||
ok(ret, "GetTokenInformation failed with error %u\n", GetLastError());
|
||||
tml = (TOKEN_MANDATORY_LABEL *)buffer_integrity;
|
||||
@@ -21,7 +21,7 @@ index f1a64e29dea..52524ee6fe2 100644
|
||||
|
||||
size = 0;
|
||||
ret = GetKernelObjectSecurity(token4, LABEL_SECURITY_INFORMATION, NULL, 0, &size);
|
||||
@@ -7841,7 +7841,7 @@ static void test_child_token_sd_medium(void)
|
||||
@@ -7768,7 +7768,7 @@ static void test_child_token_sd_medium(void)
|
||||
ret = GetTokenInformation(token, TokenIntegrityLevel, buffer_integrity, sizeof(buffer_integrity), &size);
|
||||
ok(ret, "GetTokenInformation failed with error %u\n", GetLastError());
|
||||
tml = (TOKEN_MANDATORY_LABEL *)buffer_integrity;
|
||||
@@ -31,7 +31,7 @@ index f1a64e29dea..52524ee6fe2 100644
|
||||
HeapFree(GetProcessHeap(), 0, sd);
|
||||
}
|
||||
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
|
||||
index cbf22374374..ea116b9d139 100644
|
||||
index cbfd8bb14a..8039f54fb0 100644
|
||||
--- a/dlls/user32/win.c
|
||||
+++ b/dlls/user32/win.c
|
||||
@@ -43,6 +43,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(win);
|
||||
@@ -43,15 +43,15 @@ index cbf22374374..ea116b9d139 100644
|
||||
static DWORD process_layout = ~0u;
|
||||
|
||||
static struct list window_surfaces = LIST_INIT( window_surfaces );
|
||||
@@ -2067,6 +2069,7 @@ HWND WINAPI GetDesktopWindow(void)
|
||||
WCHAR app[MAX_PATH + sizeof(explorer)/sizeof(WCHAR)];
|
||||
WCHAR cmdline[MAX_PATH + (sizeof(explorer) + sizeof(args))/sizeof(WCHAR)];
|
||||
@@ -2052,6 +2054,7 @@ HWND WINAPI GetDesktopWindow(void)
|
||||
WCHAR app[MAX_PATH + ARRAY_SIZE( explorer )];
|
||||
WCHAR cmdline[MAX_PATH + ARRAY_SIZE( explorer ) + ARRAY_SIZE( args )];
|
||||
WCHAR desktop[MAX_PATH];
|
||||
+ HANDLE token;
|
||||
void *redir;
|
||||
|
||||
SERVER_START_REQ( set_user_object_info )
|
||||
@@ -2099,9 +2102,12 @@ HWND WINAPI GetDesktopWindow(void)
|
||||
@@ -2084,9 +2087,12 @@ HWND WINAPI GetDesktopWindow(void)
|
||||
strcpyW( cmdline, app );
|
||||
strcatW( cmdline, args );
|
||||
|
||||
@@ -66,7 +66,7 @@ index cbf22374374..ea116b9d139 100644
|
||||
{
|
||||
TRACE( "started explorer pid %04x tid %04x\n", pi.dwProcessId, pi.dwThreadId );
|
||||
WaitForInputIdle( pi.hProcess, 10000 );
|
||||
@@ -2111,6 +2117,8 @@ HWND WINAPI GetDesktopWindow(void)
|
||||
@@ -2096,6 +2102,8 @@ HWND WINAPI GetDesktopWindow(void)
|
||||
else WARN( "failed to start explorer, err %d\n", GetLastError() );
|
||||
Wow64RevertWow64FsRedirection( redir );
|
||||
|
||||
@@ -76,5 +76,5 @@ index cbf22374374..ea116b9d139 100644
|
||||
{
|
||||
req->force = 1;
|
||||
--
|
||||
2.13.1
|
||||
2.18.0
|
||||
|
||||
|
@@ -1,20 +1,20 @@
|
||||
From 71366dad7ac934b2e24cfcf19104b4589b91652a Mon Sep 17 00:00:00 2001
|
||||
From b14282d138ff6a5ad1d5c152d0a556c9ca648c36 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 7 Aug 2017 03:33:26 +0200
|
||||
Subject: server: Correctly assign security labels for tokens.
|
||||
Subject: [PATCH] server: Correctly assign security labels for tokens.
|
||||
|
||||
---
|
||||
dlls/advapi32/tests/security.c | 21 ++++++++++-----------
|
||||
server/process.c | 8 +-------
|
||||
dlls/advapi32/tests/security.c | 21 +++++++++--------
|
||||
server/process.c | 8 +------
|
||||
server/security.h | 2 +-
|
||||
server/token.c | 41 ++++++++++++++++++++++++-----------------
|
||||
server/token.c | 41 ++++++++++++++++++++--------------
|
||||
4 files changed, 36 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index 52524ee6fe2..a35baab0e25 100644
|
||||
index 0271cd72e0..3b07e7cd2f 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -7289,7 +7289,6 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7215,7 +7215,6 @@ static void test_token_security_descriptor(void)
|
||||
defaulted = TRUE;
|
||||
ret = GetSecurityDescriptorDacl(sd2, &present, &acl2, &defaulted);
|
||||
ok(ret, "GetSecurityDescriptorDacl failed with error %u\n", GetLastError());
|
||||
@@ -22,7 +22,7 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
ok(present, "DACL not present\n");
|
||||
|
||||
if (present)
|
||||
@@ -7410,7 +7409,7 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7336,7 +7335,7 @@ static void test_token_security_descriptor(void)
|
||||
ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
"Unexpected ACE type %#x\n", ace->Header.AceType);
|
||||
@@ -31,7 +31,7 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
"Expected medium integrity level\n");
|
||||
}
|
||||
|
||||
@@ -7463,8 +7462,8 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7389,8 +7388,8 @@ static void test_token_security_descriptor(void)
|
||||
sacl = NULL;
|
||||
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
|
||||
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
|
||||
@@ -42,7 +42,7 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
|
||||
if (sacl)
|
||||
{
|
||||
@@ -7513,8 +7512,8 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7439,8 +7438,8 @@ static void test_token_security_descriptor(void)
|
||||
sacl = NULL;
|
||||
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
|
||||
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
|
||||
@@ -53,7 +53,7 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
|
||||
if (sacl)
|
||||
{
|
||||
@@ -7578,8 +7577,8 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7504,8 +7503,8 @@ static void test_token_security_descriptor(void)
|
||||
|
||||
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
|
||||
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
|
||||
@@ -64,7 +64,7 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
|
||||
if (sacl)
|
||||
{
|
||||
@@ -7616,8 +7615,8 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7542,8 +7541,8 @@ static void test_token_security_descriptor(void)
|
||||
sacl = NULL;
|
||||
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
|
||||
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
|
||||
@@ -75,7 +75,7 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
|
||||
if (sacl)
|
||||
{
|
||||
@@ -7834,7 +7833,7 @@ static void test_child_token_sd_medium(void)
|
||||
@@ -7761,7 +7760,7 @@ static void test_child_token_sd_medium(void)
|
||||
ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
ok(ace_label->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
"Unexpected ACE type %#x\n", ace_label->Header.AceType);
|
||||
@@ -85,10 +85,10 @@ index 52524ee6fe2..a35baab0e25 100644
|
||||
|
||||
memset(buffer_integrity, 0, sizeof(buffer_integrity));
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index ef2452fb8fb..ae998ab80b9 100644
|
||||
index 7d2206f274..74cc320f44 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -571,17 +571,11 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
|
||||
@@ -567,17 +567,11 @@ 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 */
|
||||
@@ -108,7 +108,7 @@ index ef2452fb8fb..ae998ab80b9 100644
|
||||
if (pipe( request_pipe ) == -1)
|
||||
{
|
||||
diff --git a/server/security.h b/server/security.h
|
||||
index 32dfe5f8db9..87377ccd673 100644
|
||||
index 32dfe5f8db..87377ccd67 100644
|
||||
--- a/server/security.h
|
||||
+++ b/server/security.h
|
||||
@@ -59,7 +59,7 @@ extern int token_assign_label( struct token *token, PSID label );
|
||||
@@ -121,10 +121,10 @@ index 32dfe5f8db9..87377ccd673 100644
|
||||
const LUID_AND_ATTRIBUTES *reqprivs,
|
||||
unsigned int count, LUID_AND_ATTRIBUTES *usedprivs);
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index c507294b49d..c6b0f0d39d3 100644
|
||||
index 28042471b0..e5639fc0d5 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -686,7 +686,7 @@ static int filter_privilege( struct privilege *privilege, const LUID_AND_ATTRIBU
|
||||
@@ -668,7 +668,7 @@ static int filter_privilege( struct privilege *privilege, const LUID_AND_ATTRIBU
|
||||
struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
int impersonation_level, const struct security_descriptor *sd,
|
||||
const LUID_AND_ATTRIBUTES *filter_privileges, unsigned int priv_count,
|
||||
@@ -133,7 +133,7 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
{
|
||||
const luid_t *modified_id =
|
||||
primary || (impersonation_level == src_token->impersonation_level) ?
|
||||
@@ -750,6 +750,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
@@ -735,6 +735,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
if (sd) default_set_sd( &token->obj, sd, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
|
||||
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION );
|
||||
|
||||
@@ -146,7 +146,7 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
return token;
|
||||
}
|
||||
|
||||
@@ -922,6 +928,12 @@ struct token *token_create_admin( void )
|
||||
@@ -907,6 +913,12 @@ struct token *token_create_admin( void )
|
||||
admin_source, NULL, -1, TokenElevationTypeFull, &high_label_sid );
|
||||
/* we really need a primary group */
|
||||
assert( token->primary_group );
|
||||
@@ -159,7 +159,7 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
}
|
||||
|
||||
free( logon_sid );
|
||||
@@ -980,6 +992,12 @@ static struct token *token_create_limited( void )
|
||||
@@ -965,6 +977,12 @@ static struct token *token_create_limited( void )
|
||||
admin_source, NULL, -1, TokenElevationTypeLimited, &medium_label_sid );
|
||||
/* we really need a primary group */
|
||||
assert( token->primary_group );
|
||||
@@ -172,7 +172,7 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
}
|
||||
|
||||
free( logon_sid );
|
||||
@@ -1448,7 +1466,8 @@ DECL_HANDLER(duplicate_token)
|
||||
@@ -1433,7 +1451,8 @@ DECL_HANDLER(duplicate_token)
|
||||
TOKEN_DUPLICATE,
|
||||
&token_ops )))
|
||||
{
|
||||
@@ -182,7 +182,7 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
if (token)
|
||||
{
|
||||
unsigned int access = req->access ? req->access : get_handle_access( current->process, req->handle );
|
||||
@@ -1478,7 +1497,7 @@ DECL_HANDLER(filter_token)
|
||||
@@ -1463,7 +1482,7 @@ DECL_HANDLER(filter_token)
|
||||
group_count = get_sid_count( filter_groups, get_req_data_size() - priv_count * sizeof(LUID_AND_ATTRIBUTES) );
|
||||
|
||||
token = token_duplicate( src_token, src_token->primary, src_token->impersonation_level, NULL,
|
||||
@@ -191,7 +191,7 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
if (token)
|
||||
{
|
||||
unsigned int access = get_handle_access( current->process, req->handle );
|
||||
@@ -1813,23 +1832,11 @@ DECL_HANDLER(set_token_default_dacl)
|
||||
@@ -1789,23 +1808,11 @@ DECL_HANDLER(set_token_default_dacl)
|
||||
DECL_HANDLER(create_token)
|
||||
{
|
||||
struct token *token;
|
||||
@@ -218,5 +218,5 @@ index c507294b49d..c6b0f0d39d3 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.13.1
|
||||
2.18.0
|
||||
|
||||
|
@@ -1,14 +1,13 @@
|
||||
From 562369cf1fc87ffd0f46b184f0e3f2492610f65b Mon Sep 17 00:00:00 2001
|
||||
From a4d5c33bb2fc98fd0f84ea05575e0d3eeb5a1bcd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 12 Apr 2016 01:02:34 +0200
|
||||
Subject: [PATCH] uiautomationcore: Add dll and stub some functions.
|
||||
|
||||
---
|
||||
dlls/uiautomationcore/Makefile.in | 1 +
|
||||
dlls/uiautomationcore/uia_main.c | 57 +++++++++++++++++++++++++----
|
||||
dlls/uiautomationcore/uiautomationcore.spec | 6 +++
|
||||
include/uiautomationcoreapi.h | 9 +++--
|
||||
4 files changed, 61 insertions(+), 12 deletions(-)
|
||||
dlls/uiautomationcore/uia_main.c | 53 +++++++++++++++++++++++++----
|
||||
dlls/uiautomationcore/uiautomationcore.spec | 6 ++++
|
||||
3 files changed, 54 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/uiautomationcore/Makefile.in b/dlls/uiautomationcore/Makefile.in
|
||||
index 78d6254..029fc2e 100644
|
||||
@@ -21,7 +20,7 @@ index 78d6254..029fc2e 100644
|
||||
C_SRCS = \
|
||||
uia_main.c
|
||||
diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c
|
||||
index 31b7d3e..ff0506d 100644
|
||||
index 31b7d3e..cc4831e 100644
|
||||
--- a/dlls/uiautomationcore/uia_main.c
|
||||
+++ b/dlls/uiautomationcore/uia_main.c
|
||||
@@ -1,4 +1,5 @@
|
||||
@@ -102,7 +101,7 @@ index 31b7d3e..ff0506d 100644
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -61,17 +102,17 @@ HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value)
|
||||
@@ -61,8 +102,8 @@ HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value)
|
||||
*/
|
||||
HRESULT WINAPI UiaGetReservedNotSupportedValue(IUnknown **value)
|
||||
{
|
||||
@@ -113,17 +112,6 @@ index 31b7d3e..ff0506d 100644
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* UiaLookupId (uiautomationcore.@)
|
||||
*/
|
||||
-int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid)
|
||||
+int WINAPI UiaLookupId(AutomationIdentifierType type, const GUID *guid)
|
||||
{
|
||||
- FIXME("(%d, %s) stub!\n", type, debugstr_guid(guid));
|
||||
+ FIXME("(%d, %s): stub!\n", type, debugstr_guid(guid));
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -81,7 +122,7 @@ int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid)
|
||||
LRESULT WINAPI UiaReturnRawElementProvider(HWND hwnd, WPARAM wParam,
|
||||
LPARAM lParam, IRawElementProviderSimple *elprov)
|
||||
@@ -168,34 +156,6 @@ index 48a06b2..8e676ad 100644
|
||||
@ stub UiaRegisterProviderCallback
|
||||
@ stub UiaRemoveEvent
|
||||
@ stdcall UiaReturnRawElementProvider(long long long ptr)
|
||||
diff --git a/include/uiautomationcoreapi.h b/include/uiautomationcoreapi.h
|
||||
index 12c509f..5ddf4b6 100644
|
||||
--- a/include/uiautomationcoreapi.h
|
||||
+++ b/include/uiautomationcoreapi.h
|
||||
@@ -39,18 +39,19 @@ DECLARE_HANDLE(HUIAPATTERNOBJECT);
|
||||
DECLARE_HANDLE(HUIATEXTRANGE);
|
||||
DECLARE_HANDLE(HUIAEVENT);
|
||||
|
||||
-enum AutomationIdentifierType
|
||||
+typedef enum AutomationIdentifierType
|
||||
{
|
||||
AutomationIdentifierType_Property,
|
||||
AutomationIdentifierType_Pattern,
|
||||
AutomationIdentifierType_Event,
|
||||
AutomationIdentifierType_ControlType,
|
||||
- AutomationIdentifierType_TextAttribute
|
||||
-};
|
||||
+ AutomationIdentifierType_TextAttribute,
|
||||
+ AutomationIdentifierType_LandmarkType,
|
||||
+} AutomationIdentifierType;
|
||||
|
||||
HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value);
|
||||
HRESULT WINAPI UiaGetReservedNotSupportedValue(IUnknown **value);
|
||||
-int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid);
|
||||
+int WINAPI UiaLookupId(AutomationIdentifierType type, const GUID *guid);
|
||||
BOOL WINAPI UiaPatternRelease(HUIAPATTERNOBJECT hobj);
|
||||
HRESULT WINAPI UiaRaiseAutomationEvent(IRawElementProviderSimple *provider, EVENTID id);
|
||||
LRESULT WINAPI UiaReturnRawElementProvider(HWND hwnd, WPARAM wParam, LPARAM lParam, IRawElementProviderSimple *elprov);
|
||||
--
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,21 +1,5 @@
|
||||
Fixes: Add api-ms-win-core-quirks-l1-1-0 dll
|
||||
Fixes: Add api-ms-win-appmodel-runtime-l1-1-1 dll
|
||||
Fixes: Add api-ms-win-core-apiquery-l1-1-0 dll
|
||||
Fixes: Add api-ms-win-core-heap-l2-1-0 dll
|
||||
Fixes: Add api-ms-win-shcore-obsolete-l1-1-0 dll
|
||||
Fixes: Add ext-ms-win-xaml-pal-l1-1-0 dll
|
||||
Fixes: Add ext-ms-win-appmodel-usercontext-l1-1-0 dll
|
||||
Fixes: Add api-ms-win-shcore-thread-l1-1-0 dll
|
||||
Fixes: Add api-ms-win-core-memory-l1-1-2 dll
|
||||
Fixes: Add api-ms-win-core-shlwapi-obsolete-l1-2-0 dll
|
||||
Fixes: Add api-ms-win-shcore-stream-l1-1-0 dll
|
||||
Fixes: Add ext-ms-win-ntuser-mouse-l1-1-0 dll
|
||||
Fixes: Add ext-ms-win-uxtheme-themes-l1-1-0 dll
|
||||
Fixes: Add api-ms-win-rtcore-ntuser-window-l1-1-0 dll
|
||||
Fixes: Add ext-ms-win-rtcore-ntuser-syscolors-l1-1-0 dll
|
||||
Fixes: Add api-ms-win-rtcore-ntuser-draw-l1-1-0 dll
|
||||
Fixes: Add ext-ms-win-rtcore-ntuser-sysparams-l1-1-0 dll
|
||||
Fixes: Add ext-ms-win-kernel32-package-current-l1-1-0 dll
|
||||
Fixes: Add ext-ms-win-xaml-pal-l1-1-0 dll and XamlBehaviourEnabled() stub
|
||||
Fixes: Add ext-ms-win-xaml-pal-l1-1-0.GetThemeServices() stub
|
||||
Fixes: Add ext-ms-win-appmodel-usercontext-l1-1-0 dll and UserContextExtInitialize() stub
|
||||
Fixes: Add iertutil dll
|
||||
Fixes: Add shcore dll
|
||||
Fixes: [40451] Add feclient dll
|
||||
Fixes: Return dummy interface in some uiautomationcore functions
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user