mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
- ported BuildTrusteeWithObjectsAndNameA/W and BuildTrusteeWithObjectsAndSidA/W from wine
- implemented RegOpenCurrentUser - directly forward GetSecurityDescriptorLength to NTDLL.RtlLengthSecurityDescriptorguard dumping the stack trace to prevent infinite exception loopsguard dumping the stack trace to prevent infinite exception loops svn path=/trunk/; revision=15003
This commit is contained in:
parent
9961bb7d69
commit
b9c033f3ec
4 changed files with 101 additions and 19 deletions
|
@ -51,10 +51,10 @@ BuildImpersonateTrusteeW@8
|
||||||
;BuildSecurityDescriptorW@36
|
;BuildSecurityDescriptorW@36
|
||||||
BuildTrusteeWithNameA@8
|
BuildTrusteeWithNameA@8
|
||||||
BuildTrusteeWithNameW@8
|
BuildTrusteeWithNameW@8
|
||||||
;BuildTrusteeWithObjectsAndNameA@24
|
BuildTrusteeWithObjectsAndNameA@24
|
||||||
;BuildTrusteeWithObjectsAndNameW@24
|
BuildTrusteeWithObjectsAndNameW@24
|
||||||
;BuildTrusteeWithObjectsAndSidA@20
|
BuildTrusteeWithObjectsAndSidA@20
|
||||||
;BuildTrusteeWithObjectsAndSidW@20
|
BuildTrusteeWithObjectsAndSidW@20
|
||||||
BuildTrusteeWithSidA@8
|
BuildTrusteeWithSidA@8
|
||||||
BuildTrusteeWithSidW@8
|
BuildTrusteeWithSidW@8
|
||||||
;CancelOverlappedAccess@4
|
;CancelOverlappedAccess@4
|
||||||
|
@ -271,7 +271,7 @@ GetOldestEventLogRecord@8
|
||||||
GetSecurityDescriptorControl@12
|
GetSecurityDescriptorControl@12
|
||||||
GetSecurityDescriptorDacl@16
|
GetSecurityDescriptorDacl@16
|
||||||
GetSecurityDescriptorGroup@12
|
GetSecurityDescriptorGroup@12
|
||||||
GetSecurityDescriptorLength@4
|
GetSecurityDescriptorLength@4=NTDLL.RtlLengthSecurityDescriptor
|
||||||
GetSecurityDescriptorOwner@12
|
GetSecurityDescriptorOwner@12
|
||||||
GetSecurityDescriptorRMControl@8
|
GetSecurityDescriptorRMControl@8
|
||||||
GetSecurityDescriptorSacl@16
|
GetSecurityDescriptorSacl@16
|
||||||
|
@ -487,7 +487,7 @@ RegGetKeySecurity@16
|
||||||
RegLoadKeyA@12
|
RegLoadKeyA@12
|
||||||
RegLoadKeyW@12
|
RegLoadKeyW@12
|
||||||
RegNotifyChangeKeyValue@20
|
RegNotifyChangeKeyValue@20
|
||||||
;RegOpenCurrentUser
|
RegOpenCurrentUser@8
|
||||||
RegOpenKeyA@12
|
RegOpenKeyA@12
|
||||||
RegOpenKeyExA@20
|
RegOpenKeyExA@20
|
||||||
RegOpenKeyExW@20
|
RegOpenKeyExW@20
|
||||||
|
|
|
@ -1633,6 +1633,29 @@ RegNotifyChangeKeyValue (HKEY hKey,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* RegOpenCurrentUser
|
||||||
|
*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
LONG STDCALL
|
||||||
|
RegOpenCurrentUser (IN REGSAM samDesired,
|
||||||
|
OUT PHKEY phkResult)
|
||||||
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
Status = RtlOpenCurrentUser((ACCESS_MASK)samDesired,
|
||||||
|
(PHANDLE)phkResult);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
/* NOTE - don't set the last error code! just return the error! */
|
||||||
|
return RtlNtStatusToDosError(Status);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ERROR_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* RegOpenKeyA
|
* RegOpenKeyA
|
||||||
*
|
*
|
||||||
|
|
|
@ -102,19 +102,6 @@ GetSecurityDescriptorGroup (
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
DWORD
|
|
||||||
STDCALL
|
|
||||||
GetSecurityDescriptorLength (
|
|
||||||
PSECURITY_DESCRIPTOR pSecurityDescriptor
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return RtlLengthSecurityDescriptor(pSecurityDescriptor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -190,6 +190,78 @@ BuildTrusteeWithNameW(PTRUSTEE_W pTrustee, LPWSTR name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* BuildTrusteeWithObjectsAndNameA [ADVAPI32.@]
|
||||||
|
*/
|
||||||
|
VOID WINAPI
|
||||||
|
BuildTrusteeWithObjectsAndNameA(PTRUSTEEA pTrustee, POBJECTS_AND_NAME_A pObjName,
|
||||||
|
SE_OBJECT_TYPE ObjectType, LPSTR ObjectTypeName,
|
||||||
|
LPSTR InheritedObjectTypeName, LPSTR Name)
|
||||||
|
{
|
||||||
|
DPRINT("%p %p 0x%08x %p %p %s\n", pTrustee, pObjName,
|
||||||
|
ObjectType, ObjectTypeName, InheritedObjectTypeName, debugstr_a(Name));
|
||||||
|
|
||||||
|
pTrustee->pMultipleTrustee = NULL;
|
||||||
|
pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
|
||||||
|
pTrustee->TrusteeForm = TRUSTEE_IS_OBJECTS_AND_NAME;
|
||||||
|
pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||||
|
pTrustee->ptstrName = Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* BuildTrusteeWithObjectsAndNameW [ADVAPI32.@]
|
||||||
|
*/
|
||||||
|
VOID WINAPI
|
||||||
|
BuildTrusteeWithObjectsAndNameW(PTRUSTEEW pTrustee, POBJECTS_AND_NAME_W pObjName,
|
||||||
|
SE_OBJECT_TYPE ObjectType, LPWSTR ObjectTypeName,
|
||||||
|
LPWSTR InheritedObjectTypeName, LPWSTR Name)
|
||||||
|
{
|
||||||
|
DPRINT("%p %p 0x%08x %p %p %s\n", pTrustee, pObjName,
|
||||||
|
ObjectType, ObjectTypeName, InheritedObjectTypeName, debugstr_w(Name));
|
||||||
|
|
||||||
|
pTrustee->pMultipleTrustee = NULL;
|
||||||
|
pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
|
||||||
|
pTrustee->TrusteeForm = TRUSTEE_IS_OBJECTS_AND_NAME;
|
||||||
|
pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||||
|
pTrustee->ptstrName = Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* BuildTrusteeWithObjectsAndSidA [ADVAPI32.@]
|
||||||
|
*/
|
||||||
|
VOID WINAPI
|
||||||
|
BuildTrusteeWithObjectsAndSidA(PTRUSTEEA pTrustee, POBJECTS_AND_SID pObjSid,
|
||||||
|
GUID* pObjectGuid, GUID* pInheritedObjectGuid, PSID pSid)
|
||||||
|
{
|
||||||
|
DPRINT("%p %p %p %p %p\n", pTrustee, pObjSid, pObjectGuid, pInheritedObjectGuid, pSid);
|
||||||
|
|
||||||
|
pTrustee->pMultipleTrustee = NULL;
|
||||||
|
pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
|
||||||
|
pTrustee->TrusteeForm = TRUSTEE_IS_OBJECTS_AND_SID;
|
||||||
|
pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||||
|
pTrustee->ptstrName = (LPSTR) pSid;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* BuildTrusteeWithObjectsAndSidW [ADVAPI32.@]
|
||||||
|
*/
|
||||||
|
VOID WINAPI
|
||||||
|
BuildTrusteeWithObjectsAndSidW(PTRUSTEEW pTrustee, POBJECTS_AND_SID pObjSid,
|
||||||
|
GUID* pObjectGuid, GUID* pInheritedObjectGuid, PSID pSid)
|
||||||
|
{
|
||||||
|
DPRINT("%p %p %p %p %p\n", pTrustee, pObjSid, pObjectGuid, pInheritedObjectGuid, pSid);
|
||||||
|
|
||||||
|
pTrustee->pMultipleTrustee = NULL;
|
||||||
|
pTrustee->MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
|
||||||
|
pTrustee->TrusteeForm = TRUSTEE_IS_OBJECTS_AND_SID;
|
||||||
|
pTrustee->TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||||
|
pTrustee->ptstrName = (LPWSTR) pSid;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* GetMultipleTrusteeA [ADVAPI32.@]
|
* GetMultipleTrusteeA [ADVAPI32.@]
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue