From 2cecc630b646e4e79dd561807c8940119cfd9bdc Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Tue, 16 Oct 2007 09:51:00 +0100 Subject: [PATCH] advapi32: Don't link to CreateWellKnownSid at compile time in the security tests. It isn't available on some Windows platforms. --- dlls/advapi32/tests/security.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index b9a12ce9448..1a0e191f0ef 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -2012,6 +2012,11 @@ static void test_ConvertSecurityDescriptorToString() skip("ConvertSecurityDescriptorToStringSecurityDescriptor is not available\n"); return; } + if (!pCreateWellKnownSid) + { + skip("CreateWellKnownSid is not available\n"); + return; + } /* It seems Windows XP adds an extra character to the length of the string for each ACE in an ACL. We * don't replicate this feature so we only test len >= strlen+1. */ @@ -2025,7 +2030,7 @@ static void test_ConvertSecurityDescriptorToString() CHECK_RESULT_AND_FREE(""); size = 4096; - CreateWellKnownSid(WinLocalSid, NULL, sid_buf, &size); + pCreateWellKnownSid(WinLocalSid, NULL, sid_buf, &size); SetSecurityDescriptorOwner(&desc, (PSID)sid_buf, FALSE); ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); CHECK_RESULT_AND_FREE("O:S-1-2-0"); @@ -2035,7 +2040,7 @@ static void test_ConvertSecurityDescriptorToString() CHECK_RESULT_AND_FREE("O:S-1-2-0"); size = sizeof(sid_buf); - CreateWellKnownSid(WinLocalSystemSid, NULL, sid_buf, &size); + pCreateWellKnownSid(WinLocalSystemSid, NULL, sid_buf, &size); SetSecurityDescriptorOwner(&desc, (PSID)sid_buf, TRUE); ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); CHECK_RESULT_AND_FREE("O:SY");