- Implement RtlSetAttributesSecurityDescriptor, RtlInitializeGenericTableAvl, RtlNumberGenericTableElements and RtlNumberGenericTableElementsAvl.

svn path=/trunk/; revision=13558
This commit is contained in:
Eric Kohl 2005-02-14 14:36:03 +00:00
parent 3922c4030b
commit dfa5c9434a
3 changed files with 57 additions and 33 deletions

View file

@ -586,7 +586,7 @@ RtlSecondsSince1970ToTime@8
RtlSecondsSince1980ToTime@8 RtlSecondsSince1980ToTime@8
RtlSelfRelativeToAbsoluteSD@44 RtlSelfRelativeToAbsoluteSD@44
RtlSetAllBits@4 RtlSetAllBits@4
;RtlSetAttributesSecurityDescriptor RtlSetAttributesSecurityDescriptor@12
RtlSetBits@12 RtlSetBits@12
RtlSetControlSecurityDescriptor@12 RtlSetControlSecurityDescriptor@12
RtlSetCriticalSectionSpinCount@8 RtlSetCriticalSectionSpinCount@8

View file

@ -28,6 +28,7 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
/* /*
@ -177,22 +178,28 @@ RtlInitializeGenericTable (
UNIMPLEMENTED; UNIMPLEMENTED;
} }
/* /*
* @unimplemented * @implemented
*/ */
VOID VOID STDCALL
STDCALL RtlInitializeGenericTableAvl(IN OUT PRTL_AVL_TABLE Table,
RtlInitializeGenericTableAvl ( IN PRTL_AVL_COMPARE_ROUTINE CompareRoutine,
PRTL_AVL_TABLE Table, IN PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine,
PRTL_AVL_COMPARE_ROUTINE CompareRoutine, IN PRTL_AVL_FREE_ROUTINE FreeRoutine,
PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine, IN PVOID TableContext)
PRTL_AVL_FREE_ROUTINE FreeRoutine,
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 * @unimplemented
*/ */
@ -351,29 +358,22 @@ RtlLookupElementGenericTableFullAvl (
/* /*
* @unimplemented * @implemented
*/ */
ULONG ULONG STDCALL
STDCALL RtlNumberGenericTableElements(IN PRTL_GENERIC_TABLE Table)
RtlNumberGenericTableElements(
PRTL_GENERIC_TABLE Table
)
{ {
UNIMPLEMENTED; return Table->NumberGenericTableElements;
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
ULONG ULONG STDCALL
STDCALL RtlNumberGenericTableElementsAvl(IN PRTL_AVL_TABLE Table)
RtlNumberGenericTableElementsAvl (
PRTL_AVL_TABLE Table
)
{ {
UNIMPLEMENTED; return Table->NumberGenericTableElements;
return 0;
} }
/* EOF */ /* EOF */

View file

@ -107,8 +107,8 @@ RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
} }
/* /*
* @implemented * @implemented
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
ULONG Revision) ULONG Revision)
@ -814,4 +814,28 @@ RtlSetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,
} }
} }
/*
* @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 */ /* EOF */