mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 05:26:58 +00:00
[LSASRV]
LsarSetSecurityObject: Impersonate the client and retrieve the client token when the owner sid will be set. svn path=/trunk/; revision=72449
This commit is contained in:
parent
15d8c32ada
commit
1161db9756
|
@ -372,18 +372,27 @@ NTSTATUS WINAPI LsarSetSecurityObject(
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
#if 0
|
/* Get the clients token if we try to set the owner */
|
||||||
RpcImpersonateClient(NULL);
|
if (SecurityInformation & OWNER_SECURITY_INFORMATION)
|
||||||
|
{
|
||||||
|
Status = I_RpcMapWin32Status(RpcImpersonateClient(NULL));
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
ERR("RpcImpersonateClient returns 0x%08lx\n", Status);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
Status = NtOpenThreadToken(NtCurrentThread(),
|
Status = NtOpenThreadToken(NtCurrentThread(),
|
||||||
8,
|
TOKEN_QUERY,
|
||||||
TRUE,
|
TRUE,
|
||||||
&hToken);
|
&TokenHandle);
|
||||||
if (!NT_SUCCESS(Status))
|
RpcRevertToSelf();
|
||||||
goto done;
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
RpcRevertToSelf();
|
ERR("NtOpenThreadToken returns 0x%08lx\n", Status);
|
||||||
#endif
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Build the new security descriptor */
|
/* Build the new security descriptor */
|
||||||
Status = RtlSetSecurityObject(SecurityInformation,
|
Status = RtlSetSecurityObject(SecurityInformation,
|
||||||
|
|
Loading…
Reference in a new issue