Author: weiden
Date: Sun Oct 15 23:58:57 2006
New Revision: 24529
URL:
http://svn.reactos.org/svn/reactos?rev=24529&view=rev
Log:
Implement the advapi32 part of ImpersonateAnonymousToken
Modified:
trunk/reactos/dll/win32/advapi32/advapi32.def
trunk/reactos/dll/win32/advapi32/sec/misc.c
trunk/reactos/include/psdk/winbase.h
Modified: trunk/reactos/dll/win32/advapi32/advapi32.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/advapi3…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/advapi32.def (original)
+++ trunk/reactos/dll/win32/advapi32/advapi32.def Sun Oct 15 23:58:57 2006
@@ -309,7 +309,7 @@
;I_ScSetServiceBitsA@20
;I_ScSetServiceBitsW@20
;IdentifyCodeAuthzLevelW
-;ImpersonateAnonymousToken
+ImpersonateAnonymousToken@4
ImpersonateLoggedOnUser@4
ImpersonateNamedPipeClient@4
ImpersonateSelf@4
Modified: trunk/reactos/dll/win32/advapi32/sec/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/mis…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/sec/misc.c (original)
+++ trunk/reactos/dll/win32/advapi32/sec/misc.c Sun Oct 15 23:58:57 2006
@@ -437,6 +437,27 @@
return FALSE;
}
return TRUE;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+ImpersonateAnonymousToken(IN HANDLE ThreadHandle)
+{
+ NTSTATUS Status;
+
+ Status = NtImpersonateAnonymousToken(ThreadHandle);
+
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ return TRUE;
}
Modified: trunk/reactos/include/psdk/winbase.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winbase.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/winbase.h (original)
+++ trunk/reactos/include/psdk/winbase.h Sun Oct 15 23:58:57 2006
@@ -1663,6 +1663,7 @@
BOOL WINAPI HeapUnlock(HANDLE);
BOOL WINAPI HeapValidate(HANDLE,DWORD,PCVOID);
BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY);
+BOOL WINAPI ImpersonateAnonymousToken(HANDLE);
BOOL WINAPI ImpersonateLoggedOnUser(HANDLE);
BOOL WINAPI ImpersonateNamedPipeClient(HANDLE);
BOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);