nacl_loader.sb 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ;;
  2. ;; Copyright (c) 2011 The Chromium Authors. All rights reserved.
  3. ;; Use of this source code is governed by a BSD-style license that can be
  4. ;; found in the LICENSE file.
  5. ;;
  6. ; This is the Sandbox configuration file used for safeguarding the user's
  7. ; untrusted code within Native Client.
  8. ;
  9. ; *** The contents of common.sb are implicitly included here. ***
  10. ; Allow a Native Client application to use semaphores, specifically
  11. ; sem_init(), et.al.
  12. (allow ipc-posix-sem)
  13. (allow user-preference-read)
  14. (allow iokit-get-properties
  15. (iokit-registry-entry-class "IORegisterForSystemPower"))
  16. (allow iokit-open
  17. (iokit-user-client-class "IOSurfaceSendRight")
  18. (iokit-user-client-class "RootDomainUserClient")
  19. )
  20. (allow file-read-data
  21. (subpath "/usr/share/locale")
  22. ; e.g. ~/Library/Preferences/com.google.Chrome.plist
  23. (path (string-append
  24. (user-homedir-path "/Library/Preferences/")
  25. (param bundle-id)
  26. ".plist"))
  27. )
  28. (allow mach-lookup
  29. (global-name "com.apple.PowerManagement.control")
  30. (global-name "com.apple.system.notification_center")
  31. )
  32. (if (>= os-version 1014)
  33. (begin
  34. (allow sysctl-read (sysctl-name "kern.tcsm_enable"))
  35. (allow sysctl-write (sysctl-name "kern.tcsm_enable"))
  36. (allow sysctl-read (sysctl-name "kern.tcsm_available"))
  37. ))