Paul Vriens : advapi32/tests: Don't crash on win98.
Alexandre Julliard
julliard at winehq.org
Tue Jan 8 10:21:43 CST 2008
Module: wine
Branch: master
Commit: d2e0786eb26e9dc8e1f9460ad02148bb7024fca8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d2e0786eb26e9dc8e1f9460ad02148bb7024fca8
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Tue Jan 8 10:18:17 2008 +0100
advapi32/tests: Don't crash on win98.
---
dlls/advapi32/tests/security.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index e9f4795..217d89c 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -1627,11 +1627,18 @@ static void test_security_descriptor(void)
SECURITY_DESCRIPTOR sd;
char buf[8192];
DWORD size;
- BOOL isDefault, isPresent;
+ BOOL isDefault, isPresent, ret;
PACL pacl;
PSID psid;
- InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
+ SetLastError(0xdeadbeef);
+ ret = InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
+ if (ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ {
+ skip("InitializeSecurityDescriptor is not implemented\n");
+ return;
+ }
+
ok(GetSecurityDescriptorOwner(&sd, &psid, &isDefault), "GetSecurityDescriptorOwner failed\n");
expect_eq(psid, NULL, PSID, "%p");
expect_eq(isDefault, FALSE, BOOL, "%d");
@@ -2253,6 +2260,12 @@ static void test_PrivateObjectSecurity(void)
ULONG len;
PSECURITY_DESCRIPTOR buf;
+ if (!pConvertStringSecurityDescriptorToSecurityDescriptorA)
+ {
+ skip("ConvertStringSecurityDescriptorToSecurityDescriptor is not available\n");
+ return;
+ }
+
ok(pConvertStringSecurityDescriptorToSecurityDescriptorA(
"O:SY"
"G:S-1-5-21-93476-23408-4576"
@@ -2308,6 +2321,12 @@ static void test_acls(void)
SetLastError(0xdeadbeef);
ret = InitializeAcl(pAcl, sizeof(ACL) - 1, ACL_REVISION);
+ if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ {
+ skip("InitializeAcl is not implemented\n");
+ return;
+ }
+
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "InitializeAcl with too small a buffer should have failed with ERROR_INSUFFICIENT_BUFFER instead of %d\n", GetLastError());
SetLastError(0xdeadbeef);
More information about the wine-cvs
mailing list