Robert Reif : advapi32: Add string sid tests.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jul 31 04:32:12 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 76fe25241d625fc1a2e4bb986d450e226bb55513
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=76fe25241d625fc1a2e4bb986d450e226bb55513
Author: Robert Reif <reif at earthlink.net>
Date: Sat Jul 29 07:45:23 2006 -0400
advapi32: Add string sid tests.
---
dlls/advapi32/tests/security.c | 57 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 57 insertions(+), 0 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index e6a7d7d..3b0ff83 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -73,6 +73,23 @@ static void init(void)
hmod = GetModuleHandle("advapi32.dll");
}
+static void test_str_sid(char *str_sid)
+{
+ PSID psid;
+ char *temp;
+
+ if (pConvertStringSidToSidA(str_sid, &psid))
+ {
+ if (pConvertSidToStringSidA(psid, &temp))
+ {
+ trace(" %s: %s\n", str_sid, temp);
+ LocalFree(temp);
+ }
+ }
+ else
+ trace("%s couldn't be converted\n", str_sid);
+}
+
static void test_sid(void)
{
struct sidRef refs[] = {
@@ -162,6 +179,46 @@ static void test_sid(void)
if( psid )
LocalFree( psid );
}
+
+ trace("String SIDs:\n");
+ test_str_sid("AO");
+ test_str_sid("RU");
+ test_str_sid("AN");
+ test_str_sid("AU");
+ test_str_sid("BA");
+ test_str_sid("BG");
+ test_str_sid("BO");
+ test_str_sid("BU");
+ test_str_sid("CA");
+ test_str_sid("CG");
+ test_str_sid("CO");
+ test_str_sid("DA");
+ test_str_sid("DC");
+ test_str_sid("DD");
+ test_str_sid("DG");
+ test_str_sid("DU");
+ test_str_sid("EA");
+ test_str_sid("ED");
+ test_str_sid("WD");
+ test_str_sid("PA");
+ test_str_sid("IU");
+ test_str_sid("LA");
+ test_str_sid("LG");
+ test_str_sid("LS");
+ test_str_sid("SY");
+ test_str_sid("NU");
+ test_str_sid("NO");
+ test_str_sid("NS");
+ test_str_sid("PO");
+ test_str_sid("PS");
+ test_str_sid("PU");
+ test_str_sid("RS");
+ test_str_sid("RD");
+ test_str_sid("RE");
+ test_str_sid("RC");
+ test_str_sid("SA");
+ test_str_sid("SO");
+ test_str_sid("SU");
}
static void test_trustee(void)
More information about the wine-cvs
mailing list