logo

apparmor.d

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

kde-open5 (3699B)


  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 kde-open5 helper.
  5. #
  6. # NOTE: most likely you want to use xdg-open abstraction instead for better
  7. # portability across desktop environments, unless you are sure that confined
  8. # application only uses /usr/bin/kde-open5 directly.
  9. #
  10. # Usage example:
  11. #
  12. # ```
  13. # profile foo /usr/bin/foo {
  14. # ...
  15. # /usr/bin/kde-open5 rPx -> foo//kde-open5,
  16. # ...
  17. # } # end of main profile
  18. #
  19. # # out-of-line child profile
  20. # profile foo//kde-open5 {
  21. # include <abstractions/kde-open5>
  22. #
  23. # # needed for ubuntu-* abstractions
  24. # include <abstractions/ubuntu-helpers>
  25. #
  26. # # Only allow to handle http[s]: and mailto: links
  27. # include <abstractions/ubuntu-browsers>
  28. # include <abstractions/ubuntu-email>
  29. #
  30. # # Add if accessibility access is considered as required
  31. # # (for message box in case exo-open fails)
  32. # include <abstractions/dbus-accessibility>
  33. #
  34. # # Add if audio support for message box is
  35. # # considered as required.
  36. # include if exists <abstractions/gstreamer>
  37. #
  38. # # < add additional allowed applications here >
  39. # }
  40. # ```
  41. include <abstractions/audio> # for alert messages
  42. include <abstractions/base>
  43. include <abstractions/dbus-accessibility-strict>
  44. include <abstractions/dbus-network-manager-strict>
  45. include <abstractions/dbus-session-strict>
  46. include <abstractions/dbus-strict>
  47. include <abstractions/kde-icon-cache-write>
  48. include <abstractions/kde>
  49. include <abstractions/nameservice> # for IceProcessMessages () from libICE.so (called by libQtCore.so)
  50. include <abstractions/openssl>
  51. include <abstractions/qt5>
  52. include <abstractions/recent-documents-write>
  53. include <abstractions/X>
  54. # Main executables
  55. /usr/bin/kde-open5 rix,
  56. /usr/lib/@{multiarch}/libexec/kf5/kioslave{,5} ix,
  57. # DBus
  58. dbus
  59. bus=session
  60. interface=org.kde.KLauncher
  61. member=start_service_by_desktop_path
  62. peer=(name=org.kde.klauncher5),
  63. # Denied system files
  64. deny /usr/lib/vlc/plugins/* w, # VLC backed tries to create plugins.dat.16109
  65. # libpcre2 on openSUSE tries to mmap() shared memory on directory.
  66. # see: https://lists.ubuntu.com/archives/apparmor/2019-January/011925.html
  67. # AppArmor does not allow to distinguish "real" file vs shared memory one,
  68. # so we deny this path to protect from loading exploits from /tmp.
  69. deny /tmp/#[0-9]*[0-9] m,
  70. # System files
  71. /dev/tty r,
  72. /etc/xdg/accept-languages.codes r,
  73. /etc/xdg/menus/{,*/} r,
  74. /usr/share/*fonts*/conf.avail/*.conf r, # for openSUSE, when showing error message box
  75. /usr/share/ghostscript/fonts/ r, # for openSUSE, when showing error message box
  76. /usr/share/hwdata/pnp.ids r, # for openSUSE, when showing error message box, for QXcbConnection::initializeScreens() from libQt5XcbQpa.so
  77. /usr/share/icu/[0-9]*.[0-9]*/*.dat r, # for openSUSE
  78. /usr/share/kservices5/{,**} r, # for KProtocolManager::defaultUserAgent() from libKF5KIOCore.so
  79. /usr/share/mime/ r,
  80. /usr/share/mime/generic-icons r,
  81. /usr/share/plasma/look-and-feel/*/contents/defaults r, # TODO: move to kde abstraction?
  82. /usr/share/sounds/ r,
  83. @{PROC}/sys/kernel/core_pattern r,
  84. @{PROC}/sys/kernel/random/boot_id r,
  85. # User files
  86. owner /tmp/xauth-[0-9]*-_[0-9] r, # for libQt5XcbQpa.so
  87. owner @{run}/user/[0-9]*/#[0-9]* rw, # for /run/user/1000/#13
  88. owner @{run}/user/[0-9]*/kioclient*slave-socket lrw -> @{run}/user/[0-9]/#[0-9]*, # for KIO::Slave::holdSlave(QString const&, QUrl const&) () from libKF5KIOCore.so (not 100% sure)
  89. owner @{HOME}/.cache/kio_http/ rw,
  90. # Include additions to the abstraction
  91. include if exists <abstractions/kde-open5.d>