com.oracle.java.JavaAppletPlugin.sb 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. ; Copyright (C) 2013 Apple Inc. All rights reserved.
  2. ;
  3. ; Redistribution and use in source and binary forms, with or without
  4. ; modification, are permitted provided that the following conditions
  5. ; are met:
  6. ; 1. Redistributions of source code must retain the above copyright
  7. ; notice, this list of conditions and the following disclaimer.
  8. ; 2. Redistributions in binary form must reproduce the above copyright
  9. ; notice, this list of conditions and the following disclaimer in the
  10. ; documentation and/or other materials provided with the distribution.
  11. ;
  12. ; THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
  13. ; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  14. ; THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  15. ; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
  16. ; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  17. ; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  18. ; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  19. ; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  20. ; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  21. ; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  22. ; THE POSSIBILITY OF SUCH DAMAGE.
  23. (webkit-printing)
  24. (allow signal network-inbound)
  25. (allow process-fork)
  26. (allow process-exec
  27. (subpath "/System/Library/Java/JavaVirtualMachines")
  28. (subpath "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin"))
  29. (allow mach-lookup
  30. (global-name "com.apple.coreservices.launchservicesd")
  31. (global-name-regex #"^PlaceHolderServerName-"))
  32. (if (equal? os-version "10.7")
  33. (begin
  34. (allow mach-lookup
  35. (global-name-regex #"^com\.apple\.java\.jrs\.carenderserver"))
  36. (allow file-read* file-write*
  37. (home-library-subpath "/Caches/net.java.openjdk.cmd"))))
  38. (allow file-read*
  39. (literal "/dev/fd")
  40. (literal "/usr/bin")
  41. (literal "/private/etc/hosts")
  42. (subpath "/Library/Java")
  43. (subpath "/System/Library/Java"))
  44. (shared-preferences-read
  45. "com.apple.java.JavaPreferences"
  46. "net.java.openjdk.cmd")
  47. (shared-preferences-read-write
  48. "com.apple.java.util.prefs"
  49. "com.oracle.javadeployment")
  50. (allow file-read* file-write*
  51. (home-library-subpath "/Saved Application State/net.java.openjdk.cmd.savedState")
  52. (home-library-subpath "/Application Support/Oracle/Java/Deployment")
  53. (home-library-subpath "/Caches/Java"))
  54. (allow file-write-create
  55. (home-library-literal "/Application Support/Oracle")
  56. (home-library-literal "/Application Support/Oracle/Java"))
  57. (allow file-read*
  58. (subpath "/Library/Application Support/Java/PublicFiles")
  59. (subpath "/Library/Application Support/Oracle/Java/Deployment"))
  60. (allow network-bind network-outbound (subpath (param "DARWIN_USER_TEMP_DIR")))
  61. (allow network-bind (local ip))
  62. (deny file-write* (with no-log) (subpath "/Library/Application Support/Oracle"))
  63. (deny file-write* (with no-log) (subpath (param "WEBKIT2_FRAMEWORK_DIR")))
  64. (deny job-creation (with no-log))