Module: wine Branch: refs/heads/master Commit: 7b156bf1702cc2bf4a704334640a2cdb5b446c0d URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=7b156bf1702cc2bf4a704334...
Author: Saulius Krasuckas saulius2@ar.fi.lt Date: Mon May 22 00:06:47 2006 +0300
advapi32: Skip token attribute testing if OpenProcessToken() is not implemented.
---
dlls/advapi32/tests/security.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 8dd6df3..46f00f6 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -703,11 +703,18 @@ static void test_token_attr(void) TOKEN_GROUPS *Groups; TOKEN_USER *User; BOOL ret; - DWORD i; - LPTSTR SidString; + DWORD i, GLE; + LPSTR SidString;
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &Token); - ok(ret, "OpenProcessToken failed with error %ld\n", GetLastError()); + GLE = GetLastError(); + ok(ret || (GLE == ERROR_CALL_NOT_IMPLEMENTED), + "OpenProcessToken failed with error %ld\n", GLE); + if(!ret && (GLE == ERROR_CALL_NOT_IMPLEMENTED)) + { + trace("OpenProcessToken() not implemented, skipping test_token_attr()\n"); + return; + }
/* groups */ ret = GetTokenInformation(Token, TokenGroups, NULL, 0, &Size);