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
05cb54fc
Commit
05cb54fc
authored
Oct 20, 2007
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Oct 22, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Make the SDDL test pass under Vista.
parent
7a06e0d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
security.c
dlls/advapi32/tests/security.c
+10
-2
No files found.
dlls/advapi32/tests/security.c
View file @
05cb54fc
...
@@ -2025,6 +2025,11 @@ static void test_ConvertSecurityDescriptorToString()
...
@@ -2025,6 +2025,11 @@ static void test_ConvertSecurityDescriptorToString()
ok(len >= (strlen(exp_str) + 1), "Length mismatch (expected %d, got %d)\n", strlen(exp_str) + 1, len); \
ok(len >= (strlen(exp_str) + 1), "Length mismatch (expected %d, got %d)\n", strlen(exp_str) + 1, len); \
LocalFree(string);
LocalFree(string);
#define CHECK_ONE_OF_AND_FREE(exp_str1, exp_str2) \
ok(strcmp(string, (exp_str1)) == 0 || strcmp(string, (exp_str2)) == 0, "String mismatch (expected\n\"%s\" or\n\"%s\", got\n\"%s\")\n", (exp_str1), (exp_str2), string); \
ok(len >= (strlen(string) + 1), "Length mismatch (expected %d, got %d)\n", strlen(string) + 1, len); \
LocalFree(string);
InitializeSecurityDescriptor
(
&
desc
,
SECURITY_DESCRIPTOR_REVISION
);
InitializeSecurityDescriptor
(
&
desc
,
SECURITY_DESCRIPTOR_REVISION
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
""
);
CHECK_RESULT_AND_FREE
(
""
);
...
@@ -2086,11 +2091,13 @@ static void test_ConvertSecurityDescriptorToString()
...
@@ -2086,11 +2091,13 @@ static void test_ConvertSecurityDescriptorToString()
SetSecurityDescriptorDacl
(
&
desc
,
TRUE
,
NULL
,
FALSE
);
SetSecurityDescriptorDacl
(
&
desc
,
TRUE
,
NULL
,
FALSE
);
AddAuditAccessAceEx
(
pacl
,
ACL_REVISION
,
VALID_INHERIT_FLAGS
,
KEY_READ
|
KEY_WRITE
,
psid2
,
TRUE
,
TRUE
);
AddAuditAccessAceEx
(
pacl
,
ACL_REVISION
,
VALID_INHERIT_FLAGS
,
KEY_READ
|
KEY_WRITE
,
psid2
,
TRUE
,
TRUE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)"
);
CHECK_ONE_OF_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)"
,
/* XP */
"O:SYG:S-1-5-21-93476-23408-4576D:NO_ACCESS_CONTROLS:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)"
/* Vista */
);
AddAuditAccessAceEx
(
pacl
,
ACL_REVISION
,
NO_PROPAGATE_INHERIT_ACE
,
FILE_GENERIC_READ
|
FILE_GENERIC_WRITE
,
psid2
,
TRUE
,
FALSE
);
AddAuditAccessAceEx
(
pacl
,
ACL_REVISION
,
NO_PROPAGATE_INHERIT_ACE
,
FILE_GENERIC_READ
|
FILE_GENERIC_WRITE
,
psid2
,
TRUE
,
FALSE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)"
);
CHECK_ONE_OF_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)"
,
/* XP */
"O:SYG:S-1-5-21-93476-23408-4576D:NO_ACCESS_CONTROLS:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)"
/* Vista */
);
}
}
static
void
test_PrivateObjectSecurity
(
void
)
static
void
test_PrivateObjectSecurity
(
void
)
...
@@ -2150,6 +2157,7 @@ static void test_PrivateObjectSecurity(void)
...
@@ -2150,6 +2157,7 @@ static void test_PrivateObjectSecurity(void)
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
}
}
#undef CHECK_RESULT_AND_FREE
#undef CHECK_RESULT_AND_FREE
#undef CHECK_ONE_OF_AND_FREE
START_TEST
(
security
)
START_TEST
(
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