From f0b1beeb8a0bbbbf7555e64769a0226c763c0a6b Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sat, 1 Jan 2005 10:57:39 +0000 Subject: [PATCH] - Set the page protection for the section header. svn path=/trunk/; revision=12684 --- reactos/ntoskrnl/ldr/loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/ldr/loader.c b/reactos/ntoskrnl/ldr/loader.c index 8fa49d4d1f6..b72720d9fcf 100644 --- a/reactos/ntoskrnl/ldr/loader.c +++ b/reactos/ntoskrnl/ldr/loader.c @@ -1,4 +1,4 @@ -/* $Id: loader.c,v 1.152 2004/12/24 17:06:59 navaraf Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -870,6 +870,7 @@ LdrPEProcessModule(PVOID ModuleLoadBase, return Status; } + MmSetPageProtect(NULL, DriverBase, PAGE_READONLY); /* Set the protections for the various parts of the driver */ for (Idx = 0; Idx < PENtHeaders->FileHeader.NumberOfSections; Idx++) { @@ -1077,6 +1078,7 @@ LdrSafePEProcessModule(PVOID ModuleLoadBase, } /* Set the page protection for the virtual sections */ + MmSetPageProtect(NULL, DriverBase, PAGE_READONLY); for (Idx = 0; Idx < PENtHeaders->FileHeader.NumberOfSections; Idx++) { ULONG Characteristics = PESectionHeaders[Idx].Characteristics;