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
52df833a
Commit
52df833a
authored
Apr 03, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Handle NULL DACL in SetSecurityInfo.
parent
fd8a33fd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
security.c
dlls/advapi32/security.c
+1
-1
security.c
dlls/advapi32/tests/security.c
+16
-0
No files found.
dlls/advapi32/security.c
View file @
52df833a
...
@@ -5743,7 +5743,7 @@ DWORD WINAPI SetSecurityInfo(HANDLE handle, SE_OBJECT_TYPE ObjectType,
...
@@ -5743,7 +5743,7 @@ DWORD WINAPI SetSecurityInfo(HANDLE handle, SE_OBJECT_TYPE ObjectType,
SetSecurityDescriptorGroup
(
&
sd
,
psidGroup
,
FALSE
);
SetSecurityDescriptorGroup
(
&
sd
,
psidGroup
,
FALSE
);
if
(
SecurityInfo
&
DACL_SECURITY_INFORMATION
)
if
(
SecurityInfo
&
DACL_SECURITY_INFORMATION
)
{
{
if
(
ObjectType
==
SE_FILE_OBJECT
)
if
(
ObjectType
==
SE_FILE_OBJECT
&&
pDacl
)
{
{
SECURITY_DESCRIPTOR_CONTROL
control
;
SECURITY_DESCRIPTOR_CONTROL
control
;
PSECURITY_DESCRIPTOR
psd
;
PSECURITY_DESCRIPTOR
psd
;
...
...
dlls/advapi32/tests/security.c
View file @
52df833a
...
@@ -3633,6 +3633,22 @@ static void test_GetNamedSecurityInfoA(void)
...
@@ -3633,6 +3633,22 @@ static void test_GetNamedSecurityInfoA(void)
ok
(
h
!=
INVALID_HANDLE_VALUE
,
"CreateFile error %d
\n
"
,
GetLastError
());
ok
(
h
!=
INVALID_HANDLE_VALUE
,
"CreateFile error %d
\n
"
,
GetLastError
());
CloseHandle
(
h
);
CloseHandle
(
h
);
/* test setting NULL DACL */
error
=
pSetNamedSecurityInfoA
(
tmpfile
,
SE_FILE_OBJECT
,
DACL_SECURITY_INFORMATION
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
!
error
,
"SetNamedSecurityInfoA failed with error %d
\n
"
,
error
);
error
=
pGetNamedSecurityInfoA
(
tmpfile
,
SE_FILE_OBJECT
,
DACL_SECURITY_INFORMATION
,
NULL
,
NULL
,
&
pDacl
,
NULL
,
&
pSD
);
ok
(
!
error
,
"GetNamedSecurityInfo failed with error %d
\n
"
,
error
);
todo_wine
ok
(
!
pDacl
,
"pDacl != NULL
\n
"
);
LocalFree
(
pSD
);
h
=
CreateFileA
(
tmpfile
,
GENERIC_READ
,
FILE_SHARE_DELETE
|
FILE_SHARE_WRITE
|
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
ok
(
h
!=
INVALID_HANDLE_VALUE
,
"CreateFile error %d
\n
"
,
GetLastError
());
CloseHandle
(
h
);
/* NtSetSecurityObject doesn't inherit DACL entries */
/* NtSetSecurityObject doesn't inherit DACL entries */
pSD
=
sd
+
sizeof
(
void
*
)
-
((
ULONG_PTR
)
sd
)
%
sizeof
(
void
*
);
pSD
=
sd
+
sizeof
(
void
*
)
-
((
ULONG_PTR
)
sd
)
%
sizeof
(
void
*
);
InitializeSecurityDescriptor
(
pSD
,
SECURITY_DESCRIPTOR_REVISION
);
InitializeSecurityDescriptor
(
pSD
,
SECURITY_DESCRIPTOR_REVISION
);
...
...
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