[ros-diffs] [ekohl] 16308: - Add Rtl*SecurityObject stubs.

ekohl at svn.reactos.com ekohl at svn.reactos.com
Mon Jun 27 23:11:34 CEST 2005


- Add Rtl*SecurityObject stubs.
- Export RtlpUnWaitCriticalSection and RtlWaitForCriticalSection.
- Replace DWORDs by ULONGs.
Modified: trunk/reactos/include/ndk/rtlfuncs.h
Modified: trunk/reactos/lib/ntdll/def/ntdll.def
Modified: trunk/reactos/lib/ntdll/ntdll.xml
Modified: trunk/reactos/lib/ntdll/rtl/critical.c
Added: trunk/reactos/lib/ntdll/rtl/secobj.c
  _____  

Modified: trunk/reactos/include/ndk/rtlfuncs.h
--- trunk/reactos/include/ndk/rtlfuncs.h	2005-06-27 18:56:50 UTC
(rev 16307)
+++ trunk/reactos/include/ndk/rtlfuncs.h	2005-06-27 21:11:29 UTC
(rev 16308)
@@ -564,6 +564,43 @@

 STDCALL
 RtlValidAcl(PACL Acl);
 
+NTSTATUS
+STDCALL
+RtlDeleteSecurityObject(
+    IN PSECURITY_DESCRIPTOR *ObjectDescriptor
+);
+
+NTSTATUS
+STDCALL
+RtlNewSecurityObject(
+    IN PSECURITY_DESCRIPTOR ParentDescriptor,
+    IN PSECURITY_DESCRIPTOR CreatorDescriptor,
+    OUT PSECURITY_DESCRIPTOR *NewDescriptor,
+    IN BOOLEAN IsDirectoryObject,
+    IN HANDLE Token,
+    IN PGENERIC_MAPPING GenericMapping
+);
+
+NTSTATUS
+STDCALL
+RtlQuerySecurityObject(
+    IN PSECURITY_DESCRIPTOR ObjectDescriptor,
+    IN SECURITY_INFORMATION SecurityInformation,
+    OUT PSECURITY_DESCRIPTOR ResultantDescriptor,
+    IN ULONG DescriptorLength,
+    OUT PULONG ReturnLength
+);
+
+NTSTATUS
+STDCALL
+RtlSetSecurityObject(
+    IN SECURITY_INFORMATION SecurityInformation,
+    IN PSECURITY_DESCRIPTOR ModificationDescriptor,
+    OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
+    IN PGENERIC_MAPPING GenericMapping,
+    IN HANDLE Token
+);
+
 /*
  * Single-Character Functions
  */
@@ -1147,34 +1184,46 @@
 NTSTATUS
 STDCALL
 RtlDeleteCriticalSection (
-     PRTL_CRITICAL_SECTION CriticalSection
+    IN PRTL_CRITICAL_SECTION CriticalSection
 );
 
 NTSTATUS
 STDCALL
 RtlEnterCriticalSection(
-     PRTL_CRITICAL_SECTION CriticalSection
+    IN PRTL_CRITICAL_SECTION CriticalSection
 );
 
 NTSTATUS
 STDCALL
 RtlInitializeCriticalSection(
-     PRTL_CRITICAL_SECTION CriticalSection
+    IN PRTL_CRITICAL_SECTION CriticalSection
 );
 
 NTSTATUS
 STDCALL
 RtlInitializeCriticalSectionAndSpinCount(
-    PRTL_CRITICAL_SECTION CriticalSection,
-    ULONG SpinCount
+    IN PRTL_CRITICAL_SECTION CriticalSection,
+    IN ULONG SpinCount
 );
 
 NTSTATUS
 STDCALL
 RtlLeaveCriticalSection(
-     PRTL_CRITICAL_SECTION CriticalSection
+    IN PRTL_CRITICAL_SECTION CriticalSection
 );
 
