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,
|
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
|
||||||
PHANDLE DuplicateTokenHandle )
|
PHANDLE DuplicateTokenHandle )
|
||||||
{
|
{
|
||||||
return DuplicateTokenEx( ExistingTokenHandle, 0, NULL, ImpersonationLevel,
|
return DuplicateTokenEx( ExistingTokenHandle, TOKEN_IMPERSONATE | TOKEN_QUERY,
|
||||||
TokenImpersonation, DuplicateTokenHandle );
|
NULL, ImpersonationLevel, TokenImpersonation,
|
||||||
|
DuplicateTokenHandle );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WINAPI EnumDependentServicesA(
|
BOOL WINAPI EnumDependentServicesA(
|
||||||
|
|
Loading…
Reference in New Issue