Commit d86393f6 authored by Andriy Palamarchuk's avatar Andriy Palamarchuk Committed by Alexandre Julliard

SetTokenInformation stub implementation, a few other small changes.

parent 41b26099
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
@ stub SetServiceObjectSecurity @ stub SetServiceObjectSecurity
@ stdcall SetServiceStatus(long long)SetServiceStatus @ stdcall SetServiceStatus(long long)SetServiceStatus
@ stdcall SetThreadToken (ptr ptr) SetThreadToken @ stdcall SetThreadToken (ptr ptr) SetThreadToken
@ stub SetTokenInformation @ stdcall SetTokenInformation (long long ptr long) SetTokenInformation
@ stdcall StartServiceA(long long ptr) StartServiceA @ stdcall StartServiceA(long long ptr) StartServiceA
@ stdcall StartServiceCtrlDispatcherA(ptr) StartServiceCtrlDispatcherA @ stdcall StartServiceCtrlDispatcherA(ptr) StartServiceCtrlDispatcherA
@ stdcall StartServiceCtrlDispatcherW(ptr) StartServiceCtrlDispatcherW @ stdcall StartServiceCtrlDispatcherW(ptr) StartServiceCtrlDispatcherW
......
...@@ -110,9 +110,9 @@ AdjustTokenPrivileges( HANDLE TokenHandle, BOOL DisableAllPrivileges, ...@@ -110,9 +110,9 @@ AdjustTokenPrivileges( HANDLE TokenHandle, BOOL DisableAllPrivileges,
* CheckTokenMembership [ADVAPI32.@] * CheckTokenMembership [ADVAPI32.@]
* *
* PARAMS * PARAMS
* TokenHandle [] * TokenHandle [I]
* SidToCheck [] * SidToCheck [I]
* IsMember [] * IsMember [O]
*/ */
BOOL WINAPI BOOL WINAPI
CheckTokenMembership( HANDLE TokenHandle, PSID SidToCheck, CheckTokenMembership( HANDLE TokenHandle, PSID SidToCheck,
...@@ -128,18 +128,76 @@ CheckTokenMembership( HANDLE TokenHandle, PSID SidToCheck, ...@@ -128,18 +128,76 @@ CheckTokenMembership( HANDLE TokenHandle, PSID SidToCheck,
* GetTokenInformation [ADVAPI32.@] * GetTokenInformation [ADVAPI32.@]
* *
* PARAMS * PARAMS
* token [] * token [I]
* tokeninfoclass [] * tokeninfoclass [I]
* tokeninfo [] * tokeninfo [O]
* tokeninfolength [] * tokeninfolength [I]
* retlen [] * retlen [O]
* *
*/ */
BOOL WINAPI BOOL WINAPI
GetTokenInformation( HANDLE token, TOKEN_INFORMATION_CLASS tokeninfoclass, GetTokenInformation( HANDLE token, TOKEN_INFORMATION_CLASS tokeninfoclass,
LPVOID tokeninfo, DWORD tokeninfolength, LPDWORD retlen ) LPVOID tokeninfo, DWORD tokeninfolength, LPDWORD retlen )
{ {
CallWin32ToNt (NtQueryInformationToken( token, tokeninfoclass, tokeninfo, tokeninfolength, retlen)); TRACE("(%x, %s, %p, %ld, %p): \n",
token,
(tokeninfoclass == TokenUser) ? "TokenUser" :
(tokeninfoclass == TokenGroups) ? "TokenGroups" :
(tokeninfoclass == TokenPrivileges) ? "TokenPrivileges" :
(tokeninfoclass == TokenOwner) ? "TokenOwner" :
(tokeninfoclass == TokenPrimaryGroup) ? "TokenPrimaryGroup" :
(tokeninfoclass == TokenDefaultDacl) ? "TokenDefaultDacl" :
(tokeninfoclass == TokenSource) ? "TokenSource" :
(tokeninfoclass == TokenType) ? "TokenType" :
(tokeninfoclass == TokenImpersonationLevel) ? "TokenImpersonationLevel" :
(tokeninfoclass == TokenStatistics) ? "TokenStatistics" :
(tokeninfoclass == TokenRestrictedSids) ? "TokenRestrictedSids" :
(tokeninfoclass == TokenSessionId) ? "TokenSessionId" :
(tokeninfoclass == TokenGroupsAndPrivileges) ? "TokenGroupsAndPrivileges" :
(tokeninfoclass == TokenSessionReference) ? "TokenSessionReference" :
(tokeninfoclass == TokenSandBoxInert) ? "TokenSandBoxInert" :
"Unknown",
tokeninfo, tokeninfolength, retlen);
CallWin32ToNt (NtQueryInformationToken( token, tokeninfoclass, tokeninfo, tokeninfolength, retlen));
}
/******************************************************************************
* SetTokenInformation [ADVAPI32.@]
*
* PARAMS
* token [I]
* tokeninfoclass [I]
* tokeninfo [I]
* tokeninfolength [I]
*
*/
BOOL WINAPI
SetTokenInformation( HANDLE token, TOKEN_INFORMATION_CLASS tokeninfoclass,
LPVOID tokeninfo, DWORD tokeninfolength )
{
FIXME("(%x, %s, %p, %ld): stub\n",
token,
(tokeninfoclass == TokenUser) ? "TokenUser" :
(tokeninfoclass == TokenGroups) ? "TokenGroups" :
(tokeninfoclass == TokenPrivileges) ? "TokenPrivileges" :
(tokeninfoclass == TokenOwner) ? "TokenOwner" :
(tokeninfoclass == TokenPrimaryGroup) ? "TokenPrimaryGroup" :
(tokeninfoclass == TokenDefaultDacl) ? "TokenDefaultDacl" :
(tokeninfoclass == TokenSource) ? "TokenSource" :
(tokeninfoclass == TokenType) ? "TokenType" :
(tokeninfoclass == TokenImpersonationLevel) ? "TokenImpersonationLevel" :
(tokeninfoclass == TokenStatistics) ? "TokenStatistics" :
(tokeninfoclass == TokenRestrictedSids) ? "TokenRestrictedSids" :
(tokeninfoclass == TokenSessionId) ? "TokenSessionId" :
(tokeninfoclass == TokenGroupsAndPrivileges) ? "TokenGroupsAndPrivileges" :
(tokeninfoclass == TokenSessionReference) ? "TokenSessionReference" :
(tokeninfoclass == TokenSandBoxInert) ? "TokenSandBoxInert" :
"Unknown",
tokeninfo, tokeninfolength);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
} }
/************************************************************************* /*************************************************************************
......
...@@ -3356,7 +3356,12 @@ typedef enum _TOKEN_INFORMATION_CLASS { ...@@ -3356,7 +3356,12 @@ typedef enum _TOKEN_INFORMATION_CLASS {
TokenSource, TokenSource,
TokenType, TokenType,
TokenImpersonationLevel, TokenImpersonationLevel,
TokenStatistics TokenStatistics,
TokenRestrictedSids,
TokenSessionId,
TokenGroupsAndPrivileges,
TokenSessionReference,
TokenSandBoxInert
} TOKEN_INFORMATION_CLASS; } TOKEN_INFORMATION_CLASS;
#define TOKEN_TOKEN_ADJUST_DEFAULT 0x0080 #define TOKEN_TOKEN_ADJUST_DEFAULT 0x0080
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment