Commit in reactos/ntoskrnl on MAIN
include/internal/mm.h-81.93 -> 1.94
mm/anonmem.c+3-21.33 -> 1.34
  /marea.c-491.72 -> 1.73
  /section.c+3-31.166 -> 1.167
se/token.c+57-21.44 -> 1.45
+63-64
5 modified files
- Remove unused and broken MmSplitMemoryArea function.
- Don't allow releasing section with NtFreeVirtualMemory.
- Implement TokenDefaultDacl case of NtSetInformationToken.

reactos/ntoskrnl/include/internal
mm.h 1.93 -> 1.94
diff -u -r1.93 -r1.94
--- mm.h	20 Nov 2004 16:46:05 -0000	1.93
+++ mm.h	19 Dec 2004 16:16:56 -0000	1.94
@@ -370,14 +370,6 @@
 
 NTSTATUS MmUnlockMemoryArea(MEMORY_AREA* MemoryArea);
 
-PMEMORY_AREA MmSplitMemoryArea(struct _EPROCESS* Process,
-			       PMADDRESS_SPACE AddressSpace,
-			       PMEMORY_AREA OriginalMemoryArea,
-			       PVOID BaseAddress,
-			       ULONG Length,
-			       ULONG NewType,
-			       ULONG NewAttributes);
-
 MEMORY_AREA* MmOpenMemoryAreaByRegion(PMADDRESS_SPACE AddressSpace, 
 				      PVOID Address,
 				      ULONG Length);

reactos/ntoskrnl/mm
anonmem.c 1.33 -> 1.34
diff -u -r1.33 -r1.34
--- anonmem.c	1 Oct 2004 20:26:04 -0000	1.33
+++ anonmem.c	19 Dec 2004 16:16:57 -0000	1.34
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: anonmem.c,v 1.33 2004/10/01 20:26:04 gvg Exp $
+/* $Id: anonmem.c,v 1.34 2004/12/19 16:16:57 navaraf Exp $
  *
  * PROJECT:     ReactOS kernel
  * FILE:        ntoskrnl/mm/anonmem.c
@@ -814,7 +814,8 @@
    {
       case MEM_RELEASE:
          /* We can only free a memory area in one step. */
-         if (MemoryArea->BaseAddress != BaseAddress)
+         if (MemoryArea->BaseAddress != BaseAddress ||
+             MemoryArea->Type != MEMORY_AREA_VIRTUAL_MEMORY)
          {
             MmUnlockAddressSpace(AddressSpace);
             ObDereferenceObject(Process);

reactos/ntoskrnl/mm
marea.c 1.72 -> 1.73
diff -u -r1.72 -r1.73
--- marea.c	13 Nov 2004 22:27:16 -0000	1.72
+++ marea.c	19 Dec 2004 16:16:58 -0000	1.73
@@ -498,55 +498,6 @@
    return(STATUS_SUCCESS);
 }
 
