mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:52:59 +00:00
Finish off NtDuplicateToken
svn path=/trunk/; revision=8690
This commit is contained in:
parent
988f1d5968
commit
8552f80d82
1 changed files with 15 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: token.c,v 1.32 2003/12/30 18:52:06 fireball Exp $
|
/* $Id: token.c,v 1.33 2004/03/13 19:25:47 jfilby Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -817,7 +817,7 @@ NtSetInformationToken(IN HANDLE TokenHandle,
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
NTSTATUS STDCALL
|
NTSTATUS STDCALL
|
||||||
NtDuplicateToken(IN HANDLE ExistingTokenHandle,
|
NtDuplicateToken(IN HANDLE ExistingTokenHandle,
|
||||||
|
@ -827,7 +827,6 @@ NtDuplicateToken(IN HANDLE ExistingTokenHandle,
|
||||||
IN TOKEN_TYPE TokenType,
|
IN TOKEN_TYPE TokenType,
|
||||||
OUT PHANDLE NewTokenHandle)
|
OUT PHANDLE NewTokenHandle)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
PACCESS_TOKEN Token;
|
PACCESS_TOKEN Token;
|
||||||
PACCESS_TOKEN NewToken;
|
PACCESS_TOKEN NewToken;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
@ -839,19 +838,27 @@ NtDuplicateToken(IN HANDLE ExistingTokenHandle,
|
||||||
UserMode,
|
UserMode,
|
||||||
(PVOID*)&Token,
|
(PVOID*)&Token,
|
||||||
NULL);
|
NULL);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT1 ("Failed to reference token (Status %lx)\n", Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
ExistingImpersonationLevel = Token->ImpersonationLevel;
|
ExistingImpersonationLevel = Token->ImpersonationLevel;
|
||||||
SepDuplicateToken(Token,
|
Status = SepDuplicateToken(Token,
|
||||||
ObjectAttributes,
|
ObjectAttributes,
|
||||||
ImpersonationLevel,
|
ImpersonationLevel,
|
||||||
TokenType,
|
TokenType,
|
||||||
ExistingImpersonationLevel,
|
ExistingImpersonationLevel,
|
||||||
KeGetPreviousMode(),
|
KeGetPreviousMode(),
|
||||||
&NewToken);
|
&NewToken);
|
||||||
#else
|
if (!NT_SUCCESS(Status))
|
||||||
UNIMPLEMENTED;
|
{
|
||||||
return(STATUS_NOT_IMPLEMENTED);
|
DPRINT1 ("Failed to duplicate token (Status %lx)\n", Status);
|
||||||
#endif
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID SepAdjustGroups(PACCESS_TOKEN Token,
|
VOID SepAdjustGroups(PACCESS_TOKEN Token,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue