Which will happen if the user is not an administrator.
---
Addressing [test failures](https://test.winehq.org/data/patterns.html#advapi32:security) from !7972, pointed out by Rémi.
From: Tim Clem tclem@codeweavers.com
Which will happen if the user is not an administrator. --- dlls/advapi32/tests/security.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index f21778587d8..dba7955f2ea 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -8577,7 +8577,11 @@ static void test_admin_elevation(void) ok(tid, "got error %lu\n", GetLastError());
hproc = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid); - ok(hproc != NULL, "got error %lu\n", GetLastError()); + if (!hproc) + { + skip("could not open process, error %lu\n", GetLastError()); + return; + }
ret = OpenProcessToken(hproc, TOKEN_READ, &htok); ok(ret, "got error %lu\n", GetLastError());
Jinoh Kang (@iamahuman) commented about dlls/advapi32/tests/security.c:
ok(tid, "got error %lu\n", GetLastError()); hproc = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid);
- ok(hproc != NULL, "got error %lu\n", GetLastError());
- if (!hproc)
- {
skip("could not open process, error %lu\n", GetLastError());
```suggestion:-0+0 ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu.\n", GetLastError()); skip("could not open process, error %lu\n", GetLastError()); ```
(Untested)