advapi32: Add initial implementation for GetWindowsAccountDomainSid.
This commit is contained in:
parent
54b3973ee0
commit
4f3acf31de
|
@ -363,7 +363,7 @@
|
|||
@ stdcall GetTrusteeTypeW(ptr)
|
||||
@ stdcall GetUserNameA(ptr ptr)
|
||||
@ stdcall GetUserNameW(ptr ptr)
|
||||
# @ stub GetWindowsAccountDomainSid
|
||||
@ stdcall GetWindowsAccountDomainSid(ptr ptr ptr)
|
||||
# @ stub I_QueryTagInformation
|
||||
# @ stub I_ScGetCurrentGroupStateW
|
||||
# @ stub I_ScIsSecurityProcess
|
||||
|
|
|
@ -1538,6 +1538,52 @@ BOOL WINAPI SetSecurityDescriptorControl( PSECURITY_DESCRIPTOR pSecurityDescript
|
|||
pSecurityDescriptor, ControlBitsOfInterest, ControlBitsToSet ) );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetWindowsAccountDomainSid [ADVAPI32.@]
|
||||
*/
|
||||
BOOL WINAPI GetWindowsAccountDomainSid( PSID sid, PSID domain_sid, DWORD *size )
|
||||
{
|
||||
SID_IDENTIFIER_AUTHORITY domain_ident = { SECURITY_NT_AUTHORITY };
|
||||
DWORD required_size;
|
||||
int i;
|
||||
|
||||
FIXME( "(%p %p %p): semi-stub\n", sid, domain_sid, size );
|
||||
|
||||
if (!sid || !IsValidSid( sid ))
|
||||
{
|
||||
SetLastError( ERROR_INVALID_SID );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!size)
|
||||
{
|
||||
SetLastError( ERROR_INVALID_PARAMETER );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (*GetSidSubAuthorityCount( sid ) < 4)
|
||||
{
|
||||
SetLastError( ERROR_INVALID_SID );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
required_size = GetSidLengthRequired( 4 );
|
||||
if (*size < required_size || !domain_sid)
|
||||
{
|
||||
*size = required_size;
|
||||
SetLastError( domain_sid ? ERROR_INSUFFICIENT_BUFFER :
|
||||
ERROR_INVALID_PARAMETER );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
InitializeSid( domain_sid, &domain_ident, 4 );
|
||||
for (i = 0; i < 4; i++)
|
||||
*GetSidSubAuthority( domain_sid, i ) = *GetSidSubAuthority( sid, i );
|
||||
|
||||
*size = required_size;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* ##############################
|
||||
###### ACL FUNCTIONS ######
|
||||
##############################
|
||||
|
|
|
@ -5938,7 +5938,7 @@ static void test_GetWindowsAccountDomainSid(void)
|
|||
|
||||
if (!pGetWindowsAccountDomainSid)
|
||||
{
|
||||
skip("GetWindowsAccountDomainSid not available\n");
|
||||
win_skip("GetWindowsAccountDomainSid not available\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
@ stdcall GetSidSubAuthority(ptr long) advapi32.GetSidSubAuthority
|
||||
@ stdcall GetSidSubAuthorityCount(ptr) advapi32.GetSidSubAuthorityCount
|
||||
@ stdcall GetTokenInformation(long long ptr long ptr) advapi32.GetTokenInformation
|
||||
@ stub GetWindowsAccountDomainSid
|
||||
@ stdcall GetWindowsAccountDomainSid(ptr ptr ptr) advapi32.GetWindowsAccountDomainSid
|
||||
@ stdcall ImpersonateAnonymousToken(long) advapi32.ImpersonateAnonymousToken
|
||||
@ stdcall ImpersonateLoggedOnUser(long) advapi32.ImpersonateLoggedOnUser
|
||||
@ stdcall ImpersonateSelf(long) advapi32.ImpersonateSelf
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
@ stdcall GetSidSubAuthority(ptr long) advapi32.GetSidSubAuthority
|
||||
@ stdcall GetSidSubAuthorityCount(ptr) advapi32.GetSidSubAuthorityCount
|
||||
@ stdcall GetTokenInformation(long long ptr long ptr) advapi32.GetTokenInformation
|
||||
@ stub GetWindowsAccountDomainSid
|
||||
@ stdcall GetWindowsAccountDomainSid(ptr ptr ptr) advapi32.GetWindowsAccountDomainSid
|
||||
@ stdcall ImpersonateAnonymousToken(long) advapi32.ImpersonateAnonymousToken
|
||||
@ stdcall ImpersonateLoggedOnUser(long) advapi32.ImpersonateLoggedOnUser
|
||||
@ stdcall ImpersonateSelf(long) advapi32.ImpersonateSelf
|
||||
|
|
Loading…
Reference in New Issue