mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:42:57 +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");
|
DPRINT ("RtlFormatCurrentUserKeyPath() called\n");
|
||||||
|
|
||||||
Status = NtOpenThreadToken (NtCurrentThread (),
|
Status = ZwOpenThreadToken (NtCurrentThread (),
|
||||||
TOKEN_READ,
|
TOKEN_READ,
|
||||||
TRUE,
|
TRUE,
|
||||||
&TokenHandle);
|
&TokenHandle);
|
||||||
|
@ -228,22 +228,22 @@ RtlFormatCurrentUserKeyPath (OUT PUNICODE_STRING KeyPath)
|
||||||
{
|
{
|
||||||
if (Status != STATUS_NO_TOKEN)
|
if (Status != STATUS_NO_TOKEN)
|
||||||
{
|
{
|
||||||
DPRINT1 ("NtOpenThreadToken() failed (Status %lx)\n", Status);
|
DPRINT1 ("ZwOpenThreadToken() failed (Status %lx)\n", Status);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = NtOpenProcessToken (NtCurrentProcess (),
|
Status = ZwOpenProcessToken (NtCurrentProcess (),
|
||||||
TOKEN_READ,
|
TOKEN_READ,
|
||||||
&TokenHandle);
|
&TokenHandle);
|
||||||
if (!NT_SUCCESS (Status))
|
if (!NT_SUCCESS (Status))
|
||||||
{
|
{
|
||||||
DPRINT1 ("NtOpenProcessToken() failed (Status %lx)\n", Status);
|
DPRINT1 ("ZwOpenProcessToken() failed (Status %lx)\n", Status);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SidBuffer = (PSID_AND_ATTRIBUTES)Buffer;
|
SidBuffer = (PSID_AND_ATTRIBUTES)Buffer;
|
||||||
Status = NtQueryInformationToken (TokenHandle,
|
Status = ZwQueryInformationToken (TokenHandle,
|
||||||
TokenUser,
|
TokenUser,
|
||||||
(PVOID)SidBuffer,
|
(PVOID)SidBuffer,
|
||||||
256,
|
256,
|
||||||
|
@ -251,7 +251,7 @@ RtlFormatCurrentUserKeyPath (OUT PUNICODE_STRING KeyPath)
|
||||||
NtClose (TokenHandle);
|
NtClose (TokenHandle);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT ("NtQueryInformationToken() failed (Status %lx)\n", Status);
|
DPRINT ("ZwQueryInformationToken() failed (Status %lx)\n", Status);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue