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
245bdef5
Commit
245bdef5
authored
Oct 15, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Implement GetSecurityInfo(SE_WINDOW_OBJECT).
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55763
parent
2408676f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
2 deletions
+40
-2
Makefile.in
dlls/advapi32/Makefile.in
+1
-1
security.c
dlls/advapi32/security.c
+15
-0
Makefile.in
dlls/advapi32/tests/Makefile.in
+1
-1
security.c
dlls/advapi32/tests/security.c
+23
-0
No files found.
dlls/advapi32/Makefile.in
View file @
245bdef5
...
...
@@ -2,7 +2,7 @@ EXTRADEFS = -D_ADVAPI32_
MODULE
=
advapi32.dll
IMPORTLIB
=
advapi32
IMPORTS
=
kernelbase sechost msvcrt
DELAYIMPORTS
=
rpcrt4
DELAYIMPORTS
=
rpcrt4
user32
C_SRCS
=
\
advapi.c
\
...
...
dlls/advapi32/security.c
View file @
245bdef5
...
...
@@ -1529,6 +1529,21 @@ DWORD WINAPI GetSecurityInfo( HANDLE handle, SE_OBJECT_TYPE type, SECURITY_INFOR
}
break
;
case
SE_WINDOW_OBJECT
:
if
(
!
GetUserObjectSecurity
(
handle
,
&
SecurityInfo
,
NULL
,
0
,
&
size
)
&&
GetLastError
()
!=
ERROR_INSUFFICIENT_BUFFER
)
return
GetLastError
();
if
(
!
(
sd
=
LocalAlloc
(
0
,
size
)))
return
ERROR_NOT_ENOUGH_MEMORY
;
if
(
!
GetUserObjectSecurity
(
handle
,
&
SecurityInfo
,
sd
,
size
,
&
size
))
{
LocalFree
(
sd
);
return
GetLastError
();
}
break
;
case
SE_KERNEL_OBJECT
:
case
SE_FILE_OBJECT
:
case
SE_WMIGUID_OBJECT
:
...
...
dlls/advapi32/tests/Makefile.in
View file @
245bdef5
TESTDLL
=
advapi32.dll
IMPORTS
=
advapi32
IMPORTS
=
advapi32
user32
C_SRCS
=
\
cred.c
\
...
...
dlls/advapi32/tests/security.c
View file @
245bdef5
...
...
@@ -8780,6 +8780,28 @@ static void test_IsValidSecurityDescriptor(void)
free
(
sd
);
}
static
void
test_window_security
(
void
)
{
PSECURITY_DESCRIPTOR
sd
;
BOOL
present
,
defaulted
;
HDESK
desktop
;
DWORD
ret
;
ACL
*
dacl
;
desktop
=
GetThreadDesktop
(
GetCurrentThreadId
());
ret
=
GetSecurityInfo
(
desktop
,
SE_WINDOW_OBJECT
,
DACL_SECURITY_INFORMATION
,
NULL
,
NULL
,
NULL
,
NULL
,
&
sd
);
ok
(
!
ret
,
"got error %lu
\n
"
,
ret
);
ret
=
GetSecurityDescriptorDacl
(
sd
,
&
present
,
&
dacl
,
&
defaulted
);
ok
(
ret
==
TRUE
,
"got error %lu
\n
"
,
GetLastError
());
todo_wine
ok
(
present
==
TRUE
,
"got present %d
\n
"
,
present
);
ok
(
defaulted
==
FALSE
,
"got defaulted %d
\n
"
,
defaulted
);
LocalFree
(
sd
);
}
START_TEST
(
security
)
{
init
();
...
...
@@ -8850,6 +8872,7 @@ START_TEST(security)
test_elevation
();
test_group_as_file_owner
();
test_IsValidSecurityDescriptor
();
test_window_security
();
/* Must be the last test, modifies process token */
test_token_security_descriptor
();
...
...
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