Index: trunk/src/NTDLL/ntdll.def
===================================================================
--- trunk/src/NTDLL/ntdll.def	(revision 5567)
+++ trunk/src/NTDLL/ntdll.def	(revision 5568)
@@ -1,3 +1,3 @@
-; $Id: ntdll.def,v 1.36 2000-12-16 22:53:25 bird Exp $
+; $Id: ntdll.def,v 1.37 2001-04-22 10:38:58 sandervl Exp $
 
 ;
@@ -492,7 +492,7 @@
 ;   RtlMakeSelfRelativeSD                       @476
 ;   RtlMapGenericMask                           @477
-    RtlMoveMemory                  = _RtlMoveMemory@12              @478
+    RtlMoveMemory                  = _RtlMoveMemory@12                  @478
     RtlMultiByteToUnicodeN         = _RtlMultiByteToUnicodeN@20         @479
-;   RtlMultiByteToUnicodeSize                       @480
+    RtlMultiByteToUnicodeSize      = _RtlMultiByteToUnicodeSize@12      @480
 ;   RtlNewInstanceSecurityObject                    @481
 ;   RtlNewSecurityGrantedAccess                     @482
@@ -503,5 +503,5 @@
 ;   RtlNumberOfClearBits                        @487
 ;   RtlNumberOfSetBits                          @488
-;   RtlOemStringToUnicodeSize                       @489
+    RtlOemStringToUnicodeSize     = _RtlOemStringToUnicodeSize@4        @489
     RtlOemStringToUnicodeString   = _RtlOemStringToUnicodeString@12     @490
     RtlOemToUnicodeN              = _RtlOemToUnicodeN@20                @491
@@ -510,6 +510,6 @@
 ;   RtlPcToFileHeader                           @494
 ;   RtlPinAtomInAtomTable                       @495
-;   RtlPrefixString                         @496
-;   RtlPrefixUnicodeString                      @497
+    RtlPrefixString               = _RtlPrefixString@12                 @496
+    RtlPrefixUnicodeString        = _RtlPrefixUnicodeString@12          @497
 ;   RtlPropertySetNameToGuid                        @498
 ;   RtlProtectHeap                          @499
@@ -578,13 +578,13 @@
 ;   RtlTimeToTimeFields                         @561
 ;   RtlTryEnterCriticalSection                      @562
-;   RtlUnicodeStringToAnsiSize                      @563
-;   RtlUnicodeStringToAnsiString                    @564
+    RtlUnicodeStringToAnsiSize    = _RtlUnicodeStringToAnsiSize@4       @563
+    RtlUnicodeStringToAnsiString  = _RtlUnicodeStringToAnsiString@12    @564
 ;   RtlUnicodeStringToCountedOemString                  @565
 ;   RtlUnicodeStringToInteger                       @566
-;   RtlUnicodeStringToOemSize                       @567
+    RtlUnicodeStringToOemSize     = _RtlUnicodeStringToOemSize@4        @567
     RtlUnicodeStringToOemString   = _RtlUnicodeStringToOemString@12     @568
 ;   RtlUnicodeToCustomCPN                       @569
     RtlUnicodeToMultiByteN        = _RtlUnicodeToMultiByteN@20          @570
-;   RtlUnicodeToMultiByteSize                       @571
+    RtlUnicodeToMultiByteSize     = _RtlUnicodeToMultiByteSize@12       @571
     RtlUnicodeToOemN              = _RtlUnicodeToOemN@20                @572
 ;   RtlUniform                              @573
@@ -593,12 +593,11 @@
 ;   RtlUpcaseUnicodeChar                        @576
     RtlUpcaseUnicodeString        = _RtlUpcaseUnicodeString@12          @577
-    RtlUnicodeStringToAnsiString  = _RtlUnicodeStringToAnsiString@12    @578
 ;   RtlUpcaseUnicodeStringToCountedOemString                @579
     RtlUpcaseUnicodeStringToOemString = _RtlUpcaseUnicodeStringToOemString@12 @580
 ;   RtlUpcaseUnicodeToCustomCPN                     @581
-;   RtlUpcaseUnicodeToMultiByteN                    @582
-;   RtlUpcaseUnicodeToOemN                      @583
+    RtlUpcaseUnicodeToMultiByteN  = _RtlUpcaseUnicodeToMultiByteN@20    @582
+    RtlUpcaseUnicodeToOemN        = _RtlUpcaseUnicodeToOemN@20          @583
 ;   RtlUpperChar                            @584
