mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
Fix BuildTrusteeWithSid, implement and test BuildTrusteeWithName.
This commit is contained in:
parent
cc3af24375
commit
e27ae38f01
@ -20,8 +20,8 @@
|
||||
@ stdcall BackupEventLogW (long wstr)
|
||||
@ stub BuildExplicitAccessWithNameA
|
||||
@ stub BuildExplicitAccessWithNameW
|
||||
@ stub BuildTrusteeWithNameA # (ptr str)
|
||||
@ stub BuildTrusteeWithNameW # (ptr wstr)
|
||||
@ stdcall BuildTrusteeWithNameA(ptr str)
|
||||
@ stdcall BuildTrusteeWithNameW(ptr wstr)
|
||||
@ stub BuildTrusteeWithObjectsAndNameA # (ptr ptr long str str str)
|
||||
@ stub BuildTrusteeWithObjectsAndNameW # (ptr ptr long wstr wstr wstr)
|
||||
@ stub BuildTrusteeWithObjectsAndSidA # (ptr ptr ptr ptr ptr)
|
||||
|
@ -1519,8 +1519,7 @@ VOID WINAPI BuildTrusteeWithSidA(PTRUSTEEA pTrustee, PSID pSid)
|
||||
|
||||
pTrustee->pMultipleTrustee = NULL;
|
||||
pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
|
||||
pTrustee->TrusteeForm = NO_MULTIPLE_TRUSTEE;
|
||||
pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||
pTrustee->TrusteeForm = TRUSTEE_IS_SID;
|
||||
pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||
pTrustee->ptstrName = (LPSTR) pSid;
|
||||
}
|
||||
@ -1534,12 +1533,39 @@ VOID WINAPI BuildTrusteeWithSidW(PTRUSTEEW pTrustee, PSID pSid)
|
||||
|
||||
pTrustee->pMultipleTrustee = NULL;
|
||||
pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
|
||||
pTrustee->TrusteeForm = NO_MULTIPLE_TRUSTEE;
|
||||
pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||
pTrustee->TrusteeForm = TRUSTEE_IS_SID;
|
||||
pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||
pTrustee->ptstrName = (LPWSTR) pSid;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* BuildTrusteeWithNameA [ADVAPI32.@]
|
||||
*/
|
||||
VOID WINAPI BuildTrusteeWithNameA(PTRUSTEEA pTrustee, LPSTR name)
|
||||
{
|
||||
TRACE("%p %s\n", pTrustee, debugstr_a(name) );
|
||||
|
||||
pTrustee->pMultipleTrustee = NULL;
|
||||
pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
|
||||
pTrustee->TrusteeForm = TRUSTEE_IS_NAME;
|
||||
pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||
pTrustee->ptstrName = name;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* BuildTrusteeWithNameW [ADVAPI32.@]
|
||||
*/
|
||||
VOID WINAPI BuildTrusteeWithNameW(PTRUSTEEW pTrustee, LPWSTR name)
|
||||
{
|
||||
TRACE("%p %s\n", pTrustee, debugstr_w(name) );
|
||||
|
||||
pTrustee->pMultipleTrustee = NULL;
|
||||
pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
|
||||
pTrustee->TrusteeForm = TRUSTEE_IS_NAME;
|
||||
pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||
pTrustee->ptstrName = name;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SetEntriesInAclA [ADVAPI32.@]
|
||||
*/
|
||||
|
@ -62,6 +62,7 @@ void test_trustee()
|
||||
TRUSTEE trustee;
|
||||
PSID psid;
|
||||
DWORD r;
|
||||
LPSTR str = "2jjj";
|
||||
|
||||
SID_IDENTIFIER_AUTHORITY auth = { {0x11,0x22,0,0,0, 0} };
|
||||
|
||||
@ -78,8 +79,19 @@ void test_trustee()
|
||||
ok( trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, "TrusteeType wrong\n");
|
||||
ok( trustee.ptstrName == (LPSTR) psid, "ptstrName wrong\n" );
|
||||
FreeSid( psid );
|
||||
}
|
||||
|
||||
/* test BuildTrusteeWithNameA */
|
||||
memset( &trustee, 0xff, sizeof trustee );
|
||||
BuildTrusteeWithNameA( &trustee, str );
|
||||
|
||||
ok( trustee.pMultipleTrustee == NULL, "pMultipleTrustee wrong\n");
|
||||
ok( trustee.MultipleTrusteeOperation == NO_MULTIPLE_TRUSTEE,
|
||||
"MultipleTrusteeOperation wrong\n");
|
||||
ok( trustee.TrusteeForm == TRUSTEE_IS_NAME, "TrusteeForm wrong\n");
|
||||
ok( trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, "TrusteeType wrong\n");
|
||||
ok( trustee.ptstrName == str, "ptstrName wrong\n" );
|
||||
}
|
||||
|
||||
START_TEST(security)
|
||||
{
|
||||
test_sid();
|
||||
|
Loading…
Reference in New Issue
Block a user