- 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:
Thomas Bluemel 2005-05-05 15:39:27 +00:00
parent 9961bb7d69
commit b9c033f3ec
4 changed files with 101 additions and 19 deletions

View file

@ -51,10 +51,10 @@ BuildImpersonateTrusteeW@8
;BuildSecurityDescriptorW@36
BuildTrusteeWithNameA@8
BuildTrusteeWithNameW@8
;BuildTrusteeWithObjectsAndNameA@24
;BuildTrusteeWithObjectsAndNameW@24
;BuildTrusteeWithObjectsAndSidA@20
;BuildTrusteeWithObjectsAndSidW@20
BuildTrusteeWithObjectsAndNameA@24
BuildTrusteeWithObjectsAndNameW@24
BuildTrusteeWithObjectsAndSidA@20
BuildTrusteeWithObjectsAndSidW@20
BuildTrusteeWithSidA@8
BuildTrusteeWithSidW@8
;CancelOverlappedAccess@4
@ -271,7 +271,7 @@ GetOldestEventLogRecord@8
GetSecurityDescriptorControl@12
GetSecurityDescriptorDacl@16
GetSecurityDescriptorGroup@12
GetSecurityDescriptorLength@4
GetSecurityDescriptorLength@4=NTDLL.RtlLengthSecurityDescriptor
GetSecurityDescriptorOwner@12
GetSecurityDescriptorRMControl@8
GetSecurityDescriptorSacl@16
@ -487,7 +487,7 @@ RegGetKeySecurity@16
RegLoadKeyA@12
RegLoadKeyW@12
RegNotifyChangeKeyValue@20
;RegOpenCurrentUser
RegOpenCurrentUser@8
RegOpenKeyA@12
RegOpenKeyExA@20
RegOpenKeyExW@20

View file

@ -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
*

View file

@ -102,19 +102,6 @@ GetSecurityDescriptorGroup (
}
/*
* @implemented
*/
DWORD
STDCALL
GetSecurityDescriptorLength (
PSECURITY_DESCRIPTOR pSecurityDescriptor
)
{
return RtlLengthSecurityDescriptor(pSecurityDescriptor);
}
/*
* @implemented
*/

View file

@ -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.@]
*/