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
57a67ebc
Commit
57a67ebc
authored
Oct 02, 2007
by
Lionel Debroux
Committed by
Alexandre Julliard
Oct 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Fix a typo.
parent
40c66b89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
security.c
dlls/advapi32/tests/security.c
+17
-17
No files found.
dlls/advapi32/tests/security.c
View file @
57a67ebc
...
...
@@ -1989,70 +1989,70 @@ static void test_ConvertSecurityDescriptorToString()
LocalFree(string);
InitializeSecurityDescriptor
(
&
desc
,
SECURITY_DESCRIPTOR_REVISION
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
""
);
size
=
4096
;
CreateWellKnownSid
(
WinLocalSid
,
NULL
,
sid_buf
,
&
size
);
SetSecurityDescriptorOwner
(
&
desc
,
(
PSID
)
sid_buf
,
FALSE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:S-1-2-0"
);
SetSecurityDescriptorOwner
(
&
desc
,
(
PSID
)
sid_buf
,
TRUE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:S-1-2-0"
);
size
=
sizeof
(
sid_buf
);
CreateWellKnownSid
(
WinLocalSystemSid
,
NULL
,
sid_buf
,
&
size
);
SetSecurityDescriptorOwner
(
&
desc
,
(
PSID
)
sid_buf
,
TRUE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SY"
);
ConvertStringSidToSid
(
"S-1-5-21-93476-23408-4576"
,
&
psid
);
SetSecurityDescriptorGroup
(
&
desc
,
psid
,
TRUE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
GROUP_SECURITY_INFORMATION
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
GROUP_SECURITY_INFORMATION
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"G:S-1-5-21-93476-23408-4576"
);
pacl
=
(
PACL
)
acl_buf
;
InitializeAcl
(
pacl
,
sizeof
(
acl_buf
),
ACL_REVISION
);
SetSecurityDescriptorDacl
(
&
desc
,
TRUE
,
pacl
,
TRUE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576D:"
);
SetSecurityDescriptorDacl
(
&
desc
,
TRUE
,
pacl
,
FALSE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576D:"
);
ConvertStringSidToSid
(
"S-1-5-6"
,
&
psid2
);
AddAccessAllowedAceEx
(
pacl
,
ACL_REVISION
,
NO_PROPAGATE_INHERIT_ACE
,
0xf0000000
,
psid2
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)"
);
AddAccessAllowedAceEx
(
pacl
,
ACL_REVISION
,
INHERIT_ONLY_ACE
|
INHERITED_ACE
,
0x00000003
,
psid2
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)"
);
AddAccessDeniedAceEx
(
pacl
,
ACL_REVISION
,
OBJECT_INHERIT_ACE
|
CONTAINER_INHERIT_ACE
,
0xffffffff
,
psid
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)"
);
pacl
=
(
PACL
)
acl_buf
;
InitializeAcl
(
pacl
,
sizeof
(
acl_buf
),
ACL_REVISION
);
SetSecurityDescriptorSacl
(
&
desc
,
TRUE
,
pacl
,
FALSE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576D:S:"
);
SetSecurityDescriptorDacl
(
&
desc
,
TRUE
,
NULL
,
FALSE
);
AddAuditAccessAceEx
(
pacl
,
ACL_REVISION
,
VALID_INHERIT_FLAGS
,
KEY_READ
|
KEY_WRITE
,
psid2
,
TRUE
,
TRUE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)"
);
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
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)"
);
}
...
...
@@ -2081,7 +2081,7 @@ static void test_PrivateObjectSecurity(void)
ok
(
GetPrivateObjectSecurity
(
sec
,
GROUP_SECURITY_INFORMATION
,
buf
,
dwDescSize
,
&
retSize
),
"GetPrivateObjectSecurity failed (err=%u)
\n
"
,
GetLastError
());
ok
(
retSize
<=
dwDescSize
,
"Buffer too small (%d vs %d)
\n
"
,
retSize
,
dwDescSize
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
buf
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
buf
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"G:S-1-5-21-93476-23408-4576"
);
GetSecurityDescriptorControl
(
buf
,
&
ctrl
,
&
dwRevision
);
expect_eq
(
ctrl
,
0x8000
,
int
,
"%x"
);
...
...
@@ -2089,7 +2089,7 @@ static void test_PrivateObjectSecurity(void)
ok
(
GetPrivateObjectSecurity
(
sec
,
GROUP_SECURITY_INFORMATION
|
DACL_SECURITY_INFORMATION
,
buf
,
dwDescSize
,
&
retSize
),
"GetPrivateObjectSecurity failed (err=%u)
\n
"
,
GetLastError
());
ok
(
retSize
<=
dwDescSize
,
"Buffer too small (%d vs %d)
\n
"
,
retSize
,
dwDescSize
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
buf
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed err=%u
\n
"
,
GetLastError
());
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
buf
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed err=%u
\n
"
,
GetLastError
());
CHECK_RESULT_AND_FREE
(
"G:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)"
);
GetSecurityDescriptorControl
(
buf
,
&
ctrl
,
&
dwRevision
);
expect_eq
(
ctrl
,
0x8004
,
int
,
"%x"
);
...
...
@@ -2097,7 +2097,7 @@ static void test_PrivateObjectSecurity(void)
ok
(
GetPrivateObjectSecurity
(
sec
,
sec_info
,
buf
,
dwDescSize
,
&
retSize
),
"GetPrivateObjectSecurity failed (err=%u)
\n
"
,
GetLastError
());
ok
(
retSize
==
dwDescSize
,
"Buffer too small (%d vs %d)
\n
"
,
retSize
,
dwDescSize
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
buf
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
t
ion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
buf
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conver
s
ion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SY"
"G:S-1-5-21-93476-23408-4576"
"D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)"
...
...
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