mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:43:01 +00:00
- Changed some functions from Nt to Zw in RtlFormatCurrentUserKeyPath to bypass the buffer checks.
svn path=/trunk/; revision=11203
This commit is contained in:
parent
3fdd7a717c
commit
fa64b48be5
1 changed files with 6 additions and 6 deletions
|
@ -220,7 +220,7 @@ RtlFormatCurrentUserKeyPath (OUT PUNICODE_STRING KeyPath)
|
|||
|
||||
DPRINT ("RtlFormatCurrentUserKeyPath() called\n");
|
||||
|
||||
Status = NtOpenThreadToken (NtCurrentThread (),
|
||||
Status = ZwOpenThreadToken (NtCurrentThread (),
|
||||
TOKEN_READ,
|
||||
TRUE,
|
||||
&TokenHandle);
|
||||
|
@ -228,22 +228,22 @@ RtlFormatCurrentUserKeyPath (OUT PUNICODE_STRING KeyPath)
|
|||
{
|
||||
if (Status != STATUS_NO_TOKEN)
|
||||
{
|
||||
DPRINT1 ("NtOpenThreadToken() failed (Status %lx)\n", Status);
|
||||
DPRINT1 ("ZwOpenThreadToken() failed (Status %lx)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = NtOpenProcessToken (NtCurrentProcess (),
|
||||
Status = ZwOpenProcessToken (NtCurrentProcess (),
|
||||
TOKEN_READ,
|
||||
&TokenHandle);
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
DPRINT1 ("NtOpenProcessToken() failed (Status %lx)\n", Status);
|
||||
DPRINT1 ("ZwOpenProcessToken() failed (Status %lx)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
SidBuffer = (PSID_AND_ATTRIBUTES)Buffer;
|
||||
Status = NtQueryInformationToken (TokenHandle,
|
||||
Status = ZwQueryInformationToken (TokenHandle,
|
||||
TokenUser,
|
||||
(PVOID)SidBuffer,
|
||||
256,
|
||||
|
@ -251,7 +251,7 @@ RtlFormatCurrentUserKeyPath (OUT PUNICODE_STRING KeyPath)
|
|||
NtClose (TokenHandle);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT ("NtQueryInformationToken() failed (Status %lx)\n", Status);
|
||||
DPRINT ("ZwQueryInformationToken() failed (Status %lx)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue