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
4fdb45f2
Commit
4fdb45f2
authored
Mar 19, 2024
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Load NtMakeTemporaryObject() dynamically.
parent
b4a5775f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
om.c
dlls/ntdll/tests/om.c
+10
-2
No files found.
dlls/ntdll/tests/om.c
View file @
4fdb45f2
...
...
@@ -72,6 +72,7 @@ static NTSTATUS (WINAPI *pNtOpenThreadToken)(HANDLE,DWORD,BOOLEAN,HANDLE*);
static
NTSTATUS
(
WINAPI
*
pNtDuplicateToken
)(
HANDLE
,
ACCESS_MASK
,
OBJECT_ATTRIBUTES
*
,
BOOLEAN
,
TOKEN_TYPE
,
HANDLE
*
);
static
NTSTATUS
(
WINAPI
*
pNtDuplicateObject
)(
HANDLE
,
HANDLE
,
HANDLE
,
HANDLE
*
,
ACCESS_MASK
,
ULONG
,
ULONG
);
static
NTSTATUS
(
WINAPI
*
pNtCompareObjects
)(
HANDLE
,
HANDLE
);
static
NTSTATUS
(
WINAPI
*
pNtMakeTemporaryObject
)(
HANDLE
);
#define KEYEDEVENT_WAIT 0x0001
#define KEYEDEVENT_WAKE 0x0002
...
...
@@ -3258,6 +3259,12 @@ static void test_object_permanence(void)
NTSTATUS
status
;
BOOL
creatpermapriv
=
FALSE
;
if
(
!
pNtMakeTemporaryObject
)
{
win_skip
(
"NtMakeTemporaryObject is not available.
\n
"
);
return
;
}
status
=
NtOpenProcessToken
(
GetCurrentProcess
(),
TOKEN_DUPLICATE
,
&
process_token
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenProcessToken returned %08lx
\n
"
,
status
);
...
...
@@ -3320,7 +3327,7 @@ static void test_object_permanence(void)
if
(
test
->
make_temp_status
==
STATUS_SUCCESS
)
ok
(
!!
(
obi
.
GrantedAccess
&
DELETE
),
"expected DELETE access in %08lx
\n
"
,
obi
.
GrantedAccess
);
status
=
NtMakeTemporaryObject
(
handle
);
status
=
p
NtMakeTemporaryObject
(
handle
);
todo_wine_if
(
test
->
make_temp_status
==
STATUS_ACCESS_DENIED
)
ok
(
status
==
test
->
make_temp_status
,
"NtMakeTemporaryObject returned %08lx
\n
"
,
status
);
if
(
!
NT_ERROR
(
status
))
is_permanent
=
FALSE
;
...
...
@@ -3372,7 +3379,7 @@ static void test_object_permanence(void)
ok
(
obi_new
.
Attributes
==
expect_attr
,
"expected attr %08lx, got %08lx
\n
"
,
expect_attr
,
obi_new
.
Attributes
);
/* ensure object is deleted */
NtMakeTemporaryObject
(
handle
);
p
NtMakeTemporaryObject
(
handle
);
NtClose
(
handle
);
}
winetest_pop_context
();
...
...
@@ -3429,6 +3436,7 @@ START_TEST(om)
pNtDuplicateToken
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtDuplicateToken"
);
pNtDuplicateObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtDuplicateObject"
);
pNtCompareObjects
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCompareObjects"
);
pNtMakeTemporaryObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtMakeTemporaryObject"
);
test_null_in_object_name
();
test_case_sensitive
();
...
...
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