Author: ekohl Date: Sat Jan 17 11:53:40 2015 New Revision: 66045
URL: http://svn.reactos.org/svn/reactos?rev=66045&view=rev Log: [NTOSKRNL] SepDuplicateToken: Do not allocate a new ModifiedId for the duplicated token. Use the ModifiedId of the source token instead. This fixes the DuplicateTokenEx test.
Modified: trunk/reactos/ntoskrnl/se/token.c
Modified: trunk/reactos/ntoskrnl/se/token.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/token.c?rev=660... ============================================================================== --- trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] Sat Jan 17 11:53:40 2015 @@ -400,18 +400,12 @@ return Status; }
- Status = ZwAllocateLocallyUniqueId(&AccessToken->ModifiedId); - if (!NT_SUCCESS(Status)) - { - ObDereferenceObject(AccessToken); - return Status; - } - AccessToken->TokenLock = &SepTokenLock;
AccessToken->TokenType = TokenType; AccessToken->ImpersonationLevel = Level; RtlCopyLuid(&AccessToken->AuthenticationId, &Token->AuthenticationId); + RtlCopyLuid(&AccessToken->ModifiedId, &Token->ModifiedId);
AccessToken->TokenSource.SourceIdentifier.LowPart = Token->TokenSource.SourceIdentifier.LowPart; AccessToken->TokenSource.SourceIdentifier.HighPart = Token->TokenSource.SourceIdentifier.HighPart;