open the module image file with read access rights instead of full
access rights
Modified: trunk/reactos/ntoskrnl/ldr/loader.c
_____
Modified: trunk/reactos/ntoskrnl/ldr/loader.c
--- trunk/reactos/ntoskrnl/ldr/loader.c 2005-05-06 00:09:08 UTC (rev
15029)
+++ trunk/reactos/ntoskrnl/ldr/loader.c 2005-05-06 00:11:14 UTC (rev
15030)
@@ -311,7 +311,7 @@
NULL);
CHECKPOINT;
Status = ZwOpenFile(&FileHandle,
- FILE_ALL_ACCESS,
+ GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,
create a token handle with TOKEN_QUERY access rights which is required
to query the user information in RtlFormatCurrentUserKeyPath
Modified: trunk/reactos/lib/rtl/registry.c
_____
Modified: trunk/reactos/lib/rtl/registry.c
--- trunk/reactos/lib/rtl/registry.c 2005-05-06 00:07:05 UTC (rev
15028)
+++ trunk/reactos/lib/rtl/registry.c 2005-05-06 00:09:08 UTC (rev
15029)
@@ -257,7 +257,7 @@
DPRINT ("RtlFormatCurrentUserKeyPath() called\n");
Status = ZwOpenThreadToken (NtCurrentThread (),
- TOKEN_READ,
+ TOKEN_QUERY,
TRUE,
&TokenHandle);
if (!NT_SUCCESS (Status))
@@ -269,7 +269,7 @@
}
Status = ZwOpenProcessToken (NtCurrentProcess (),
- TOKEN_READ,
+ TOKEN_QUERY,
&TokenHandle);
if (!NT_SUCCESS (Status))
{