MSDN states that DuplicateToken should create a new token with the
TOKEN_QUERY | TOKEN_IMPERSONATE rights, not 0.
This commit is contained in:
parent
ebb1aaee86
commit
9495180325
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue