Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c55c4ab8
Commit
c55c4ab8
authored
Feb 22, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Support token object type.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
eea7702e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
om.c
dlls/ntdll/tests/om.c
+10
-0
token.c
server/token.c
+9
-1
No files found.
dlls/ntdll/tests/om.c
View file @
c55c4ab8
...
...
@@ -1348,6 +1348,7 @@ static void test_query_object(void)
UNICODE_STRING
path
,
session
,
*
str
;
char
dir
[
MAX_PATH
],
tmp_path
[
MAX_PATH
],
file1
[
MAX_PATH
+
16
];
LARGE_INTEGER
size
;
BOOL
ret
;
sprintf
(
tmp_path
,
"
\\
Sessions
\\
%u"
,
NtCurrentTeb
()
->
Peb
->
SessionId
);
pRtlCreateUnicodeStringFromAsciiz
(
&
session
,
tmp_path
);
...
...
@@ -1566,6 +1567,15 @@ static void test_query_object(void)
test_object_type
(
GetCurrentThread
(),
"Thread"
);
test_no_file_info
(
GetCurrentThread
()
);
ret
=
OpenProcessToken
(
GetCurrentProcess
(),
TOKEN_ALL_ACCESS
,
&
handle
);
ok
(
ret
,
"OpenProcessToken failed: %u
\n
"
,
GetLastError
());
test_object_type
(
handle
,
"Token"
);
test_no_file_info
(
handle
);
pNtClose
(
handle
);
}
static
void
test_type_mismatch
(
void
)
...
...
server/token.c
View file @
c55c4ab8
...
...
@@ -134,6 +134,7 @@ struct group
};
static
void
token_dump
(
struct
object
*
obj
,
int
verbose
);
static
struct
object_type
*
token_get_type
(
struct
object
*
obj
);
static
unsigned
int
token_map_access
(
struct
object
*
obj
,
unsigned
int
access
);
static
void
token_destroy
(
struct
object
*
obj
);
...
...
@@ -141,7 +142,7 @@ static const struct object_ops token_ops =
{
sizeof
(
struct
token
),
/* size */
token_dump
,
/* dump */
no_get_type
,
/* get_type */
token_get_type
,
/* get_type */
no_add_queue
,
/* add_queue */
NULL
,
/* remove_queue */
NULL
,
/* signaled */
...
...
@@ -167,6 +168,13 @@ static void token_dump( struct object *obj, int verbose )
token
->
token_id
.
low_part
,
token
->
primary
,
token
->
impersonation_level
);
}
static
struct
object_type
*
token_get_type
(
struct
object
*
obj
)
{
static
const
WCHAR
name
[]
=
{
'T'
,
'o'
,
'k'
,
'e'
,
'n'
};
static
const
struct
unicode_str
str
=
{
name
,
sizeof
(
name
)
};
return
get_object_type
(
&
str
);
}
static
unsigned
int
token_map_access
(
struct
object
*
obj
,
unsigned
int
access
)
{
if
(
access
&
GENERIC_READ
)
access
|=
TOKEN_READ
;
...
...
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