You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.5 KiB
62 lines
1.5 KiB
# -
|
|
# 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
|