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
2408676f
Commit
2408676f
authored
Oct 15, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add basic tests for GetUserObjectSecurity().
parent
1a1c1d07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
winstation.c
dlls/user32/tests/winstation.c
+26
-0
No files found.
dlls/user32/tests/winstation.c
View file @
2408676f
...
...
@@ -1093,6 +1093,31 @@ static void test_invisible_winstation(char **argv)
SetProcessWindowStation
(
old_winstation
);
}
static
void
test_get_security
(
void
)
{
SECURITY_INFORMATION
info
=
DACL_SECURITY_INFORMATION
;
HDESK
desktop
=
GetThreadDesktop
(
GetCurrentThreadId
());
DWORD
size
,
expect_size
;
char
buffer
[
500
];
BOOL
ret
;
size
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
GetUserObjectSecurity
(
desktop
,
&
info
,
NULL
,
0
,
&
size
);
ok
(
!
ret
,
"got %#x
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"got error %lu
\n
"
,
GetLastError
()
);
ok
(
size
&&
size
<
sizeof
(
buffer
),
"got size %lu
\n
"
,
size
);
expect_size
=
size
;
size
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
GetUserObjectSecurity
(
desktop
,
&
info
,
buffer
,
sizeof
(
buffer
),
&
size
);
ok
(
ret
==
TRUE
,
"got %#x
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"got error %lu
\n
"
,
GetLastError
()
);
ok
(
size
==
expect_size
,
"got size %lu
\n
"
,
size
);
ok
(
IsValidSecurityDescriptor
(
buffer
),
"expected valid SD
\n
"
);
}
START_TEST
(
winstation
)
{
char
**
argv
;
...
...
@@ -1126,4 +1151,5 @@ START_TEST(winstation)
test_getuserobjectinformation
();
test_foregroundwindow
();
test_invisible_winstation
(
argv
);
test_get_security
();
}
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