MSDN states that DuplicateToken should create a new token with the

TOKEN_QUERY | TOKEN_IMPERSONATE rights, not 0.
This commit is contained in:
Robert Shearman 2005-06-15 10:20:17 +00:00 committed by Alexandre Julliard
parent ebb1aaee86
commit 9495180325
1 changed files with 3 additions and 2 deletions

View File

@ -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(