Source code of Windows XP (NT5)
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.

50 lines
1.2 KiB

  1. # -
  2. # This test makes sure that DENY_ACCESS ACE has a higher precedence over GRANT_ACCESS ACE
  3. # -
  4. # Initialize a new ACL
  5. Exec InitNewACL
  6. # Set the current trustee to rayland\actest1 and add it to the local access request list
  7. Set TrusteeName rayland\actest1
  8. ToggleAccessPerm COM_RIGHTS_EXECUTE
  9. AddTrustee AccessRequestList
  10. # Call GrantAccessRights
  11. Exec GrantAccessRights
  12. # Chicage client's security context
  13. SwitchClientCtx
  14. actest1
  15. rayland
  16. # Call IsAccessPermitted
  17. Exec IsAccessPermitted
  18. # Call IsAccessPermitted again to see if the caching mechanism works
  19. Exec IsAccessPermitted
  20. # Destroy the old access request list
  21. Destroy AccessRequestList
  22. # Set the current trustee to rayland\actestgroup1 and add it to the local access request list
  23. Set TrusteeName rayland\actestgroup1
  24. Set TrusteeType TRUSTEE_IS_GROUP
  25. AddTrustee AccessRequestList
  26. # Call DenyAccessRights
  27. Exec DenyAccessRights
  28. # Change the current trustee back to rayland\actest1
  29. Set TrusteeName rayland\actest1
  30. Set TrusteeType TRUSTEE_IS_USER
  31. # Call IsAccessPermitted, rayland\actest1 should eb denied access by now
  32. Exec IsAccessPermitted
  33. # Retrieve the ACL fromt he IAccessControl object
  34. Exec GetExplicitAccessRights
  35. # Kill the server
  36. Quit