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
133c0f54
Commit
133c0f54
authored
Oct 13, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Oct 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Fix a test failure on Vista and higher.
parent
b4955e57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
security.c
dlls/advapi32/tests/security.c
+8
-11
No files found.
dlls/advapi32/tests/security.c
View file @
133c0f54
...
...
@@ -2666,6 +2666,7 @@ static void test_ConvertStringSecurityDescriptor(void)
DWORD
revision
;
BOOL
ret
;
DWORD
GLE
;
DWORD
altGLE
;
}
cssd
[]
=
{
{
"D:(A;;GA;;;WD)"
,
0xdeadbeef
,
FALSE
,
ERROR_UNKNOWN_REVISION
},
...
...
@@ -2673,11 +2674,11 @@ static void test_ConvertStringSecurityDescriptor(void)
{
"D:(A;;GA;;;WD)"
,
SDDL_REVISION_1
,
TRUE
},
{
"D:(D;;GA;;;WD)"
,
SDDL_REVISION_1
,
TRUE
},
{
"ERROR:(D;;GA;;;WD)"
,
SDDL_REVISION_1
,
FALSE
,
ERROR_INVALID_PARAMETER
},
/* test ACE string
type
with spaces */
/* test ACE string with spaces */
{
" D:(D;;GA;;;WD)"
,
SDDL_REVISION_1
,
TRUE
},
{
"D: (D;;GA;;;WD)"
,
SDDL_REVISION_1
,
TRUE
},
{
"D:( D;;GA;;;WD)"
,
SDDL_REVISION_1
,
TRUE
},
{
"D:(D ;;GA;;;WD)"
,
SDDL_REVISION_1
,
FALSE
,
RPC_S_INVALID_STRING_UUID
},
{
"D:(D ;;GA;;;WD)"
,
SDDL_REVISION_1
,
FALSE
,
RPC_S_INVALID_STRING_UUID
,
ERROR_INVALID_ACL
},
/* Vista+ */
{
"D:(D; ;GA;;;WD)"
,
SDDL_REVISION_1
,
TRUE
},
{
"D:(D;; GA;;;WD)"
,
SDDL_REVISION_1
,
TRUE
},
{
"D:(D;;GA ;;;WD)"
,
SDDL_REVISION_1
,
FALSE
,
ERROR_INVALID_ACL
},
...
...
@@ -2699,7 +2700,8 @@ static void test_ConvertStringSecurityDescriptor(void)
/* test behaviour with empty strings */
{
""
,
SDDL_REVISION_1
,
TRUE
},
/* test ACE string SID */
{
"D:(D;;GA;;;S-1-0-0)"
,
SDDL_REVISION_1
,
TRUE
}
{
"D:(D;;GA;;;S-1-0-0)"
,
SDDL_REVISION_1
,
TRUE
},
{
"D:(D;;GA;;;Nonexistent account)"
,
SDDL_REVISION_1
,
FALSE
,
ERROR_INVALID_ACL
,
ERROR_INVALID_SID
}
/* W2K */
};
if
(
!
pConvertStringSecurityDescriptorToSecurityDescriptorA
)
...
...
@@ -2718,7 +2720,9 @@ static void test_ConvertStringSecurityDescriptor(void)
GLE
=
GetLastError
();
ok
(
ret
==
cssd
[
i
].
ret
,
"(%02d) Expected %s (%d)
\n
"
,
i
,
cssd
[
i
].
ret
?
"success"
:
"failure"
,
GLE
);
if
(
!
cssd
[
i
].
ret
)
ok
(
GLE
==
cssd
[
i
].
GLE
,
"(%02d) Expected %d, got %d
\n
"
,
i
,
cssd
[
i
].
GLE
,
GLE
);
ok
(
GLE
==
cssd
[
i
].
GLE
||
(
cssd
[
i
].
altGLE
&&
GLE
==
cssd
[
i
].
altGLE
),
"(%02d) Unexpected last error %d
\n
"
,
i
,
GLE
);
if
(
ret
)
LocalFree
(
pSD
);
}
...
...
@@ -2759,13 +2763,6 @@ static void test_ConvertStringSecurityDescriptor(void)
Blank
,
SDDL_REVISION_1
,
&
pSD
,
NULL
);
ok
(
ret
,
"ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d
\n
"
,
GetLastError
());
/* test ACE string SID */
SetLastError
(
0xdeadbeef
);
ret
=
pConvertStringSecurityDescriptorToSecurityDescriptorA
(
"D:(D;;GA;;;Nonexistent account)"
,
SDDL_REVISION_1
,
&
pSD
,
NULL
);
ok
(
!
ret
,
"Expected failure, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_ACL
||
GetLastError
()
==
ERROR_INVALID_SID
,
"Expected ERROR_INVALID_ACL or ERROR_INVALID_SID, got %d
\n
"
,
GetLastError
());
}
static
void
test_ConvertSecurityDescriptorToString
(
void
)
...
...
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