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
439b852d
Commit
439b852d
authored
Mar 16, 2007
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Mar 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: DuplicateTokenEx is not present on all platforms.
parent
81e7d69d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
pipe.c
dlls/kernel32/tests/pipe.c
+14
-1
No files found.
dlls/kernel32/tests/pipe.c
View file @
439b852d
...
...
@@ -36,6 +36,9 @@
#define NB_SERVER_LOOPS 8
static
HANDLE
alarm_event
;
static
BOOL
(
WINAPI
*
pDuplicateTokenEx
)(
HANDLE
,
DWORD
,
LPSECURITY_ATTRIBUTES
,
SECURITY_IMPERSONATION_LEVEL
,
TOKEN_TYPE
,
PHANDLE
);
static
void
test_CreateNamedPipe
(
int
pipemode
)
{
...
...
@@ -907,7 +910,7 @@ static HANDLE make_impersonation_token(DWORD Access, SECURITY_IMPERSONATION_LEVE
ret
=
OpenProcessToken
(
GetCurrentProcess
(),
TOKEN_DUPLICATE
,
&
ProcessToken
);
ok
(
ret
,
"OpenProcessToken failed with error %d
\n
"
,
GetLastError
());
ret
=
DuplicateTokenEx
(
ProcessToken
,
Access
,
NULL
,
ImpersonationLevel
,
TokenImpersonation
,
&
Token
);
ret
=
p
DuplicateTokenEx
(
ProcessToken
,
Access
,
NULL
,
ImpersonationLevel
,
TokenImpersonation
,
&
Token
);
ok
(
ret
,
"DuplicateToken failed with error %d
\n
"
,
GetLastError
());
CloseHandle
(
ProcessToken
);
...
...
@@ -1196,6 +1199,11 @@ static void test_impersonation(void)
HANDLE
hProcessToken
;
BOOL
ret
;
if
(
!
pDuplicateTokenEx
)
{
skip
(
"DuplicateTokenEx not found
\n
"
);
return
;
}
ret
=
OpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
,
&
hProcessToken
);
if
(
!
ret
)
{
...
...
@@ -1246,6 +1254,11 @@ static void test_impersonation(void)
START_TEST
(
pipe
)
{
HMODULE
hmod
;
hmod
=
GetModuleHandle
(
"advapi32.dll"
);
pDuplicateTokenEx
=
(
void
*
)
GetProcAddress
(
hmod
,
"DuplicateTokenEx"
);
trace
(
"test 1 of 7:
\n
"
);
if
(
test_DisconnectNamedPipe
())
return
;
...
...
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