windows-nt/Source/XPSP1/NT/com/oleutest/accctrl/tstsuite/test10.in
2020-09-26 16:20:57 +08:00

63 lines
1.4 KiB
Plaintext

# -
# This test verifies ReplaceAllAccessRights
# -
# Initialize a new ACL
Exec InitNewACL
# Add rayland\actest1-10 to the local explicit access list
ToggleAccessPerm COM_RIGHTS_EXECUTE
Set TrusteeName rayland\actest1
AddTrustee ExplicitAccessList
Set AccessMode DENY_ACCESS
Set TrusteeName rayland\actest2
AddTrustee ExplicitAccessList
Set AccessMode GRANT_ACCESS
Set TrusteeName rayland\actest3
AddTrustee ExplicitAccessList
Set AccessMode DENY_ACCESS
Set TrusteeName rayland\actest4
AddTrustee ExplicitAccessList
Set AccessMode GRANT_ACCESS
Set TrusteeName rayland\actest5
AddTrustee ExplicitAccessList
Set AccessMode DENY_ACCESS
Set TrusteeName rayland\actest6
AddTrustee ExplicitAccessList
Set AccessMode GRANT_ACCESS
Set TrusteeName rayland\actest7
AddTrustee ExplicitAccessList
Set AccessMode DENY_ACCESS
Set TrusteeName rayland\actest8
AddTrustee ExplicitAccessList
Set AccessMode GRANT_ACCESS
Set TrusteeName rayland\actest9
AddTrustee ExplicitAccessList
Set AccessMode DENY_ACCESS
Set TrusteeName rayland\actest10
AddTrustee ExplicitAccessList
# Call ReplaceAllAccessRights
Exec ReplaceAllAccessRights
# Take a look at the ACL
Exec GetExplicitAccessRights
SwitchClientCtx
actest1
rayland
Set TrusteeName rayland\actest1
Exec IsAccessPermitted
# Replace the current ACL with aan empty ACL
Destroy LocalExplicitAccessList
Exec ReplaceAllAccessRights
# Take a look at the ACL
Exec GetExplicitAccessRights
Exec IsAccessPermitted
# Kill server
Quit