-PMEMORY_AREA MmSplitMemoryArea(PEPROCESS Process,
-                               PMADDRESS_SPACE AddressSpace,
-                               PMEMORY_AREA OriginalMemoryArea,
-                               PVOID BaseAddress,
-                               ULONG Length,
-                               ULONG NewType,
-                               ULONG NewAttributes)
-{
-   PMEMORY_AREA Result;
-   PMEMORY_AREA Split;
-
-   Result = ExAllocatePoolWithTag(NonPagedPool, sizeof(MEMORY_AREA),
-                                  TAG_MAREA);
-   RtlZeroMemory(Result,sizeof(MEMORY_AREA));
-   Result->Type = NewType;
-   Result->BaseAddress = BaseAddress;
-   Result->Length = Length;
-   Result->Attributes = NewAttributes;
-   Result->LockCount = 0;
-   Result->Process = Process;
-
-   if (BaseAddress == OriginalMemoryArea->BaseAddress)
-   {
-      OriginalMemoryArea->BaseAddress = (char*)BaseAddress + Length;
-      OriginalMemoryArea->Length = OriginalMemoryArea->Length - Length;
-      MmInsertMemoryArea(AddressSpace, Result);
-      return(Result);
-   }
-   if (((char*)BaseAddress + Length) ==
-         ((char*)OriginalMemoryArea->BaseAddress + OriginalMemoryArea->Length))
-   {
-      OriginalMemoryArea->Length = OriginalMemoryArea->Length - Length;
-      MmInsertMemoryArea(AddressSpace, Result);
-
-      return(Result);
-   }
-
-   Split = ExAllocatePoolWithTag(NonPagedPool, sizeof(MEMORY_AREA),
-                                 TAG_MAREA);
-   RtlCopyMemory(Split,OriginalMemoryArea,sizeof(MEMORY_AREA));
-   Split->BaseAddress = (char*)BaseAddress + Length;
-   Split->Length = OriginalMemoryArea->Length - (((ULONG)BaseAddress)
-                   + Length);
-
-   OriginalMemoryArea->Length = (char*)BaseAddress - (char*)OriginalMemoryArea->BaseAddress;
-
-   return(Split);
-}
-
 NTSTATUS MmCreateMemoryArea(PEPROCESS Process,
                             PMADDRESS_SPACE AddressSpace,
                             ULONG Type,

reactos/ntoskrnl/mm
section.c 1.166 -> 1.167
diff -u -r1.166 -r1.167
--- section.c	22 Oct 2004 20:38:23 -0000	1.166
+++ section.c	19 Dec 2004 16:16:58 -0000	1.167
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: section.c,v 1.166 2004/10/22 20:38:23 ekohl Exp $
+/* $Id: section.c,v 1.167 2004/12/19 16:16:58 navaraf Exp $
  *
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/mm/section.c
@@ -3023,8 +3023,8 @@
                                BoundaryAddressMultiple);
    if (!NT_SUCCESS(Status))
    {
-      DPRINT1("Mapping between 0x%.8X and 0x%.8X failed.\n",
-              (*BaseAddress), (char*)(*BaseAddress) + ViewSize);
+      DPRINT1("Mapping between 0x%.8X and 0x%.8X failed (%X).\n",
+              (*BaseAddress), (char*)(*BaseAddress) + ViewSize, Status);
       return(Status);
    }
 

reactos/ntoskrnl/se
token.c 1.44 -> 1.45
diff -u -r1.44 -r1.45
--- token.c	14 Dec 2004 00:41:24 -0000	1.44
+++ token.c	19 Dec 2004 16:16:58 -0000	1.45
@@ -1,4 +1,4 @@
-/* $Id: token.c,v 1.44 2004/12/14 00:41:24 gdalsnes Exp $
+/* $Id: token.c,v 1.45 2004/12/19 16:16:58 navaraf Exp $
  *
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
@@ -913,8 +913,14 @@
       NeededAccess = TOKEN_ADJUST_DEFAULT;
       break;
 
+    case TokenDefaultDacl:
+      if (TokenInformationLength < sizeof(TOKEN_DEFAULT_DACL))
+        return STATUS_BUFFER_TOO_SMALL;
+      NeededAccess = TOKEN_ADJUST_DEFAULT;
+      break;
+
     default:
-      DPRINT1("NtSetInformationToken: lying about success (stub)\n");   
+      DPRINT1("NtSetInformationToken: lying about success (stub) - %x\n", TokenInformationClass);
       return STATUS_SUCCESS;  
 
     }
@@ -954,6 +960,55 @@
 	     "Token->PrimaryGroup = 0x%08x\n", Token->PrimaryGroup);
       break;
 
+    case TokenDefaultDacl:
+      {
+        TOKEN_DEFAULT_DACL TokenDefaultDacl = { 0 };
+        ACL OldAcl;
+        PACL NewAcl;
+
+        Status = MmCopyFromCaller( &TokenDefaultDacl, TokenInformation, 
+                                   sizeof(TOKEN_DEFAULT_DACL) );
+        if (!NT_SUCCESS(Status))
+          {
+            Status = STATUS_INVALID_PARAMETER;
+            break;
+          }
+
+        Status = MmCopyFromCaller( &OldAcl, TokenDefaultDacl.DefaultDacl,
+                                   sizeof(ACL) );
+        if (!NT_SUCCESS(Status))
+          {
+            Status = STATUS_INVALID_PARAMETER;
+            break;
+          }
+
+        NewAcl = ExAllocatePool(NonPagedPool, sizeof(ACL));
+        if (NewAcl == NULL)
+          {
+            Status = STATUS_INSUFFICIENT_RESOURCES;
+            break;
+          }
+
+        Status = MmCopyFromCaller( NewAcl, TokenDefaultDacl.DefaultDacl,
+                                   OldAcl.AclSize );
+        if (!NT_SUCCESS(Status))
+          {
+            Status = STATUS_INVALID_PARAMETER;
+            ExFreePool(NewAcl);
+            break;
+          }
+
+        if (Token->DefaultDacl)
+          {
+            ExFreePool(Token->DefaultDacl);
+          }
+
+        Token->DefaultDacl = NewAcl;
+
+        Status = STATUS_SUCCESS;
+        break;
+      }
+
     default:
       Status = STATUS_NOT_IMPLEMENTED;
       break;
CVSspam 0.2.8