logo

apparmor.d

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/apparmor.d.git

java (3829B)


  1. # vim:syntax=apparmor
  2. abi <abi/3.0>,
  3. # Java plugin
  4. owner @{HOME}/.java/deployment/deployment.properties k,
  5. /etc/java-*/ r,
  6. /etc/java-*/** r,
  7. /usr/lib/jvm/java-[1-9]{,[0-9]}-openjdk/{,jre/}lib/*/IcedTeaPlugin.so mr,
  8. /usr/lib/jvm/java-[1-9]{,[0-9]}-openjdk-{amd64,armel,armhf,i386,powerpc}/{,jre/}lib/*/IcedTeaPlugin.so mr,
  9. /usr/lib/jvm/java-[1-9]{,[0-9]}-openjdk/{,jre/}bin/java cx -> browser_openjdk,
  10. /usr/lib/jvm/java-[1-9]{,[0-9]}-openjdk-{amd64,armel,armhf,i386,powerpc}/{,jre/}bin/java cx -> browser_openjdk,
  11. /usr/lib/jvm/java-*-sun-1.*/jre/bin/java{,_vm} cx -> browser_java,
  12. /usr/lib/jvm/java-*-sun-1.*/jre/lib/*/libnp*.so cx -> browser_java,
  13. /usr/lib/j2*-ibm/jre/bin/java cx -> browser_java,
  14. owner /{,var/}run/user/*/icedteaplugin-*/ rw,
  15. owner /{,var/}run/user/*/icedteaplugin-*/** rwk,
  16. # Profile for the supported OpenJDK in Ubuntu. This doesn't require the
  17. # unfortunate workarounds of the proprietary Javas, so have a separate
  18. # profile.
  19. profile browser_openjdk {
  20. include <abstractions/base>
  21. include <abstractions/fonts>
  22. include <abstractions/gnome>
  23. include <abstractions/kde>
  24. include <abstractions/nameservice>
  25. include <abstractions/ssl_certs>
  26. include <abstractions/user-tmp>
  27. include <abstractions/private-files-strict>
  28. network inet stream,
  29. network inet6 stream,
  30. @{PROC}/@{pid}/net/if_inet6 r,
  31. @{PROC}/@{pid}/net/ipv6_route r,
  32. /etc/java-*/ r,
  33. /etc/java-*/** r,
  34. /etc/lsb-release r,
  35. /etc/ssl/certs/java/* r,
  36. /etc/timezone r,
  37. @{PROC}/@{pid}/ r,
  38. @{PROC}/@{pid}/fd/ r,
  39. @{PROC}/filesystems r,
  40. @{sys}/devices/system/cpu/ r,
  41. @{sys}/devices/system/cpu/** r,
  42. /usr/share/** r,
  43. /var/lib/dbus/machine-id r,
  44. /usr/bin/env ix,
  45. /usr/lib/jvm/java-[1-9]{,[0-9]}-openjdk/{,jre/}bin/java ix,
  46. /usr/lib/jvm/java-[1-9]{,[0-9]}-openjdk-{amd64,armel,armhf,i386,powerpc}/{,jre/}bin/java ix,
  47. /usr/lib/jvm/java-{6,7}-openjdk*/jre/lib/i386/client/classes.jsa m,
  48. # Why would java need this?
  49. deny /usr/bin/gconftool-2 x,
  50. owner /{,var/}run/user/[0-9]*/icedteaplugin-*-*/[0-9]*-icedteanp-appletviewer-to-plugin rw,
  51. owner /{,var/}run/user/[0-9]*/icedteaplugin-*-*/[0-9]*-icedteanp-plugin-{,debug-}to-appletviewer r,
  52. owner @{HOME}/ r,
  53. owner @{HOME}/** rwk,
  54. }
  55. # Profile for commercial Javas. These need workarounds to work right (eg
  56. # Sun's forcing of an executable stack (LP: #535247)).
  57. profile browser_java {
  58. include <abstractions/base>
  59. include <abstractions/fonts>
  60. include <abstractions/gnome>
  61. include <abstractions/kde>
  62. include <abstractions/nameservice>
  63. include <abstractions/ssl_certs>
  64. include <abstractions/user-tmp>
  65. include <abstractions/private-files-strict>
  66. network inet stream,
  67. network inet6 stream,
  68. @{PROC}/@{pid}/net/if_inet6 r,
  69. @{PROC}/@{pid}/net/ipv6_route r,
  70. @{PROC}/loadavg r,
  71. /etc/debian_version r,
  72. /etc/java-*/ r,
  73. /etc/java-*/** r,
  74. /etc/lsb-release r,
  75. /etc/ssl/certs/java/* r,
  76. /etc/timezone r,
  77. @{PROC}/@{pid}/ r,
  78. @{PROC}/@{pid}/fd/ r,
  79. @{PROC}/filesystems r,
  80. @{sys}/devices/system/cpu/ r,
  81. @{sys}/devices/system/cpu/** r,
  82. /usr/share/** r,
  83. /var/lib/dbus/machine-id r,
  84. /usr/bin/env ix,
  85. /usr/lib/jvm/java-*-sun-1.*/jre/bin/java{,_vm} ix,
  86. /usr/lib/jvm/java-*-sun-1.*/jre/lib/i386/client/classes.jsa m,
  87. /usr/lib/j2*-ibm/jre/bin/java ix,
  88. # noisy, can't write here anyway
  89. deny /etc/.java/ w,
  90. deny /etc/.java/** w,
  91. deny /usr/bin/gconftool-2 x,
  92. owner @{HOME}/ r,
  93. owner @{HOME}/** rwk,
  94. # These are seriously unfortunate, but required due to LP: #535247
  95. /etc/passwd m,
  96. owner @{HOME}/.java/**/cache/** m,
  97. owner /tmp/** m,
  98. /usr/lib{,32,64}/jvm/**/*.jar mr,
  99. /usr/share/fonts/** m,
  100. }