mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:35:40 +00:00
-move ConvertSecurityDescriptorToStringSecurityDescriptorA/W from sec.c to sid.c
-import ConvertSecurityDescriptorToStringSecurityDescriptorA from wine svn path=/trunk/; revision=36981
This commit is contained in:
parent
b46e8cc18b
commit
13dcae5f0c
2 changed files with 59 additions and 32 deletions
|
@ -607,36 +607,4 @@ EncryptFileA(LPCSTR lpFileName)
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
BOOL WINAPI
|
||||
ConvertSecurityDescriptorToStringSecurityDescriptorW(PSECURITY_DESCRIPTOR pSecurityDescriptor,
|
||||
DWORD dword,
|
||||
SECURITY_INFORMATION SecurityInformation,
|
||||
LPWSTR *lpwstr,
|
||||
PULONG pulong)
|
||||
{
|
||||
FIXME("%s() not implemented!\n", __FUNCTION__);
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
BOOL WINAPI
|
||||
ConvertSecurityDescriptorToStringSecurityDescriptorA(PSECURITY_DESCRIPTOR pSecurityDescriptor,
|
||||
DWORD dword,
|
||||
SECURITY_INFORMATION SecurityInformation,
|
||||
LPSTR *lpstr,
|
||||
PULONG pulong)
|
||||
{
|
||||
FIXME("%s() not implemented!\n", __FUNCTION__);
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -611,6 +611,65 @@ CopySid(DWORD nDestinationSidLength,
|
|||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* ConvertSecurityDescriptorToStringSecurityDescriptorW [ADVAPI32.@]
|
||||
* @unimplemented
|
||||
*/
|
||||
BOOL WINAPI
|
||||
ConvertSecurityDescriptorToStringSecurityDescriptorW(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
DWORD SDRevision,
|
||||
SECURITY_INFORMATION SecurityInformation,
|
||||
LPWSTR *OutputString,
|
||||
PULONG OutputLen)
|
||||
{
|
||||
if (SDRevision != SDDL_REVISION_1)
|
||||
{
|
||||
ERR("Pogram requested unknown SDDL revision %d\n", SDRevision);
|
||||
SetLastError(ERROR_UNKNOWN_REVISION);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
FIXME("%s() not implemented!\n", __FUNCTION__);
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* ConvertSecurityDescriptorToStringSecurityDescriptorA [ADVAPI32.@]
|
||||
* @implemented
|
||||
*/
|
||||
BOOL WINAPI
|
||||
ConvertSecurityDescriptorToStringSecurityDescriptorA(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
DWORD SDRevision,
|
||||
SECURITY_INFORMATION Information,
|
||||
LPSTR *OutputString,
|
||||
PULONG OutputLen)
|
||||
{
|
||||
LPWSTR wstr;
|
||||
ULONG len;
|
||||
if (ConvertSecurityDescriptorToStringSecurityDescriptorW(SecurityDescriptor, SDRevision, Information, &wstr, &len))
|
||||
{
|
||||
int lenA;
|
||||
|
||||
lenA = WideCharToMultiByte(CP_ACP, 0, wstr, len, NULL, 0, NULL, NULL);
|
||||
*OutputString = HeapAlloc(GetProcessHeap(), 0, lenA);
|
||||
WideCharToMultiByte(CP_ACP, 0, wstr, len, *OutputString, lenA, NULL, NULL);
|
||||
LocalFree(wstr);
|
||||
|
||||
if (OutputLen != NULL)
|
||||
*OutputLen = lenA;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
*OutputString = NULL;
|
||||
if (OutputLen)
|
||||
*OutputLen = 0;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* ConvertStringSecurityDescriptorToSecurityDescriptorW [ADVAPI32.@]
|
||||
* @implemented
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue