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.

36 lines
818 B

  1. # -
  2. # Grant access right to a group, perform access check for a user in that group, and obtain the ACL
  3. # -
  4. # Initialize a new ACL
  5. Exec InitNewACL
  6. # Add rayland\actestgroup2 to the local access request list
  7. Set TrusteeName Rayland\actestgroup1
  8. ToggleAccessPerm COM_RIGHTS_EXECUTE
  9. Set TrusteeType TRUSTEE_IS_GROUP
  10. AddTrustee AccessRequestList
  11. # Call GrantAccessRights
  12. Exec GrantAccessRights
  13. # Change the client's security context
  14. SwitchClientCtx
  15. actest1
  16. rayland
  17. # Reset the current trustee
  18. Set TrusteeName Rayland\actest1
  19. Set TrusteeType TRUSTEE_IS_USER
  20. AddTrustee AccessRequestList
  21. # Call IsAccessPermitted
  22. Exec IsAccessPermitted
  23. # Call IsAccessPermitted again to see if the caching mechanism works
  24. Exec IsAccessPermitted
  25. # Call GetExplicitAccessRights
  26. Exec GetExplicitAccessRights
  27. # Shut down the server
  28. Quit