Author: ekohl
Date: Thu Jun 3 15:36:50 2010
New Revision: 47535
URL:
http://svn.reactos.org/svn/reactos?rev=47535&view=rev
Log:
[NTOSKRNL]
NtDuplicateToken: If the called does not provide any desired access rights the duplicate
token will inherit the granted rights of the original token.
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=47…
==============================================================================
--- trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] Thu Jun 3 15:36:50 2010
@@ -1806,6 +1806,7 @@
PTOKEN NewToken;
PSECURITY_QUALITY_OF_SERVICE CapturedSecurityQualityOfService;
BOOLEAN QoSPresent;
+ OBJECT_HANDLE_INFORMATION HandleInformation;
NTSTATUS Status;
PAGED_CODE();
@@ -1843,7 +1844,7 @@
SepTokenObjectType,
PreviousMode,
(PVOID*)&Token,
- NULL);
+ &HandleInformation);
if (!NT_SUCCESS(Status))
{
SepReleaseSecurityQualityOfService(CapturedSecurityQualityOfService,
@@ -1884,7 +1885,7 @@
{
Status = ObInsertObject((PVOID)NewToken,
NULL,
- DesiredAccess,
+ (DesiredAccess ? DesiredAccess :
HandleInformation.GrantedAccess),
0,
NULL,
&hToken);