[PATCH] wintrust/tests: Handle ERROR_ACCESS_DENIED failures

Detlef Riekenberg wine.dev at web.de
Mon Aug 6 17:12:16 CDT 2012


--
By by ... Detlef
---
 dlls/wintrust/tests/crypt.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/wintrust/tests/crypt.c b/dlls/wintrust/tests/crypt.c
index d6672ea..ec12332 100644
--- a/dlls/wintrust/tests/crypt.c
+++ b/dlls/wintrust/tests/crypt.c
@@ -558,6 +558,11 @@ static void test_CryptCATAdminAddRemoveCatalog(void)
 
     /* Unique name will be created */
     hcatinfo = pCryptCATAdminAddCatalog(hcatadmin, tmpfileW, NULL, 0);
+    if (!hcatinfo && (GetLastError() == ERROR_ACCESS_DENIED))
+    {
+        win_skip("Not enough rights\n");
+        goto cleanup;
+    }
     todo_wine ok(hcatinfo != NULL, "CryptCATAdminAddCatalog failed %u\n", GetLastError());
 
     info.cbStruct = sizeof(info);
@@ -620,6 +625,7 @@ static void test_CryptCATAdminAddRemoveCatalog(void)
     attrs = GetFileAttributes(catfilepath);
     ok(attrs == INVALID_FILE_ATTRIBUTES, "Expected %s to be removed\n", catfilepath);
 
+cleanup:
     ret = pCryptCATAdminReleaseContext(hcatadmin, 0);
     ok(ret, "CryptCATAdminReleaseContext failed %u\n", GetLastError());
 
-- 
1.7.5.4




More information about the wine-patches mailing list