-;   RtlUpperString                          @585
+    RtlUpperString                = _RtlUpperString@8                   @585
 ;   RtlUsageHeap                            @586
 ;   RtlValidAcl                             @587
@@ -620,6 +619,6 @@
 ;   RtlpUnWaitCriticalSection                       @602
 ;   RtlpWaitForCriticalSection                      @603
-    RtlxAnsiStringToUnicodeSize   = _RtlxAnsiStringToUnicodeSize@4      @604
-    RtlxOemStringToUnicodeSize    = _RtlxOemStringToUnicodeSize@4       @605
+    RtlxAnsiStringToUnicodeSize   = _RtlAnsiStringToUnicodeSize@4      @604
+    RtlxOemStringToUnicodeSize    = _RtlOemStringToUnicodeSize@4       @605
 ;   RtlxUnicodeStringToAnsiSize                     @606
 ;   RtlxUnicodeStringToOemSize                      @607
@@ -1074,4 +1073,3 @@
 ;   Not found in NTDLL-SP6:
     DebugBreak                    = ___regs_DebugBreak@4
-    RtlInitOemString              = _RtlInitOemString@8
     NtPowerInformation            = _NtPowerInformation@20
Index: trunk/src/NTDLL/ntdll.h
===================================================================
--- trunk/src/NTDLL/ntdll.h	(revision 5567)
+++ trunk/src/NTDLL/ntdll.h	(revision 5568)
@@ -1,3 +1,3 @@
-/* $Id: ntdll.h,v 1.12 2000-08-20 15:16:57 phaller Exp $ */
+/* $Id: ntdll.h,v 1.13 2001-04-22 10:38:59 sandervl Exp $ */
 
 /*
@@ -453,48 +453,5 @@
    PBOOLEAN GroupDefaulted);
 
-/* ##############################
-   ######   ACL FUNCTIONS                ######
-   ##############################
-*/
-
-DWORD WINAPI RtlCreateAcl(PACL acl,DWORD size,DWORD rev);
-
-BOOLEAN WINAPI RtlFirstFreeAce(
-   PACL acl,
-   PACE_HEADER *x);
-
-NTSTATUS WINAPI RtlAddAce(
-   PACL acl,
-   DWORD rev,
-   DWORD xnrofaces,
-   PACE_HEADER acestart,
-   DWORD acelen);
-
-DWORD WINAPI RtlAddAccessAllowedAce(DWORD x1,DWORD x2,DWORD x3,DWORD x4);
-DWORD WINAPI RtlGetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce );
-
-/*
- * string functions
- */
-
-DWORD WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING uni,PANSI_STRING ansi,BOOLEAN doalloc);
-DWORD WINAPI RtlOemStringToUnicodeString(PUNICODE_STRING uni,PSTRING ansi,BOOLEAN doalloc);
-DWORD WINAPI RtlMultiByteToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,DWORD oemlen);
-DWORD WINAPI RtlOemToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,DWORD oemlen);
-VOID WINAPI RtlInitAnsiString(PANSI_STRING target,LPCSTR source);
-VOID WINAPI RtlInitString(PSTRING target,LPCSTR source);
-VOID WINAPI RtlInitUnicodeString(PUNICODE_STRING target,LPCWSTR source);
-VOID WINAPI RtlFreeUnicodeString(PUNICODE_STRING str);
-VOID WINAPI RtlFreeAnsiString(PANSI_STRING AnsiString);
-DWORD WINAPI RtlUnicodeToOemN(LPSTR oemstr,DWORD oemlen,LPDWORD reslen,LPWSTR unistr,DWORD unilen);
-DWORD WINAPI RtlUnicodeStringToOemString(PANSI_STRING oem,PUNICODE_STRING uni,BOOLEAN alloc);
-DWORD WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING oem,PUNICODE_STRING uni,BOOLEAN alloc);
-DWORD WINAPI RtlEqualUnicodeString(PUNICODE_STRING s1,PUNICODE_STRING s2,DWORD x);
-DWORD WINAPI RtlUpcaseUnicodeString(PUNICODE_STRING dest,PUNICODE_STRING src,BOOLEAN doalloc);
-UINT WINAPI RtlxOemStringToUnicodeSize(PSTRING str);
-UINT WINAPI RtlxAnsiStringToUnicodeSize(PANSI_STRING str);
-DWORD WINAPI RtlIsTextUnicode(LPVOID buf, DWORD len, DWORD *pf);
-DWORD WINAPI RtlCompareUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive);
-DWORD WINAPI RtlUpcaseUnicodeStringToOemString(PANSI_STRING oem, PUNICODE_STRING uni, BOOLEAN alloc);
+
 
 /*
Index: trunk/src/NTDLL/ntdll_misc.h
===================================================================
--- trunk/src/NTDLL/ntdll_misc.h	(revision 5568)
+++ trunk/src/NTDLL/ntdll_misc.h	(revision 5568)
@@ -0,0 +1,13 @@
+#ifndef __WINE_NTDLL_MISC_H
+#define __WINE_NTDLL_MISC_H
+
+#include "ntdef.h"
+#include "winnt.h"
+
+/* debug helper */
+extern LPCSTR debugstr_as( const STRING *str );
+extern LPCSTR debugstr_us( const UNICODE_STRING *str );
+extern void dump_ObjectAttributes (const OBJECT_ATTRIBUTES *ObjectAttributes);
+extern void dump_UnicodeString(const UNICODE_STRING *us, BOOLEAN showstring);
+
+#endif
Index: trunk/src/NTDLL/rtl.cpp
===================================================================
--- trunk/src/NTDLL/rtl.cpp	(revision 5567)
+++ trunk/src/NTDLL/rtl.cpp	(revision 5568)
@@ -1,3 +1,3 @@
-/* $Id: rtl.cpp,v 1.11 2000-08-20 15:16:59 phaller Exp $ */
+/* $Id: rtl.cpp,v 1.12 2001-04-22 10:38:59 sandervl Exp $ */
 
 /*
@@ -23,5 +23,4 @@
 
 #include "debugtools.h"
-#include "ntdll.h"
 
 #include "winuser.h"
Index: trunk/src/NTDLL/sec.cpp
===================================================================
--- trunk/src/NTDLL/sec.cpp	(revision 5567)
+++ trunk/src/NTDLL/sec.cpp	(revision 5568)
@@ -1,3 +1,3 @@
-/* $Id: sec.cpp,v 1.7 2000-10-26 17:26:00 sandervl Exp $ */
+/* $Id: sec.cpp,v 1.8 2001-04-22 10:38:59 sandervl Exp $ */
 
 /*
@@ -732,14 +732,12 @@
  *  RtlAddAccessAllowedAce                  [NTDLL]
  */
