Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
d86393f6
Commit
d86393f6
authored
Aug 26, 2002
by
Andriy Palamarchuk
Committed by
Alexandre Julliard
Aug 26, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SetTokenInformation stub implementation, a few other small changes.
parent
41b26099
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
11 deletions
+74
-11
advapi32.spec
dlls/advapi32/advapi32.spec
+1
-1
security.c
dlls/advapi32/security.c
+67
-9
winnt.h
include/winnt.h
+6
-1
No files found.
dlls/advapi32/advapi32.spec
View file @
d86393f6
...
...
@@ -241,7 +241,7 @@
@ stub SetServiceObjectSecurity
@ stdcall SetServiceStatus(long long)SetServiceStatus
@ stdcall SetThreadToken (ptr ptr) SetThreadToken
@ st
ub
SetTokenInformation
@ st
dcall SetTokenInformation (long long ptr long)
SetTokenInformation
@ stdcall StartServiceA(long long ptr) StartServiceA
@ stdcall StartServiceCtrlDispatcherA(ptr) StartServiceCtrlDispatcherA
@ stdcall StartServiceCtrlDispatcherW(ptr) StartServiceCtrlDispatcherW
...
...
dlls/advapi32/security.c
View file @
d86393f6
...
...
@@ -110,9 +110,9 @@ AdjustTokenPrivileges( HANDLE TokenHandle, BOOL DisableAllPrivileges,
* CheckTokenMembership [ADVAPI32.@]
*
* PARAMS
* TokenHandle []
* SidToCheck []
* IsMember []
* TokenHandle [
I
]
* SidToCheck [
I
]
* IsMember [
O
]
*/
BOOL
WINAPI
CheckTokenMembership
(
HANDLE
TokenHandle
,
PSID
SidToCheck
,
...
...
@@ -128,18 +128,76 @@ CheckTokenMembership( HANDLE TokenHandle, PSID SidToCheck,
* GetTokenInformation [ADVAPI32.@]
*
* PARAMS
* token []
* tokeninfoclass []
* tokeninfo []
* tokeninfolength []
* retlen []
* token [
I
]
* tokeninfoclass [
I
]
* tokeninfo [
O
]
* tokeninfolength [
I
]
* retlen [
O
]
*
*/
BOOL
WINAPI
GetTokenInformation
(
HANDLE
token
,
TOKEN_INFORMATION_CLASS
tokeninfoclass
,
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
;
}
/*************************************************************************
...
...
include/winnt.h
View file @
d86393f6
...
...
@@ -3356,7 +3356,12 @@ typedef enum _TOKEN_INFORMATION_CLASS {
TokenSource
,
TokenType
,
TokenImpersonationLevel
,
TokenStatistics
TokenStatistics
,
TokenRestrictedSids
,
TokenSessionId
,
TokenGroupsAndPrivileges
,
TokenSessionReference
,
TokenSandBoxInert
}
TOKEN_INFORMATION_CLASS
;
#define TOKEN_TOKEN_ADJUST_DEFAULT 0x0080
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment