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
d6fed9c3
Commit
d6fed9c3
authored
Feb 15, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Skip test_token_label() if AddMandatoryAce() is not present.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f6a723f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
security.c
dlls/advapi32/tests/security.c
+22
-21
No files found.
dlls/advapi32/tests/security.c
View file @
d6fed9c3
...
...
@@ -6955,6 +6955,12 @@ static void test_token_label(void)
char
*
str
;
SID
*
sid
;
if
(
!
pAddMandatoryAce
)
{
win_skip
(
"Mandatory integrity control is not supported.
\n
"
);
return
;
}
ret
=
OpenProcessToken
(
GetCurrentProcess
(),
READ_CONTROL
|
WRITE_OWNER
,
&
token
);
ok
(
ret
,
"OpenProcessToken failed with error %u
\n
"
,
GetLastError
());
...
...
@@ -6968,8 +6974,7 @@ static void test_token_label(void)
ret
=
GetSecurityDescriptorControl
(
sd
,
&
control
,
&
revision
);
ok
(
ret
,
"GetSecurityDescriptorControl failed with error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
control
==
(
SE_SELF_RELATIVE
|
SE_SACL_AUTO_INHERITED
|
SE_SACL_PRESENT
)
||
broken
(
control
==
SE_SELF_RELATIVE
)
/* WinXP, Win2003 */
,
todo_wine
ok
(
control
==
(
SE_SELF_RELATIVE
|
SE_SACL_AUTO_INHERITED
|
SE_SACL_PRESENT
),
"Unexpected security descriptor control %#x
\n
"
,
control
);
ok
(
revision
==
1
,
"Unexpected security descriptor revision %u
\n
"
,
revision
);
...
...
@@ -6989,28 +6994,24 @@ static void test_token_label(void)
ret
=
GetSecurityDescriptorSacl
(
sd
,
&
present
,
&
sacl
,
&
defaulted
);
ok
(
ret
,
"GetSecurityDescriptorSacl failed with error %u
\n
"
,
GetLastError
());
ok
(
present
||
broken
(
!
present
)
/* WinXP, Win2003 */
,
"No SACL in the security descriptor
\n
"
);
ok
(
sacl
||
broken
(
!
sacl
)
/* WinXP, Win2003 */
,
"NULL SACL in the security descriptor
\n
"
);
if
(
present
)
{
ok
(
!
defaulted
,
"SACL defaulted
\n
"
);
ok
(
sacl
->
AceCount
==
1
,
"SACL contains an unexpected ACE count %u
\n
"
,
sacl
->
AceCount
);
ok
(
present
,
"No SACL in the security descriptor
\n
"
);
ok
(
!!
sacl
,
"NULL SACL in the security descriptor
\n
"
);
ok
(
!
defaulted
,
"SACL defaulted
\n
"
);
ok
(
sacl
->
AceCount
==
1
,
"SACL contains an unexpected ACE count %u
\n
"
,
sacl
->
AceCount
);
ret
=
GetAce
(
sacl
,
0
,
(
void
**
)
&
ace
);
ok
(
ret
,
"GetAce failed with error %u
\n
"
,
GetLastError
());
ret
=
GetAce
(
sacl
,
0
,
(
void
**
)
&
ace
);
ok
(
ret
,
"GetAce failed with error %u
\n
"
,
GetLastError
());
ok
(
ace
->
Header
.
AceType
==
SYSTEM_MANDATORY_LABEL_ACE_TYPE
,
"Unexpected ACE type %#x
\n
"
,
ace
->
Header
.
AceType
);
ok
(
!
ace
->
Header
.
AceFlags
,
"Unexpected ACE flags %#x
\n
"
,
ace
->
Header
.
AceFlags
);
ok
(
ace
->
Header
.
AceSize
,
"Unexpected ACE size %u
\n
"
,
ace
->
Header
.
AceSize
);
ok
(
ace
->
Mask
==
SYSTEM_MANDATORY_LABEL_NO_WRITE_UP
,
"Unexpected ACE mask %#x
\n
"
,
ace
->
Mask
);
ok
(
ace
->
Header
.
AceType
==
SYSTEM_MANDATORY_LABEL_ACE_TYPE
,
"Unexpected ACE type %#x
\n
"
,
ace
->
Header
.
AceType
);
ok
(
!
ace
->
Header
.
AceFlags
,
"Unexpected ACE flags %#x
\n
"
,
ace
->
Header
.
AceFlags
);
ok
(
ace
->
Header
.
AceSize
,
"Unexpected ACE size %u
\n
"
,
ace
->
Header
.
AceSize
);
ok
(
ace
->
Mask
==
SYSTEM_MANDATORY_LABEL_NO_WRITE_UP
,
"Unexpected ACE mask %#x
\n
"
,
ace
->
Mask
);
sid
=
(
SID
*
)
&
ace
->
SidStart
;
ConvertSidToStringSidA
(
sid
,
&
str
);
ok
(
EqualSid
(
sid
,
&
medium_sid
)
||
EqualSid
(
sid
,
&
high_sid
),
"Got unexpected SID %s
\n
"
,
str
);
LocalFree
(
str
);
}
sid
=
(
SID
*
)
&
ace
->
SidStart
;
ConvertSidToStringSidA
(
sid
,
&
str
);
ok
(
EqualSid
(
sid
,
&
medium_sid
)
||
EqualSid
(
sid
,
&
high_sid
),
"Got unexpected SID %s
\n
"
,
str
);
LocalFree
(
str
);
ret
=
GetSecurityDescriptorDacl
(
sd
,
&
present
,
&
dacl
,
&
defaulted
);
ok
(
ret
,
"GetSecurityDescriptorDacl failed with error %u
\n
"
,
GetLastError
());
...
...
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