-DWORD WINAPI RtlAddAccessAllowedAce(DWORD x1,
-                                    DWORD x2,
-                                    DWORD x3,
-                                    DWORD x4)
+NTSTATUS WINAPI RtlAddAccessAllowedAce(IN OUT PACL pAcl, IN DWORD dwAceRevision, 
+                                       IN DWORD AccessMask, IN PSID pSid)
 {
   dprintf(("NTDLL: RtlAddAccessAllowedAce(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           x2,
-           x3,
-           x4));
+           pAcl,
+           dwAceRevision,
+           AccessMask,
+           pSid));
 
   return 0;
@@ -750,14 +748,39 @@
  *  RtlGetAce     [NTDLL]
  */
-DWORD WINAPI RtlGetAce(PACL  pAcl,
-                       DWORD dwAceIndex,
-                       LPVOID *pAce )
-{
-  dprintf(("NTDLL: RtlGetAce(%08x,%08x,%08x) not implemented.\n",
+NTSTATUS WINAPI RtlGetAce(PACL  pAcl,
+                          DWORD dwAceIndex,
+                          LPVOID *pAce )
+{
+  PACE_HEADER ace;
+  int      i;
+
+  dprintf(("NTDLL: RtlGetAce(%08x,%08x,%08x) test implementation",
            pAcl,
            dwAceIndex,
            pAce));
 
-  return 0;
+
+  *pAce = 0;
+  if(dwAceIndex > pAcl->AceCount) {
+      dprintf(("index out of range"));
+      return STATUS_INVALID_PARAMETER;
+  }
+  ace = (PACE_HEADER)(pAcl+1);
+
+  for (i=0;
+       i<dwAceIndex;
+       i++)
+  {
+    if ((DWORD)ace>=(((DWORD)pAcl)+pAcl->AclSize))
+       return STATUS_BUFFER_OVERFLOW;
+
+    ace = (PACE_HEADER)(((BYTE*)ace)+ace->AceSize);
+  }
+
+  if ((DWORD)ace>=(((DWORD)pAcl)+pAcl->AclSize))
+     return STATUS_BUFFER_OVERFLOW;
+
+  *pAce = ace;
+  return STATUS_SUCCESS;
 }
 
