ADVAPI32: implement SetThreadToken using NtSetInformationThread (RESEND)
Mike McCormack
mike at codeweavers.com
Fri Aug 13 07:46:21 CDT 2004
Dmitry Timoshkov wrote:
> Probably ThreadImpersonationToken handling should be isolated from
> other thread class identifiers otherwise FIXME will be printed for
> all them as well.
OK, fixed that problem.
Mike
ChangeLog:
* implement SetThreadToken using NtSetInformationThread
-------------- next part --------------
Index: dlls/ntdll/thread.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/thread.c,v
retrieving revision 1.19
diff -u -r1.19 thread.c
--- dlls/ntdll/thread.c 15 Jun 2004 00:52:03 -0000 1.19
+++ dlls/ntdll/thread.c 13 Aug 2004 11:23:29 -0000
@@ -539,12 +539,18 @@
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:
Index: dlls/advapi32/security.c
===================================================================
RCS file: /home/wine/wine/dlls/advapi32/security.c,v
retrieving revision 1.73
diff -u -r1.73 security.c
--- dlls/advapi32/security.c 9 Aug 2004 22:55:47 -0000 1.73
+++ dlls/advapi32/security.c 13 Aug 2004 11:23:30 -0000
@@ -362,11 +362,8 @@
*/
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, ThreadImpersonationToken,
+ (LPCVOID) &token, sizeof token ));
}
/* ##############################
More information about the wine-patches
mailing list