Implement SetThreadToken using NtSetInformationThread.

This commit is contained in:
Mike McCormack 2004-08-13 23:20:27 +00:00 committed by Alexandre Julliard
parent 0cc262c5bf
commit edf55ec7d9
2 changed files with 9 additions and 6 deletions

View File

@ -362,11 +362,8 @@ SetTokenInformation( HANDLE token, TOKEN_INFORMATION_CLASS tokeninfoclass,
*/
BOOL WINAPI SetThreadToken(PHANDLE thread, HANDLE token)
{
FIXME("(%p, %p): stub (NT impl. only)\n", thread, token);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
CallWin32ToNt (NtSetInformationThread( thread ? *thread : GetCurrentThread(),
ThreadImpersonationToken, &token, sizeof token ));
}
/* ##############################

View File

@ -539,12 +539,18 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
FIXME( "ZeroTlsCell not supported on other threads\n" );
return STATUS_NOT_IMPLEMENTED;
case ThreadImpersonationToken:
{
const HANDLE *phToken = data;
if (length != sizeof(HANDLE)) return STATUS_INVALID_PARAMETER;
FIXME("Set ThreadImpersonationToken handle to %p\n", *phToken );
return STATUS_SUCCESS;
}
case ThreadBasicInformation:
case ThreadTimes:
case ThreadPriority:
case ThreadBasePriority:
case ThreadAffinityMask:
case ThreadImpersonationToken:
case ThreadDescriptorTableEntry:
case ThreadEnableAlignmentFaultFixup:
case ThreadEventPair_Reusable: