- 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
Modified: trunk/reactos/lib/advapi32/advapi32.def
Modified: trunk/reactos/lib/advapi32/reg/reg.c
Modified: trunk/reactos/lib/advapi32/sec/sec.c
Modified: trunk/reactos/lib/advapi32/sec/trustee.c
_____
Modified: trunk/reactos/lib/advapi32/advapi32.def
--- trunk/reactos/lib/advapi32/advapi32.def 2005-05-05 15:39:09 UTC
(rev 15002)
+++ trunk/reactos/lib/advapi32/advapi32.def 2005-05-05 15:39:27 UTC
(rev 15003)
@@ -51,10 +51,10 @@
;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 @@
GetSecurityDescriptorControl@12
GetSecurityDescriptorDacl@16
GetSecurityDescriptorGroup@12
-GetSecurityDescriptorLength@4
+GetSecurityDescriptorLength(a)4=NTDLL.RtlLengthSecurityDescriptor
GetSecurityDescriptorOwner@12
GetSecurityDescriptorRMControl@8
GetSecurityDescriptorSacl@16
@@ -487,7 +487,7 @@
RegLoadKeyA@12
RegLoadKeyW@12
RegNotifyChangeKeyValue@20
-;RegOpenCurrentUser
+RegOpenCurrentUser@8
RegOpenKeyA@12
RegOpenKeyExA@20
RegOpenKeyExW@20
_____
Modified: trunk/reactos/lib/advapi32/reg/reg.c
--- trunk/reactos/lib/advapi32/reg/reg.c 2005-05-05 15:39:09 UTC
(rev 15002)
+++ trunk/reactos/lib/advapi32/reg/reg.c 2005-05-05 15:39:27 UTC
(rev 15003)
@@ -1634,6 +1634,29 @@
/***********************************************************************
*
+ * 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
*
* 20050503 Fireball - imported from WINE
_____
Modified: trunk/reactos/lib/advapi32/sec/sec.c
--- trunk/reactos/lib/advapi32/sec/sec.c 2005-05-05 15:39:09 UTC
(rev 15002)
+++ trunk/reactos/lib/advapi32/sec/sec.c 2005-05-05 15:39:27 UTC
(rev 15003)
@@ -105,19 +105,6 @@
/*
* @implemented
*/
-DWORD
-STDCALL
-GetSecurityDescriptorLength (
- PSECURITY_DESCRIPTOR pSecurityDescriptor
- )
-{
- return RtlLengthSecurityDescriptor(pSecurityDescriptor);
-}
-
-
-/*
- * @implemented
- */
BOOL
STDCALL
GetSecurityDescriptorOwner (
_____
Modified: trunk/reactos/lib/advapi32/sec/trustee.c
--- trunk/reactos/lib/advapi32/sec/trustee.c 2005-05-05 15:39:09 UTC
(rev 15002)
+++ trunk/reactos/lib/advapi32/sec/trustee.c 2005-05-05 15:39:27 UTC
(rev 15003)
@@ -191,6 +191,78 @@
/***********************************************************************
*******
+ * 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.@]
*/
PTRUSTEEA WINAPI