From b255c11787d690ae202179fedec7e512da4a6502 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Tue, 17 Aug 2004 22:09:55 +0000 Subject: [PATCH] Stub implementation for NtSetInformationToken. --- dlls/ntdll/nt.c | 33 +++++++++++++++++++++++++++++++-- dlls/ntdll/ntdll.spec | 4 ++-- include/winternl.h | 1 + 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 47ca85eda61..d0463a5e66d 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -277,13 +277,28 @@ NTSTATUS WINAPI NtQueryInformationToken( break; default: { - ERR("Unhandled Token Information class!\n"); + ERR("Unhandled Token Information class %ld!\n", tokeninfoclass); return STATUS_NOT_IMPLEMENTED; } } return 0; } +/****************************************************************************** +* NtSetInformationToken [NTDLL.@] +* ZwSetInformationToken [NTDLL.@] +*/ +NTSTATUS WINAPI NtSetInformationToken( + HANDLE TokenHandle, + TOKEN_INFORMATION_CLASS TokenInformationClass, + PVOID TokenInformation, + ULONG TokenInformationLength) +{ + FIXME("%p %d %p %lu\n", TokenHandle, TokenInformationClass, + TokenInformation, TokenInformationLength); + return STATUS_NOT_IMPLEMENTED; +} + /* * Section */ @@ -672,12 +687,26 @@ NTSTATUS WINAPI NtQuerySystemInformation( srqi->RegistryQuotaAllowed = 0x2000000; srqi->RegistryQuotaUsed = 0x200000; srqi->Reserved1 = (void*)0x200000; - if (ResultLength) *ResultLength = sizeof(*srqi); + len = sizeof(*srqi); } else ret = STATUS_INFO_LENGTH_MISMATCH; } break; + case SystemKernelDebuggerInformation: + { + PSYSTEM_KERNEL_DEBUGGER_INFORMATION pkdi; + if( Length >= sizeof(*pkdi)) + { + pkdi = SystemInformation; + pkdi->DebuggerEnabled = FALSE; + pkdi->DebuggerNotPresent = TRUE; + len = sizeof(*pkdi); + } + else ret = STATUS_INFO_LENGTH_MISMATCH; + } + break; + default: FIXME("(0x%08x,%p,0x%08lx,%p) stub\n", SystemInformationClass,SystemInformation,Length,ResultLength); diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 542241d5667..a8cef2fe55a 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -230,7 +230,7 @@ @ stdcall NtSetInformationObject(long long ptr long) @ stdcall NtSetInformationProcess(long long long long) @ stdcall NtSetInformationThread(long long ptr long) -@ stub NtSetInformationToken +@ stdcall NtSetInformationToken(long long ptr long) @ stdcall NtSetIntervalProfile(long long) @ stub NtSetIoCompletion @ stub NtSetLdtEntries @@ -808,7 +808,7 @@ @ stdcall ZwSetInformationObject(long long ptr long) NtSetInformationObject @ stdcall ZwSetInformationProcess(long long long long) NtSetInformationProcess @ stdcall ZwSetInformationThread(long long ptr long) NtSetInformationThread -@ stub ZwSetInformationToken +@ stdcall ZwSetInformationToken(long long ptr long) NtSetInformationToken @ stdcall ZwSetIntervalProfile(long long) NtSetIntervalProfile @ stub ZwSetIoCompletion @ stub ZwSetLdtEntries diff --git a/include/winternl.h b/include/winternl.h index b49db5b1482..979f7202101 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1303,6 +1303,7 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_I NTSTATUS WINAPI NtSetInformationKey(HKEY,const int,PVOID,ULONG); NTSTATUS WINAPI NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG); NTSTATUS WINAPI NtSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG); +NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG); NTSTATUS WINAPI NtSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR); NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*); NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMERAPCROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*);