logo

apparmor.d

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

xdg-open (2286B)


  1. # vim:syntax=apparmor
  2. abi <abi/3.0>,
  3. # This abstraction is designed to be used in a child profile to limit what
  4. # confined application can invoke via xdg-open helper. xdg-open abstraction
  5. # will allow to use gio-open, kde-open5 and other helpers of the different
  6. # desktop environments.
  7. #
  8. # Usage example:
  9. #
  10. # ```
  11. # profile foo /usr/bin/foo {
  12. # ...
  13. # /usr/bin/xdg-open rPx -> foo//xdg-open,
  14. # ...
  15. # } # end of main profile
  16. #
  17. # # out-of-line child profile
  18. # profile foo//xdg-open {
  19. # include <abstractions/xdg-open>
  20. #
  21. # # Enable a11y support if considered required by
  22. # # profile author for (rare) error message boxes.
  23. # include <abstractions/dbus-accessibility>
  24. #
  25. # # Enable gstreamer support if considered required by
  26. # # profile author for (rare) error message boxes.
  27. # include if exists <abstractions/gstreamer>
  28. #
  29. # # needed for ubuntu-* abstractions
  30. # include <abstractions/ubuntu-helpers>
  31. #
  32. # # Only allow to handle http[s]: and mailto: links
  33. # include <abstractions/ubuntu-browsers>
  34. # include <abstractions/ubuntu-email>
  35. #
  36. # # < add additional allowed applications here >
  37. # }
  38. # ```
  39. include <abstractions/base>
  40. # for opening with `exo-open`
  41. include <abstractions/exo-open>
  42. # for opening with `gio open <uri>`
  43. include <abstractions/gio-open>
  44. # for opening with gvfs-open (deprecated)
  45. include <abstractions/gvfs-open>
  46. # for opening with kde-open5
  47. include <abstractions/kde-open5>
  48. # Main executables
  49. /{,usr/}bin/{b,d}ash mr,
  50. /usr/bin/xdg-open r,
  51. # Additional executables
  52. /usr/bin/xdg-mime rix,
  53. /{,usr/}bin/cut rix, # for xdg-mime
  54. /{,usr/}bin/head rix, # for xdg-mime
  55. /{,usr/}bin/sed rix, # for xdg-open
  56. /{,usr/}bin/tr rix, # for xdg-mime
  57. /{,usr/}bin/which rix, # for xdg-open
  58. /{,usr/}bin/{grep,egrep} rix, # for xdg-open
  59. # System files
  60. /dev/pts/[0-9]* rw,
  61. /dev/tty w,
  62. /etc/gnome/defaults.list r, # for grep
  63. /usr/share/applications/mimeinfo.cache r, # for grep
  64. /usr/share/terminfo/s/screen r, # for bash on openSUSE
  65. /usr/share/{,*/}applications/{,*.desktop} r, # for xdg-mime
  66. /var/lib/menu-xdg/applications/ r, # for xdg-mime
  67. # Usr files
  68. owner @{HOME}/.local/share/applications/{,*.desktop} r,
  69. # Include additions to the abstraction
  70. include if exists <abstractions/xdg-open.d>