+VOID
+STDCALL
+RtlpUnWaitCriticalSection(
+    IN PRTL_CRITICAL_SECTION CriticalSection
+);
+
+NTSTATUS
+STDCALL
+RtlpWaitForCriticalSection(
+    IN PRTL_CRITICAL_SECTION CriticalSection
+);
+
 BOOLEAN
 STDCALL
 RtlAcquireResourceExclusive(
  _____  

Modified: trunk/reactos/lib/ntdll/def/ntdll.def
--- trunk/reactos/lib/ntdll/def/ntdll.def	2005-06-27 18:56:50 UTC
(rev 16307)
+++ trunk/reactos/lib/ntdll/def/ntdll.def	2005-06-27 21:11:29 UTC
(rev 16308)
@@ -379,7 +379,7 @@

 RtlDeleteRange at 24
 RtlDeleteRegistryValue at 12
 RtlDeleteResource at 4
-;RtlDeleteSecurityObject
+RtlDeleteSecurityObject at 4
 RtlDeleteTimer at 12
 RtlDeleteTimerQueue at 4
 RtlDeleteTimerQueueEx at 8
@@ -559,7 +559,7 @@
 RtlMultiByteToUnicodeSize at 12
 ;RtlNewInstanceSecurityObject
 ;RtlNewSecurityGrantedAccess
-;RtlNewSecurityObject
+RtlNewSecurityObject at 24
 RtlNormalizeProcessParams at 4
 RtlNtPathNameToDosPathName at 16
 RtlNtStatusToDosError at 4
@@ -584,7 +584,7 @@
 ;RtlQueryProcessHeapInformation
 ;RtlQueryProcessLockInformation
 RtlQueryRegistryValues at 20
-;RtlQuerySecurityObject
+RtlQuerySecurityObject at 20
 ;RtlQueryTagHeap
 RtlQueryTimeZoneInformation at 4
 RtlRaiseException at 4
@@ -621,7 +621,7 @@
 RtlSetOwnerSecurityDescriptor at 12
 RtlSetSaclSecurityDescriptor at 16
 RtlSetSecurityDescriptorRMControl at 8
-;RtlSetSecurityObject
+RtlSetSecurityObject at 20
 RtlSetTimeZoneInformation at 4
 ;RtlSetUnicodeCallouts
 ;RtlSetUserFlagsHeap
@@ -687,8 +687,8 @@
 RtlpNtOpenKey at 16
 RtlpNtQueryValueKey at 20
 RtlpNtSetValueKey at 16
-;RtlpUnWaitCriticalSection
-;RtlpWaitForCriticalSection
+RtlpUnWaitCriticalSection at 4
+RtlpWaitForCriticalSection at 4
 RtlxAnsiStringToUnicodeSize at 4
 RtlxOemStringToUnicodeSize at 4
 RtlxUnicodeStringToAnsiSize at 4
  _____  

Modified: trunk/reactos/lib/ntdll/ntdll.xml
--- trunk/reactos/lib/ntdll/ntdll.xml	2005-06-27 18:56:50 UTC (rev
16307)
+++ trunk/reactos/lib/ntdll/ntdll.xml	2005-06-27 21:11:29 UTC (rev
16308)
@@ -51,6 +51,7 @@

 		<file>propvar.c</file>
 		<file>rangelist.c</file>
 		<file>resource.c</file>
+		<file>secobj.c</file>
 		<file>teb.c</file>
 		<file>timerqueue.c</file>
 	</directory>
  _____  

Modified: trunk/reactos/lib/ntdll/rtl/critical.c
--- trunk/reactos/lib/ntdll/rtl/critical.c	2005-06-27 18:56:50 UTC
(rev 16307)
+++ trunk/reactos/lib/ntdll/rtl/critical.c	2005-06-27 21:11:29 UTC
(rev 16308)
@@ -99,10 +99,10 @@

 STDCALL
 RtlSetCriticalSectionSpinCount(
    PRTL_CRITICAL_SECTION CriticalSection,
-   DWORD SpinCount
+   ULONG SpinCount
    )
 {
-    DWORD OldCount = CriticalSection->SpinCount;
+    ULONG OldCount = CriticalSection->SpinCount;
 
     /* Set to parameter if MP, or to 0 if this is Uniprocessor */
     CriticalSection->SpinCount = (NtCurrentPeb()->NumberOfProcessors >
1) ? SpinCount : 0;
@@ -214,7 +214,7 @@
 STDCALL
 RtlInitializeCriticalSectionAndSpinCount (
     PRTL_CRITICAL_SECTION CriticalSection,
-    DWORD SpinCount)
+    ULONG SpinCount)
 {
     PRTL_CRITICAL_SECTION_DEBUG CritcalSectionDebugData;
 
  _____  

Added: trunk/reactos/lib/ntdll/rtl/secobj.c
--- trunk/reactos/lib/ntdll/rtl/secobj.c	2005-06-27 18:56:50 UTC
(rev 16307)
+++ trunk/reactos/lib/ntdll/rtl/secobj.c	2005-06-27 21:11:29 UTC
(rev 16308)
@@ -0,0 +1,97 @@

+/*
+ *  ReactOS kernel
+ *  Copyright (C) 2005 Eric Kohl
+ *
+ *  This program is free software; you can redistribute it and/or
modify
+ *  it under the terms of the GNU General Public License as published
by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * COPYRIGHT:         See COPYING in the top level directory
+ * PROJECT:           ReactOS system libraries
+ * PURPOSE:           Security object implementation
+ * FILE:              lib/ntdll/rtl/secobj.c
+ */
+
+/* INCLUDES
****************************************************************/
+
+#include <ntdll.h>
+#define NDEBUG
+#include <debug.h>
+
+/*
+ * @implemented
+ */
+NTSTATUS
+STDCALL
+RtlDeleteSecurityObject(IN PSECURITY_DESCRIPTOR *ObjectDescriptor)
+{
+    DPRINT("RtlDeleteSecurityObject(%p)\n", ObjectDescriptor);
+
+    RtlFreeHeap(RtlGetProcessHeap(),
+                0,
+                *ObjectDescriptor);
+
+    return STATUS_SUCCESS;
+}
+
+
+/*
+ * @unimplemented
+ */
+NTSTATUS
+STDCALL
+RtlNewSecurityObject(IN PSECURITY_DESCRIPTOR ParentDescriptor,
+                     IN PSECURITY_DESCRIPTOR CreatorDescriptor,
+                     OUT PSECURITY_DESCRIPTOR *NewDescriptor,
+                     IN BOOLEAN IsDirectoryObject,
+                     IN HANDLE Token,
+                     IN PGENERIC_MAPPING GenericMapping)
+{
+    UNIMPLEMENTED;
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/*
+ * @unimplemented
+ */
+NTSTATUS
+STDCALL
+RtlQuerySecurityObject(IN PSECURITY_DESCRIPTOR ObjectDescriptor,
+                       IN SECURITY_INFORMATION SecurityInformation,
+                       OUT PSECURITY_DESCRIPTOR ResultantDescriptor,
+                       IN ULONG DescriptorLength,
+                       OUT PULONG ReturnLength)
+{
+    UNIMPLEMENTED;
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/*
+ * @unimplemented
+ */
+NTSTATUS
+STDCALL
+RtlSetSecurityObject(IN SECURITY_INFORMATION SecurityInformation,
+                     IN PSECURITY_DESCRIPTOR ModificationDescriptor,
+                     OUT PSECURITY_DESCRIPTOR
*ObjectsSecurityDescriptor,
+                     IN PGENERIC_MAPPING GenericMapping,
+                     IN HANDLE Token)
+{
+    UNIMPLEMENTED;
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+/* EOF */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050627/1dec32c2/attachment.html


More information about the Ros-diffs mailing list