advapi32: Fix failures in the security tests compiled with PSDK headers.
This commit is contained in:
parent
23fa5c43fa
commit
c25b071898
@ -35,6 +35,9 @@
|
|||||||
|
|
||||||
#include "wine/test.h"
|
#include "wine/test.h"
|
||||||
|
|
||||||
|
/* PROCESS_ALL_ACCESS in Vista+ PSDKs is incompatible with older Windows versions */
|
||||||
|
#define PROCESS_ALL_ACCESS_NT4 (PROCESS_ALL_ACCESS & ~0xf000)
|
||||||
|
|
||||||
/* copied from Wine winternl.h - not included in the Windows SDK */
|
/* copied from Wine winternl.h - not included in the Windows SDK */
|
||||||
typedef enum _OBJECT_INFORMATION_CLASS {
|
typedef enum _OBJECT_INFORMATION_CLASS {
|
||||||
ObjectBasicInformation,
|
ObjectBasicInformation,
|
||||||
@ -2545,7 +2548,7 @@ static void test_process_security(void)
|
|||||||
/* Doesn't matter what ACL say we should get full access for ourselves */
|
/* Doesn't matter what ACL say we should get full access for ourselves */
|
||||||
res = CreateProcessA( NULL, buffer, &psa, NULL, FALSE, 0, NULL, NULL, &startup, &info );
|
res = CreateProcessA( NULL, buffer, &psa, NULL, FALSE, 0, NULL, NULL, &startup, &info );
|
||||||
ok(res, "CreateProcess with err:%d\n", GetLastError());
|
ok(res, "CreateProcess with err:%d\n", GetLastError());
|
||||||
TEST_GRANTED_ACCESS2( info.hProcess, PROCESS_ALL_ACCESS,
|
TEST_GRANTED_ACCESS2( info.hProcess, PROCESS_ALL_ACCESS_NT4,
|
||||||
STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL );
|
STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL );
|
||||||
winetest_wait_child_process( info.hProcess );
|
winetest_wait_child_process( info.hProcess );
|
||||||
|
|
||||||
@ -2597,7 +2600,7 @@ static void test_process_security_child(void)
|
|||||||
ret = DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(),
|
ret = DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(),
|
||||||
&handle, 0, TRUE, DUPLICATE_SAME_ACCESS );
|
&handle, 0, TRUE, DUPLICATE_SAME_ACCESS );
|
||||||
ok(ret, "duplicating handle err:%d\n", GetLastError());
|
ok(ret, "duplicating handle err:%d\n", GetLastError());
|
||||||
TEST_GRANTED_ACCESS2( handle, PROCESS_ALL_ACCESS,
|
TEST_GRANTED_ACCESS2( handle, PROCESS_ALL_ACCESS_NT4,
|
||||||
STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL );
|
STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL );
|
||||||
|
|
||||||
CloseHandle( handle );
|
CloseHandle( handle );
|
||||||
@ -2606,7 +2609,7 @@ static void test_process_security_child(void)
|
|||||||
ret = DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(),
|
ret = DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(),
|
||||||
&handle, PROCESS_ALL_ACCESS, TRUE, 0 );
|
&handle, PROCESS_ALL_ACCESS, TRUE, 0 );
|
||||||
ok(ret, "duplicating handle err:%d\n", GetLastError());
|
ok(ret, "duplicating handle err:%d\n", GetLastError());
|
||||||
TEST_GRANTED_ACCESS2( handle, PROCESS_ALL_ACCESS,
|
TEST_GRANTED_ACCESS2( handle, PROCESS_ALL_ACCESS_NT4,
|
||||||
PROCESS_ALL_ACCESS | PROCESS_QUERY_LIMITED_INFORMATION );
|
PROCESS_ALL_ACCESS | PROCESS_QUERY_LIMITED_INFORMATION );
|
||||||
ret = DuplicateHandle( GetCurrentProcess(), handle, GetCurrentProcess(),
|
ret = DuplicateHandle( GetCurrentProcess(), handle, GetCurrentProcess(),
|
||||||
&handle1, PROCESS_VM_READ, TRUE, 0 );
|
&handle1, PROCESS_VM_READ, TRUE, 0 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user