From 9495180325b76cccb0003e115047915c548b54d1 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Wed, 15 Jun 2005 10:20:17 +0000 Subject: [PATCH] MSDN states that DuplicateToken should create a new token with the TOKEN_QUERY | TOKEN_IMPERSONATE rights, not 0. --- dlls/advapi32/security.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index 2b073575c4a..3799d98e088 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -3129,8 +3129,9 @@ BOOL WINAPI DuplicateToken( SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, PHANDLE DuplicateTokenHandle ) { - return DuplicateTokenEx( ExistingTokenHandle, 0, NULL, ImpersonationLevel, - TokenImpersonation, DuplicateTokenHandle ); + return DuplicateTokenEx( ExistingTokenHandle, TOKEN_IMPERSONATE | TOKEN_QUERY, + NULL, ImpersonationLevel, TokenImpersonation, + DuplicateTokenHandle ); } BOOL WINAPI EnumDependentServicesA(