- Implement RtlSetAttributesSecurityDescriptor,
RtlInitializeGenericTableAvl, RtlNumberGenericTableElements and
RtlNumberGenericTableElementsAvl.
Modified: trunk/reactos/lib/ntdll/def/ntdll.def
Modified: trunk/reactos/lib/rtl/generictable.c
Modified: trunk/reactos/lib/rtl/sd.c
_____
Modified: trunk/reactos/lib/ntdll/def/ntdll.def
--- trunk/reactos/lib/ntdll/def/ntdll.def 2005-02-14 11:57:51 UTC
(rev 13557)
+++ trunk/reactos/lib/ntdll/def/ntdll.def 2005-02-14 14:36:03 UTC
(rev 13558)
@@ -586,7 +586,7 @@
RtlSecondsSince1980ToTime@8
RtlSelfRelativeToAbsoluteSD@44
RtlSetAllBits@4
-;RtlSetAttributesSecurityDescriptor
+RtlSetAttributesSecurityDescriptor@12
RtlSetBits@12
RtlSetControlSecurityDescriptor@12
RtlSetCriticalSectionSpinCount@8
_____
Modified: trunk/reactos/lib/rtl/generictable.c
--- trunk/reactos/lib/rtl/generictable.c 2005-02-14 11:57:51 UTC
(rev 13557)
+++ trunk/reactos/lib/rtl/generictable.c 2005-02-14 14:36:03 UTC
(rev 13558)
@@ -28,6 +28,7 @@
#define NDEBUG
#include <debug.h>
+
/* FUNCTIONS
*****************************************************************/
/*
@@ -177,22 +178,28 @@
UNIMPLEMENTED;
}
+
/*
-* @unimplemented
-*/
-VOID
-STDCALL
-RtlInitializeGenericTableAvl (
- PRTL_AVL_TABLE Table,
- PRTL_AVL_COMPARE_ROUTINE CompareRoutine,
- PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine,
- PRTL_AVL_FREE_ROUTINE FreeRoutine,
- PVOID TableContext
- )
+ * @implemented
+ */
+VOID STDCALL
+RtlInitializeGenericTableAvl(IN OUT PRTL_AVL_TABLE Table,
+ IN PRTL_AVL_COMPARE_ROUTINE
CompareRoutine,
+ IN PRTL_AVL_ALLOCATE_ROUTINE
AllocateRoutine,
+ IN PRTL_AVL_FREE_ROUTINE FreeRoutine,
+ IN PVOID TableContext)
{
- UNIMPLEMENTED;
+ RtlZeroMemory(Table,
+ sizeof(RTL_AVL_TABLE));
+ Table->BalancedRoot.Parent = &Table->BalancedRoot;
+
+ Table->CompareRoutine = CompareRoutine;
+ Table->AllocateRoutine = AllocateRoutine;
+ Table->FreeRoutine = FreeRoutine;
+ Table->TableContext = TableContext;
}
+
/*
* @unimplemented
*/
@@ -351,29 +358,22 @@
/*
-* @unimplemented
-*/
-ULONG
-STDCALL
-RtlNumberGenericTableElements(
- PRTL_GENERIC_TABLE Table
- )
+ * @implemented
+ */
+ULONG STDCALL
+RtlNumberGenericTableElements(IN PRTL_GENERIC_TABLE Table)
{
- UNIMPLEMENTED;
- return 0;
+ return Table->NumberGenericTableElements;
}
+
/*
-* @unimplemented
-*/
-ULONG
-STDCALL
-RtlNumberGenericTableElementsAvl (
- PRTL_AVL_TABLE Table
- )
+ * @implemented
+ */
+ULONG STDCALL
+RtlNumberGenericTableElementsAvl(IN PRTL_AVL_TABLE Table)
{
- UNIMPLEMENTED;
- return 0;
+ return Table->NumberGenericTableElements;
}
/* EOF */
_____
Modified: trunk/reactos/lib/rtl/sd.c
--- trunk/reactos/lib/rtl/sd.c 2005-02-14 11:57:51 UTC (rev 13557)
+++ trunk/reactos/lib/rtl/sd.c 2005-02-14 14:36:03 UTC (rev 13558)
@@ -107,8 +107,8 @@
}
/*
-* @implemented
-*/
+ * @implemented
+ */
NTSTATUS STDCALL
RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
ULONG Revision)
@@ -814,4 +814,28 @@
}
}
+
+/*
+ * @implemented
+ */
+NTSTATUS STDCALL
+RtlSetAttributesSecurityDescriptor(IN PSECURITY_DESCRIPTOR
SecurityDescriptor,
+ IN SECURITY_DESCRIPTOR_CONTROL
Control,
+ OUT PULONG Revision)
+{
+ *Revision = SecurityDescriptor->Revision;
+
+ if (SecurityDescriptor->Revision != SECURITY_DESCRIPTOR_REVISION1)
+ return STATUS_UNKNOWN_REVISION;
+
+ Control &=
+ ~(SE_OWNER_DEFAULTED | SE_GROUP_DEFAULTED | SE_DACL_PRESENT |
+ SE_DACL_DEFAULTED | SE_SACL_PRESENT | SE_SACL_DEFAULTED |
+ SE_RM_CONTROL_VALID | SE_SELF_RELATIVE);
+
+ return RtlSetControlSecurityDescriptor(SecurityDescriptor,
+ Control,
+ Control);
+}
+
/* EOF */
Show replies by date